QGIS API Documentation
2.6.0-Brighton
|
Registry of color schemes. More...
#include <qgscolorschemeregistry.h>
Public Member Functions | |
QgsColorSchemeRegistry () | |
Constructor for an empty color scheme registry. | |
virtual | ~QgsColorSchemeRegistry () |
void | populateFromInstance () |
Adds all color schemes from the global instance to this color scheme. | |
void | addDefaultSchemes () |
Adds all default color schemes to this color scheme. | |
void | addUserSchemes () |
Creates schemes for all gpl palettes in the user's palettes folder. | |
void | addColorScheme (QgsColorScheme *scheme) |
Adds a color scheme to the registry. | |
bool | removeColorScheme (QgsColorScheme *scheme) |
Removes all matching color schemes from the registry. | |
QList< QgsColorScheme * > | schemes () const |
Returns all color schemes in the registry. | |
QList< QgsColorScheme * > | schemes (const QgsColorScheme::SchemeFlag flag) const |
Returns all color schemes in the registry which have a specified flag set. | |
template<class T > | |
void | schemes (QList< T * > &schemeList) |
Return color schemes of a specific type. |
Static Public Member Functions | |
static QgsColorSchemeRegistry * | instance () |
Returns the global instance pointer, creating the object on the first call. |
Registry of color schemes.
A registry of QgsColorScheme color schemes. This class can be created directly, or accessed via a global instance.
QgsColorSchemeRegistry::QgsColorSchemeRegistry | ( | ) |
Constructor for an empty color scheme registry.
|
virtual |
void QgsColorSchemeRegistry::addColorScheme | ( | QgsColorScheme * | scheme | ) |
Adds a color scheme to the registry.
Ownership of the scheme is transferred to the registry.
scheme | color scheme to add |
void QgsColorSchemeRegistry::addDefaultSchemes | ( | ) |
Adds all default color schemes to this color scheme.
void QgsColorSchemeRegistry::addUserSchemes | ( | ) |
Creates schemes for all gpl palettes in the user's palettes folder.
|
static |
Returns the global instance pointer, creating the object on the first call.
void QgsColorSchemeRegistry::populateFromInstance | ( | ) |
Adds all color schemes from the global instance to this color scheme.
bool QgsColorSchemeRegistry::removeColorScheme | ( | QgsColorScheme * | scheme | ) |
Removes all matching color schemes from the registry.
scheme | color scheme to remove |
QList< QgsColorScheme * > QgsColorSchemeRegistry::schemes | ( | ) | const |
Returns all color schemes in the registry.
QList< QgsColorScheme * > QgsColorSchemeRegistry::schemes | ( | const QgsColorScheme::SchemeFlag | flag | ) | const |
Returns all color schemes in the registry which have a specified flag set.
flag | flag to match |
void QgsColorSchemeRegistry::schemes | ( | QList< T * > & | schemeList | ) |
Return color schemes of a specific type.
schemeList | destination list for matching schemes |