15 #ifndef QGSCOLORBREWERPALETTE_H
16 #define QGSCOLORBREWERPALETTE_H
29 QString palette( brewerString );
31 Q_FOREACH (
const QString& entry, list )
34 if ( items.
count() != 3 || items[0] != schemeName || items[1].toInt() != colors )
37 Q_FOREACH (
const QString& clr, colors )
49 QString palette( brewerString );
51 Q_FOREACH (
const QString& entry, list )
54 if ( items.
count() != 3 )
66 QString palette( brewerString );
68 Q_FOREACH (
const QString& entry, list )
71 if ( items.
count() != 3 || items[0] != schemeName )
73 variants << items[1].toInt();
83 #endif // QGSCOLORBREWERPALETTE_H
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
bool contains(const QString &str, Qt::CaseSensitivity cs) const
static QList< QColor > listSchemeColors(const QString &schemeName, int colors)
static QList< int > listSchemeVariants(const QString &schemeName)
int count(const T &value) const
static QStringList listSchemes()
static const char * brewerString
QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries)
static QColor parseColor(const QString &colorStr, bool strictEval=false)
Attempts to parse a string as a color using a variety of common formats, including hex codes...