18 #ifndef QGSCOLORSCHEME_H 19 #define QGSCOLORSCHEME_H 48 ShowInColorDialog = 0x01,
49 ShowInColorButtonMenu = 0x02,
50 ShowInAllContexts = ShowInColorDialog | ShowInColorButtonMenu
56 virtual ~QgsColorScheme();
61 virtual
QString schemeName() const = 0;
66 virtual SchemeFlags flags()
const {
return ShowInColorDialog; }
102 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsColorScheme::SchemeFlags )
127 virtual QString gplFilePath() = 0;
200 static void addRecentColor(
const QColor& color );
A color scheme which contains custom colors set through QGIS app options dialog.
A color scheme which stores its colors in a gpl palette file within the "palettes" subfolder off the ...
void setName(const QString &name)
Sets the name for the scheme.
virtual SchemeFlags flags() const override
Returns the current flags for the color scheme.
A color scheme which contains project specific colors set through project properties dialog...
virtual QgsColorScheme * clone() const =0
Clones a color scheme.
virtual SchemeFlags flags() const override
Returns the current flags for the color scheme.
Abstract base class for color schemes.
QList< QPair< QColor, QString > > QgsNamedColorList
List of colors paired with a friendly display name identifying the color.
virtual bool isEditable() const override
Returns whether the color scheme is editable.
QString tr(const char *sourceText, const char *disambiguation, int n)
virtual bool isEditable() const
Returns whether the color scheme is editable.
virtual bool isEditable() const override
Returns whether the color scheme is editable.
virtual QString gplFilePath()=0
Returns the file path for the associated gpl palette file.
virtual QString schemeName() const override
Gets the name for the color scheme.
A color scheme which contains the most recently used colors.
virtual SchemeFlags flags() const override
Returns the current flags for the color scheme.
virtual QString schemeName() const =0
Gets the name for the color scheme.
virtual QgsNamedColorList fetchColors(const QString &context=QString(), const QColor &baseColor=QColor())=0
Gets a list of colors from the scheme.
SchemeFlag
Flags for controlling behaviour of color scheme.
virtual QString schemeName() const override
Gets the name for the color scheme.
virtual QString schemeName() const override
Gets the name for the color scheme.
virtual bool setColors(const QgsNamedColorList &colors, const QString &context=QString(), const QColor &baseColor=QColor())
Sets the colors for the scheme.
A color scheme which stores its colors in a gpl palette file.
virtual bool isEditable() const override
Returns whether the color scheme is editable.