9 #include <QAbstractItemModel>
11 #include <QModelIndex>
13 #include <QTextStream>
17 typedef util::Color<float> Colorf;
57 StartMesh1 = Mesh1Color,
58 StartMesh2 = Mesh2Color,
59 StartOthers = BackgroundColor
63 static const QString colorNames[NbColors];
64 static const QString categoryNames[3];
65 static const int categoryShift[3];
66 static const int categorySize[3];
72 void readParms(util::Parms& parms,
QString section);
78 return data(index, Qt::DecorationRole).value<
QColor>();
81 setData(index, col, Qt::DecorationRole);
84 QColor qcolor(ColorType type)
const {
87 Colorf color(ColorType type)
const {
88 return (Colorf)colors[type];
94 Qt::ItemFlags flags(
const QModelIndex& index)
const;
98 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
103 static Colors* instance()
106 _instance =
new Colors();
110 static QColor getQColor(ColorType type) {
111 return instance()->qcolor(type);
114 static Colorf getColor(ColorType type) {
115 return instance()->color(type);
119 void colorsChanged();
123 void restoreColors();
127 std::vector<QColor> colors, backup;
129 static Colors* _instance;
Color of the cell ids.
Definition: Colors.hpp:31
Definition: Colors.hpp:45
Color of the selected points and edges.
Definition: Colors.hpp:39
Color of the lines.
Definition: Colors.hpp:27
Color of the bounding box.
Definition: Colors.hpp:41
Color of the border.
Definition: Colors.hpp:37
Defines the util::Parms class.
Color of the selected points and edges.
Definition: Colors.hpp:30
Color of the grid of the 3rd clipping planes.
Definition: Colors.hpp:48
Definition: Colors.hpp:36
Color of the bounding box.
Definition: Colors.hpp:32
Color of the text and lines in the color bar.
Definition: Colors.hpp:50
Color of the xircle for the pixel edit tool.
Definition: Colors.hpp:52
Color of the grid of the 1st clipping planes.
Definition: Colors.hpp:46
Definition: Colors.hpp:56
ColorType
Mesh1 and 2 must have the same order for their colors.
Definition: Colors.hpp:24
Defines the Color class template.
Color of the cell ids.
Definition: Colors.hpp:40
Definition: Colors.hpp:19
Color of the text and lines in the scale bar.
Definition: Colors.hpp:51
Color of the grid of the cutting surface.
Definition: Colors.hpp:49
Color of the grid of the 2nd clipping planes.
Definition: Colors.hpp:47
Color of the border.
Definition: Colors.hpp:28