18#ifndef QGSCOLORSCHEMEREGISTRY_H
19#define QGSCOLORSCHEMEREGISTRY_H
96 QList<QgsColorScheme *>
schemes()
const;
112 template<
class T>
void schemes( QList<T *> &schemeList )
const
115 QList<QgsColorScheme *> schemeInstanceList =
schemes();
116 QList<QgsColorScheme *>::iterator schemeIt = schemeInstanceList.begin();
117 for ( ; schemeIt != schemeInstanceList.end(); ++schemeIt )
119 T *scheme =
dynamic_cast<T *
>( *schemeIt );
122 schemeList.push_back( scheme );
179 QColor fetchRandomStyleColor()
const;
183 QList< QgsColorScheme * > mColorSchemeList;
188 mutable int mNextRandomStyleColorIndex = 0;
190 int mNextRandomStyleColorDirection = 1;
void addDefaultSchemes()
Adds all default color schemes to this color scheme.
void addColorScheme(QgsColorScheme *scheme)
Adds a color scheme to the registry.
QList< QgsColorScheme * > schemes() const
Returns all color schemes in the registry.
void populateFromInstance()
Adds all color schemes from the global instance to this color scheme.
bool removeColorScheme(QgsColorScheme *scheme)
Removes all matching color schemes from the registry.
void initStyleScheme()
Initializes the default random style color scheme for the user.
void addUserSchemes()
Creates schemes for all gpl palettes in the user's palettes folder.
QgsColorSchemeRegistry()=default
Constructor for an empty color scheme registry.
void schemes(QList< T * > &schemeList) const
Returns color schemes of a specific type.
Abstract base class for color schemes.
SchemeFlag
Flags for controlling behavior of color scheme.
QList< QPair< QColor, QString > > QgsNamedColorList
List of colors paired with a friendly display name identifying the color.