X-Git-Url: http://git.maemo.org/git/?p=colorflood;a=blobdiff_plain;f=colorflood%2Fsrc%2Fcolorscheme.cpp;h=096cd33046e9b327ebf75485bb90ca93d20b3daa;hp=c7cd4bed449eaf5d088383863786d36d925d623b;hb=c9371ba06d07bf654792588bd008af0efe940dc0;hpb=b6713e570a22f49f296f28095a541c802a31ed14 diff --git a/colorflood/src/colorscheme.cpp b/colorflood/src/colorscheme.cpp index c7cd4be..096cd33 100644 --- a/colorflood/src/colorscheme.cpp +++ b/colorflood/src/colorscheme.cpp @@ -23,22 +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 - schemes << QPair >(QObject::tr("Default"), s); + 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 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); - schemes << QPair >(QObject::tr("Black-and-white"), s); + /*: black-and-white color scheme name */ + schemes << QPair >(QObject::tr("Black-and-white scheme"), s); QSettings settings; currentScheme = settings.value("colorScheme", 0).toInt(); @@ -58,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; }