18#ifndef QGSCOLORSCHEMEREGISTRY_H
19#define QGSCOLORSCHEMEREGISTRY_H
50 void populateFromInstance();
58 void addDefaultSchemes();
64 void initStyleScheme();
72 void addUserSchemes();
95 QList<QgsColorScheme *> schemes()
const;
111 template<
class T>
void schemes( QList<T *> &schemeList )
const
114 QList<QgsColorScheme *> schemeInstanceList = schemes();
115 QList<QgsColorScheme *>::iterator schemeIt = schemeInstanceList.begin();
116 for ( ; schemeIt != schemeInstanceList.end(); ++schemeIt )
118 T *scheme =
dynamic_cast<T *
>( *schemeIt );
121 schemeList.push_back( scheme );
178 QColor fetchRandomStyleColor()
const;
182 QList< QgsColorScheme * > mColorSchemeList;
187 mutable int mNextRandomStyleColorIndex = 0;
189 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.