18#ifndef QGSCOLORSCHEMEREGISTRY_H
19#define QGSCOLORSCHEMEREGISTRY_H
51 void populateFromInstance();
59 void addDefaultSchemes();
65 void initStyleScheme();
73 void addUserSchemes();
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;
Registry of color schemes.
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.