15 #ifndef QGSCOLORBREWERPALETTE_H
16 #define QGSCOLORBREWERPALETTE_H
26 static QList<QColor> listSchemeColors( QString schemeName,
int colors )
29 QString palette( brewerString );
30 QStringList list = palette.split( QChar(
'\n' ) );
31 foreach ( QString entry, list )
33 QStringList items = entry.split( QChar(
'-' ) );
34 if ( items.count() != 3 || items[0] != schemeName || items[1].toInt() != colors )
36 QStringList colors = items[2].split( QChar(
' ' ) );
37 foreach ( QString clr, colors )
45 static QStringList listSchemes()
49 QString palette( brewerString );
50 QStringList list = palette.split( QChar(
'\n' ) );
51 foreach ( QString entry, list )
53 QStringList items = entry.split( QChar(
'-' ) );
54 if ( items.count() != 3 )
56 if ( !schemes.contains( items[0] ) )
62 static QList<int> listSchemeVariants( QString schemeName )
66 QString palette( brewerString );
67 QStringList list = palette.split( QChar(
'\n' ) );
68 foreach ( QString entry, list )
70 QStringList items = entry.split( QChar(
'-' ) );
71 if ( items.count() != 3 || items[0] != schemeName )
73 variants << items[1].toInt();
83 #endif // QGSCOLORBREWERPALETTE_H