18#ifndef QGSCOLORSCHEMEREGISTRY_H
19#define QGSCOLORSCHEMEREGISTRY_H
94 QList<QgsColorScheme *>
schemes()
const;
110 template<
class T>
void schemes( QList<T *> &schemeList )
const
113 QList<QgsColorScheme *> schemeInstanceList =
schemes();
114 QList<QgsColorScheme *>::iterator schemeIt = schemeInstanceList.begin();
115 for ( ; schemeIt != schemeInstanceList.end(); ++schemeIt )
117 T *scheme =
dynamic_cast<T *
>( *schemeIt );
120 schemeList.push_back( scheme );
177 QColor fetchRandomStyleColor()
const;
180 QList< QgsColorScheme * > mColorSchemeList;
185 mutable int mNextRandomStyleColorIndex = 0;
187 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.