diff options
Diffstat (limited to 'src/widget/colormenu.h')
-rw-r--r-- | src/widget/colormenu.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/widget/colormenu.h b/src/widget/colormenu.h index 4c82943cbb..e661a8996f 100644 --- a/src/widget/colormenu.h +++ b/src/widget/colormenu.h @@ -1,19 +1,31 @@ #pragma once +#include <QColorDialog> #include <QMenu> -#include "util/color/color.h" +#include "util/color/colorpalette.h" class ColorMenu : public QMenu { Q_OBJECT public: ColorMenu(QWidget *parent = nullptr); - void useColorSet(PredefinedColorsRepresentation* pColorRepresentation); + void useColorPalette(const ColorPalette& colorPalette); + void setCurrentColor(QColor currentColor); signals: - void colorPicked(PredefinedColorPointer pColor); + void colorPicked(QColor pColor); + + private slots: + void openColorDialog(); private: - QMap<PredefinedColorPointer, QAction*> m_pColorActions; + void createPaletteColorsActions(const ColorPalette& colorPalette); + void createColorPickerAction(); + void selectCurrentColorAction(const QColor& currentColor) const; + + QColor m_currentColor; + QAction* m_pColorPickerAction; + QActionGroup* m_pActionGroup; + QColorDialog* m_pColorDialog; }; |