15 #ifndef QGSCOLORSWATCHGRID_H 16 #define QGSCOLORSWATCHGRID_H 20 #include <QWidgetAction> 60 void setContext(
const QString &context );
72 void setBaseColor(
const QColor &baseColor );
90 void colorChanged(
const QColor &color );
113 bool mDrawBoxDepressed;
114 int mCurrentHoverBox;
117 int mCurrentFocusBox;
121 bool mPressedOnWidget;
126 int calculateHeight()
const;
137 int swatchForPosition(
QPoint position )
const;
142 void updateTooltip(
const int colorIdx );
147 const QPixmap &transparentBackground();
178 void setBaseColor(
const QColor &baseColor );
196 void setContext(
const QString &context );
219 void refreshColors();
226 void colorChanged(
const QColor &color );
233 bool mSuppressRecurse;
234 bool mDismissOnColorSelection;
240 void setColor(
const QColor &color );
Abstract base class for color schemes.
A grid of color swatches, which allows for user selection.
bool dismissOnColorSelection() const
Returns whether the parent menu will be dismissed after a color is selected from the action's color w...
QgsNamedColorList * colors()
Gets the list of colors shown in the grid.
QString context() const
Get the current context for the grid.
void setDismissOnColorSelection(bool dismiss)
Sets whether the parent menu should be dismissed and closed when a color is selected from the action'...
QColor baseColor() const
Get the base color for the widget.