4#include <QtCore/QDebug>
6QList<QGCPalette*> QGCPalette::_paletteObjects;
10QMap<int, QMap<int, QMap<QString, QColor>>> QGCPalette::_colorInfoMap;
12QStringList QGCPalette::_colors;
16 _colorGroupEnabled(true)
18 if (_colorInfoMap.isEmpty()) {
23 _paletteObjects +=
this;
28 bool fSuccess = _paletteObjects.removeOne(
this);
30 qWarning() <<
"Internal error";
34void QGCPalette::_buildMap()
41 DECLARE_QGC_COLOR(windowTransparent,
"#ccf2f3f5",
"#ccf2f3f5",
"#cc0b0d10",
"#cc0b0d10")
69 DECLARE_QGC_COLOR(toolStripHoverColor,
"#585858",
"#9D9D9D",
"#585858",
"#585d83")
70 DECLARE_QGC_COLOR(toolbarBackground,
"#00ffffff",
"#00ffffff",
"#00222222",
"#00222222")
97 _colorGroupEnabled = enabled;
104 if (_theme != newTheme) {
106 _signalPaletteChangeToAll();
110void QGCPalette::_signalPaletteChangeToAll()
113 for (
QGCPalette *palette : std::as_const(_paletteObjects)) {
114 palette->_signalPaletteChanged();
118void QGCPalette::_signalPaletteChanged()
#define DECLARE_QGC_SINGLE_COLOR(name, color)
#define DECLARE_QGC_NONTHEMED_COLOR(name, disabledColor, enabledColor)
#define DECLARE_QGC_COLOR(name, lightDisabled, lightEnabled, darkDisabled, darkEnabled)
QGCPalette is used in QML ui to expose color properties for the QGC palette.
static void setGlobalTheme(Theme newTheme)
QGCPalette(QObject *parent=nullptr)
void setColorGroupEnabled(bool enabled)