SARibbon 2.5.2
SARibbon wiki
载入中...
搜索中...
未找到
SAColorMenu.h
1#ifndef SACOLORMENU_H
2#define SACOLORMENU_H
3#include <QMenu>
4#include "SAColorWidgetsGlobal.h"
5class QWidgetAction;
18class SA_COLOR_WIDGETS_API SAColorMenu : public QMenu
19{
20 Q_OBJECT
21 SA_COLOR_WIDGETS_DECLARE_PRIVATE(SAColorMenu)
22public:
24 explicit SAColorMenu(QWidget* parent = nullptr);
26 explicit SAColorMenu(const QString& title, QWidget* parent = nullptr);
30 void bindToColorToolButton(SAColorToolButton* btn);
32 QWidgetAction* themeColorsPaletteAction() const;
34 QWidgetAction* getCustomColorsWidgetAction() const;
36 QAction* customColorAction() const;
38 SAColorPaletteGridWidget* colorPaletteGridWidget() const;
40 SAColorGridWidget* customColorsWidget() const;
42 void enableNoneColorAction(bool on = true);
44 QAction* noneColorAction() const;
45public Q_SLOTS:
47 void emitSelectedColor(const QColor& c);
48Q_SIGNALS:
60 void selectedColor(const QColor& c);
61private Q_SLOTS:
62 void onCustomColorActionTriggered(bool on);
63 void onNoneColorActionTriggered(bool on);
64
65private:
66 void init(const QList< QColor >& themeCls);
67};
68
69#endif // SACOLORMENU_H
Definition SAColorGridWidget.h:26
Definition SAColorMenu.h:19
void selectedColor(const QColor &c)
Definition SAColorPaletteGridWidget.h:18
这是一个只显示颜色的toolbutton
Definition SAColorToolButton.h:41