X-Git-Url: http://git.maemo.org/git/?p=colorflood;a=blobdiff_plain;f=colorflood%2Fsrc%2Fcolorscheme.cpp;h=096cd33046e9b327ebf75485bb90ca93d20b3daa;hp=62f0eeab8afe1d5ba05563f7dc035189ff63a7e6;hb=HEAD;hpb=79829f32441be520b96f26c5a689ab3f83e68890 diff --git a/colorflood/src/colorscheme.cpp b/colorflood/src/colorscheme.cpp index 62f0eea..096cd33 100644 --- a/colorflood/src/colorscheme.cpp +++ b/colorflood/src/colorscheme.cpp @@ -23,24 +23,24 @@ ColorScheme::ColorScheme () QVector s; - s << QColor(0x00, 0x00, 0xff); // blue - s << QColor(0xff, 0x00, 0x00); // red - s << QColor(0x00, 0xff, 0x00); // green - s << QColor(0xff, 0xff, 0x00); // yellow - s << QColor(0xff, 0x00, 0xff); // magenta - s << QColor(0x80, 0x00, 0x80); // purple + s << QColor(0x60, 0x60, 0xa8); + s << QColor(0xf6, 0xf6, 0x1d); + s << QColor(0x46, 0xb0, 0xe0); + s << QColor(0x7e, 0xa0, 0x20); + s << QColor(0xf0, 0x70, 0xa0); + s << QColor(0xdc, 0x4a, 0x20); /*: default color scheme name */ - schemes << QPair >(QObject::tr("Default"), s); + schemes << QPair >(QObject::tr("Default scheme"), s); s.clear(); s << QBrush(QColor(0x00, 0x00, 0x00), Qt::SolidPattern); - s << QBrush(QColor(0x33, 0x33, 0x33), Qt::Dense3Pattern); + s << QBrush(QColor(0x20, 0x20, 0x20), Qt::Dense3Pattern); s << QBrush(QColor(0x66, 0x66, 0x66), Qt::Dense1Pattern); s << QBrush(QColor(0x99, 0x99, 0x99), Qt::SolidPattern); s << QBrush(QColor(0xcc, 0xcc, 0xcc), Qt::CrossPattern); s << QBrush(QColor(0xff, 0xff, 0xff), Qt::SolidPattern); /*: black-and-white color scheme name */ - schemes << QPair >(QObject::tr("Black-and-white"), s); + schemes << QPair >(QObject::tr("Black-and-white scheme"), s); QSettings settings; currentScheme = settings.value("colorScheme", 0).toInt(); @@ -60,9 +60,14 @@ int ColorScheme::getNumSchemes () return schemes.size(); } +int ColorScheme::getNextColorScheme () +{ + return (currentScheme + 1) % schemes.size(); +} + QString ColorScheme::getSchemeName (int scheme) { - Q_ASSERT(scheme > 0 && scheme < getNumSchemes()); + Q_ASSERT(scheme >= 0 && scheme < getNumSchemes()); return schemes.at(scheme).first; }