18 #ifndef QGSCOLORSCHEMEREGISTRY_H
19 #define QGSCOLORSCHEMEREGISTRY_H
21 #include "qgis_core.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 )
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.
void schemes(QList< T * > &schemeList)
Returns color schemes of a specific type.
QgsColorSchemeRegistry()=default
Constructor for an empty color scheme registry.
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.