#include <qgscolorswatchgrid.h>
|
void | colorChanged (const QColor &color) |
| Emitted when a color has been selected from the widget. More...
|
|
A color swatch grid which can be embedded into a menu.
- See also
- QgsColorSwatchGrid
- Since
- QGIS 2.5
Definition at line 189 of file qgscolorswatchgrid.h.
◆ QgsColorSwatchGridAction()
QgsColorSwatchGridAction::QgsColorSwatchGridAction |
( |
QgsColorScheme * |
scheme, |
|
|
QMenu * |
menu = nullptr , |
|
|
const QString & |
context = QString() , |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
Construct a new color swatch grid action.
- Parameters
-
scheme | QgsColorScheme for colors to show in grid |
menu | parent menu |
context | context string provided to color scheme |
parent | parent widget |
Definition at line 414 of file qgscolorswatchgrid.cpp.
◆ baseColor()
QColor QgsColorSwatchGridAction::baseColor |
( |
| ) |
const |
◆ colorChanged
void QgsColorSwatchGridAction::colorChanged |
( |
const QColor & |
color | ) |
|
|
signal |
Emitted when a color has been selected from the widget.
- Parameters
-
◆ context()
QString QgsColorSwatchGridAction::context |
( |
| ) |
const |
Gets the current context for the color grid.
- Returns
- context string which is passed to scheme for color generation
- See also
- setContext
Definition at line 442 of file qgscolorswatchgrid.cpp.
◆ dismissOnColorSelection()
bool QgsColorSwatchGridAction::dismissOnColorSelection |
( |
| ) |
const |
|
inline |
◆ refreshColors
void QgsColorSwatchGridAction::refreshColors |
( |
| ) |
|
|
slot |
◆ setBaseColor()
void QgsColorSwatchGridAction::setBaseColor |
( |
const QColor & |
baseColor | ) |
|
Sets the base color for the color grid.
- Parameters
-
baseColor | base color to pass to scheme for color generation |
- See also
- baseColor
Definition at line 432 of file qgscolorswatchgrid.cpp.
◆ setContext()
void QgsColorSwatchGridAction::setContext |
( |
const QString & |
context | ) |
|
Sets the current context for the color grid.
- Parameters
-
context | string which is passed to scheme for color generation |
- See also
- context
Definition at line 447 of file qgscolorswatchgrid.cpp.
◆ setDismissOnColorSelection()
void QgsColorSwatchGridAction::setDismissOnColorSelection |
( |
bool |
dismiss | ) |
|
|
inline |
Sets whether the parent menu should be dismissed and closed when a color is selected from the action's color widget.
- Parameters
-
dismiss | set to true (default) to immediately close the menu when a color is selected from the widget. If set to false , the colorChanged signal will be emitted but the menu will stay open. |
- See also
- dismissOnColorSelection()
- Since
- QGIS 2.14
Definition at line 241 of file qgscolorswatchgrid.h.
The documentation for this class was generated from the following files: