| QGIS API Documentation
    3.16.0-Hannover (43b64b13f3)
    | 
A custom QGIS widget for selecting a color, including options for selecting colors via hue wheel, color swatches, and a color sampler. More...
#include <qgscompoundcolorwidget.h>

| Public Types | |
| enum | Layout { LayoutDefault = 0, LayoutVertical } | 
| Widget layout.  More... | |
| Public Slots | |
| void | setColor (const QColor &color) | 
| Sets the current color for the dialog.  More... | |
| void | setPreviousColor (const QColor &color) | 
| Sets the color to show in an optional "previous color" section.  More... | |
|  Public Slots inherited from QgsPanelWidget | |
| void | acceptPanel () | 
| Accept the panel.  More... | |
| void | openPanel (QgsPanelWidget *panel) | 
| Open a panel or dialog depending on dock mode setting If dock mode is truethis method will emit the showPanel signal for connected slots to handle the open event.  More... | |
| Signals | |
| void | currentColorChanged (const QColor &color) | 
| Emitted when the dialog's color changes.  More... | |
|  Signals inherited from QgsPanelWidget | |
| void | panelAccepted (QgsPanelWidget *panel) | 
| Emitted when the panel is accepted by the user.  More... | |
| void | showPanel (QgsPanelWidget *panel) | 
| Emit when you require a panel to be show in the interface.  More... | |
| void | widgetChanged () | 
| Emitted when the widget state changes.  More... | |
| Public Member Functions | |
| QgsCompoundColorWidget (QWidget *parent=nullptr, const QColor &color=QColor(), Layout layout=LayoutDefault) | |
| Constructor for QgsCompoundColorWidget.  More... | |
| ~QgsCompoundColorWidget () override | |
| QColor | color () const | 
| Returns the current color for the dialog.  More... | |
| void | setAllowOpacity (bool allowOpacity) | 
| Sets whether opacity modification (transparency) is permitted for the color dialog.  More... | |
| void | setDiscarded (bool discarded) | 
| Sets whether the widget's color has been "discarded" and the selected color should not be stored in the recent color list.  More... | |
|  Public Member Functions inherited from QgsPanelWidget | |
| QgsPanelWidget (QWidget *parent=nullptr) | |
| Base class for any widget that can be shown as a inline panel.  More... | |
| bool | autoDelete () | 
| The the auto delete property on the widget.  More... | |
| void | connectChildPanel (QgsPanelWidget *panel) | 
| Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user.  More... | |
| void | connectChildPanels (const QList< QgsPanelWidget * > &panels) | 
| Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user.  More... | |
| bool | dockMode () | 
| Returns the dock mode state.  More... | |
| virtual QMenu * | menuButtonMenu () | 
| Returns the menu to use for the menu button for this panel, or nullptrif no menu button is required.  More... | |
| virtual QString | menuButtonTooltip () const | 
| Returns the (translated) tooltip text to use for the menu button for this panel.  More... | |
| QString | panelTitle () | 
| The title of the panel.  More... | |
| void | setAutoDelete (bool autoDelete) | 
| The the auto delete property on the widget.  More... | |
| virtual void | setDockMode (bool dockMode) | 
| Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.  More... | |
| void | setPanelTitle (const QString &panelTitle) | 
| Set the title of the panel when shown in the interface.  More... | |
| Static Public Member Functions | |
| static QgsUserColorScheme * | createNewUserPalette (QWidget *parent) | 
| Triggers a user prompt for creating a new user color scheme.  More... | |
| static QgsUserColorScheme * | importUserPaletteFromFile (QWidget *parent) | 
| Triggers a user prompt for importing a new color scheme from an existing GPL file.  More... | |
| static bool | removeUserPalette (QgsUserColorScheme *scheme, QWidget *parent) | 
| Triggers a user prompt for removing an existing user color scheme.  More... | |
|  Static Public Member Functions inherited from QgsPanelWidget | |
| static QgsPanelWidget * | findParentPanel (QWidget *widget) | 
| Traces through the parents of a widget to find if it is contained within a QgsPanelWidget widget.  More... | |
| Protected Member Functions | |
| void | hideEvent (QHideEvent *e) override | 
| void | keyPressEvent (QKeyEvent *e) override | 
| void | mouseMoveEvent (QMouseEvent *e) override | 
| void | mousePressEvent (QMouseEvent *e) override | 
| void | mouseReleaseEvent (QMouseEvent *e) override | 
|  Protected Member Functions inherited from QgsPanelWidget | |
| void | keyPressEvent (QKeyEvent *event) override | 
| Overridden key press event to handle the esc event on the widget.  More... | |
A custom QGIS widget for selecting a color, including options for selecting colors via hue wheel, color swatches, and a color sampler.
Definition at line 33 of file qgscompoundcolorwidget.h.
Widget layout.
| Enumerator | |
|---|---|
| LayoutDefault | Use the default (rectangular) layout. | 
| LayoutVertical | Use a narrower, vertically stacked layout. | 
Definition at line 41 of file qgscompoundcolorwidget.h.
| QgsCompoundColorWidget::QgsCompoundColorWidget | ( | QWidget * | parent = nullptr, | 
| const QColor & | color = QColor(), | ||
| Layout | layout = LayoutDefault | ||
| ) | 
Constructor for QgsCompoundColorWidget.
| parent | parent widget | 
| color | initial color for dialog | 
| layout | widget layout to use | 
Definition at line 35 of file qgscompoundcolorwidget.cpp.
| 
 | override | 
