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(
const 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 );
202 void refreshColors();
209 void colorChanged(
const QColor &color );
216 bool mSuppressRecurse;
222 void setColor(
const QColor &color );
Abstract base class for color schemes.
A grid of color swatches, which allows for user selection.
QgsNamedColorList * colors()
Gets the list of colors shown in the grid.
QString context() const
Get the current context for the grid.
QColor baseColor() const
Get the base color for the widget.