ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
colorcombobox.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <QComboBox>
11 
12 #include "../qPCL.h"
13 
14 namespace Widgets {
15 
16 class QPCL_ENGINE_LIB_API ColorComboBox : public QComboBox {
17  Q_OBJECT
18 
19 public:
20  ColorComboBox(QWidget* parent = 0);
21  void setColor(const QColor& c);
22  QColor color() const;
23  static QList<QColor> colorList();
24  static QStringList colorNames();
25  static int colorIndex(const QColor& c);
26  static QColor color(int colorIndex);
27  static QColor defaultColor(int colorIndex);
28  static bool isValidColor(const QColor& color);
29  static int numPredefinedColors();
30  static QStringList defaultColorNames();
31  static QList<QColor> defaultColors();
32 
33 protected:
34  void init();
35  static const int stColorsCount = 24;
36  static const QColor stColors[];
37 
38 private:
39  Q_DISABLE_COPY(ColorComboBox)
40 };
41 
42 } // namespace Widgets
math::float4 color
bool setColor(ccHObject::Container selectedEntities, bool colorize, QWidget *parent)
constexpr Rgbub defaultColor(MAX, MAX, MAX)
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15