Definition at line 292 of file qgscompoundcolorwidget.cpp.
| QColor QgsCompoundColorWidget::color | ( | ) | const | 
Returns the current color for the dialog.
Definition at line 300 of file qgscompoundcolorwidget.cpp.
| 
 | static | 
Triggers a user prompt for creating a new user color scheme.
The parent argument must be set to a valid parent widget for the dialog prompts.
Definition at line 440 of file qgscompoundcolorwidget.cpp.
| 
 | signal | 
Emitted when the dialog's color changes.
| color | current color | 
| 
 | overrideprotected | 
Definition at line 742 of file qgscompoundcolorwidget.cpp.
| 
 | static | 
Triggers a user prompt for importing a new color scheme from an existing GPL file.
The parent argument must be set to a valid parent widget for the dialog prompts.
Definition at line 333 of file qgscompoundcolorwidget.cpp.
| 
 | overrideprotected | 
Definition at line 836 of file qgscompoundcolorwidget.cpp.
| 
 | overrideprotected | 
Definition at line 807 of file qgscompoundcolorwidget.cpp.
| 
 | overrideprotected | 
Definition at line 748 of file qgscompoundcolorwidget.cpp.
| 
 | overrideprotected | 
Definition at line 823 of file qgscompoundcolorwidget.cpp.
| 
 | static | 
Triggers a user prompt for removing an existing user color scheme.
The parent argument must be set to a valid parent widget for the dialog prompts.
Definition at line 393 of file qgscompoundcolorwidget.cpp.
| void QgsCompoundColorWidget::setAllowOpacity | ( | bool | allowOpacity | ) | 
Sets whether opacity modification (transparency) is permitted for the color dialog.
Defaults to true. 
| allowOpacity | set to falseto disable opacity modification | 
Definition at line 307 of file qgscompoundcolorwidget.cpp.
| 
 | slot | 
Sets the current color for the dialog.
| color | desired color | 
Definition at line 708 of file qgscompoundcolorwidget.cpp.
| 
 | inline | 
Sets whether the widget's color has been "discarded" and the selected color should not be stored in the recent color list.
| discarded | set to trueto avoid adding color to recent color list on widget destruction. | 
Definition at line 77 of file qgscompoundcolorwidget.h.
| 
 | slot | 
Sets the color to show in an optional "previous color" section.
| color | previous color | 
Definition at line 736 of file qgscompoundcolorwidget.cpp.