An editable list of color swatches, taken from an associated QgsColorScheme.
More...
#include <qgscolorschemelist.h>
An editable list of color swatches, taken from an associated QgsColorScheme.
- See also
- QgsColorSchemeList
- Note
- introduced in QGIS 2.5
Definition at line 146 of file qgscolorschemelist.h.
| QgsColorSchemeList::QgsColorSchemeList |
( |
QWidget * |
parent = 0, |
|
|
QgsColorScheme * |
scheme = 0, |
|
|
const QString & |
context = QString(), |
|
|
const QColor & |
baseColor = QColor() |
|
) |
| |
Construct a new color swatch grid.
- Parameters
-
| parent | parent widget |
| scheme | QgsColorScheme for colors to show in the list |
| context | context string provided to color scheme |
| baseColor | base color for color scheme |
Definition at line 31 of file qgscolorschemelist.cpp.
| QgsColorSchemeList::~QgsColorSchemeList |
( |
| ) |
|
|
virtual |
| void QgsColorSchemeList::addColor |
( |
const QColor & |
color, |
|
|
const QString & |
label = QString() |
|
) |
| |
|
slot |
Adds a color to the list.
- Parameters
-
| color | color to add |
| label | optional label for color |
Definition at line 94 of file qgscolorschemelist.cpp.
| void QgsColorSchemeList::colorSelected |
( |
const QColor & |
color | ) |
|
|
signal |
Emitted when a color is selected from the list.
- Parameters
-
| void QgsColorSchemeList::copyColors |
( |
| ) |
|
|
slot |
| bool QgsColorSchemeList::exportColorsToGpl |
( |
QFile & |
file | ) |
|
| bool QgsColorSchemeList::importColorsFromGpl |
( |
QFile & |
file | ) |
|
| bool QgsColorSchemeList::isDirty |
( |
| ) |
const |
Returns whether the color scheme list has been modified.
- Returns
- true if colors have been modified
Definition at line 224 of file qgscolorschemelist.cpp.
| void QgsColorSchemeList::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
overrideprotected |
| void QgsColorSchemeList::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
| void QgsColorSchemeList::mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
| void QgsColorSchemeList::pasteColors |
( |
| ) |
|
|
slot |
| void QgsColorSchemeList::removeSelection |
( |
| ) |
|
|
slot |
| bool QgsColorSchemeList::saveColorsToScheme |
( |
| ) |
|
Saves the current colors shown in the list back to a color scheme, if supported by the color scheme.
- Note
- this method is only effective if the color scheme is editable
Definition at line 65 of file qgscolorschemelist.cpp.
| void QgsColorSchemeList::setScheme |
( |
QgsColorScheme * |
scheme, |
|
|
const QString & |
context = QString(), |
|
|
const QColor & |
baseColor = QColor() |
|
) |
| |
|
slot |
Sets the color scheme to show in the list.
- Parameters
-
| scheme | QgsColorScheme for colors to show in the list |
| context | context string provided to color scheme |
| baseColor | base color for color scheme |
Definition at line 59 of file qgscolorschemelist.cpp.
The documentation for this class was generated from the following files: