From: Arto Hyvättinen Date: Thu, 19 Aug 2010 18:30:19 +0000 (+0300) Subject: Added icons to time controllers X-Git-Tag: v1.9.0~100 X-Git-Url: http://git.maemo.org/git/?p=chessclock;a=commitdiff_plain;h=1ad20173b7b8553bffc043786ab75d5dfff17961 Added icons to time controllers Changed start widget's time control select list widget to list mode --- diff --git a/chessclock.qrc b/chessclock.qrc index 4391794..88cc5e6 100644 --- a/chessclock.qrc +++ b/chessclock.qrc @@ -11,5 +11,9 @@ pic/black_small.png pic/hourglass.png pic/oldclock.png + pic/addafter.png + pic/addbefore.png + pic/pauseafter.png + pic/pausebefore.png diff --git a/classes/startwidget.cpp b/classes/startwidget.cpp index a1496e4..9dda71b 100644 --- a/classes/startwidget.cpp +++ b/classes/startwidget.cpp @@ -51,10 +51,10 @@ StartWidget::StartWidget(QWidget *parent) : leftLayout->addWidget(copyLabel); modeSelect_ = new QListWidget(); - modeSelect_->setViewMode(QListView::IconMode); + modeSelect_->setViewMode(QListView::ListMode); modeSelect_->setMovement(QListView::Static); modeSelect_->setSelectionMode(QAbstractItemView::NoSelection); - modeSelect_->setIconSize(QSize(64,64 )); + modeSelect_->setIconSize(QSize(40,40 )); connect( modeSelect_, SIGNAL(itemClicked(QListWidgetItem*)),this,SLOT(selectControl(QListWidgetItem*))); diff --git a/classes/timecontrol/delayaftertimecontrol.cpp b/classes/timecontrol/delayaftertimecontrol.cpp index eafe48e..599db43 100644 --- a/classes/timecontrol/delayaftertimecontrol.cpp +++ b/classes/timecontrol/delayaftertimecontrol.cpp @@ -40,6 +40,11 @@ QString DelayAfterTimeControl::getDescription() return qApp->translate("Delay","Time up to special increment is added after turn"); } +QIcon DelayAfterTimeControl::getIcon() +{ + return QIcon(":/rc/pic/pauseafter.png"); +} + ClocksWidget* DelayAfterTimeControl::initGame(bool useLastSettings) { BasicDialog dialog(getName()); diff --git a/classes/timecontrol/delayaftertimecontrol.h b/classes/timecontrol/delayaftertimecontrol.h index ab979af..623c745 100644 --- a/classes/timecontrol/delayaftertimecontrol.h +++ b/classes/timecontrol/delayaftertimecontrol.h @@ -30,6 +30,7 @@ public: DelayAfterTimeControl(); QString getName(); + QIcon getIcon(); QString getDescription(); ClocksWidget* initGame(bool useLastSettings); }; diff --git a/classes/timecontrol/delaytimecontrol.cpp b/classes/timecontrol/delaytimecontrol.cpp index 8a0bcff..0d6a7ff 100644 --- a/classes/timecontrol/delaytimecontrol.cpp +++ b/classes/timecontrol/delaytimecontrol.cpp @@ -35,6 +35,11 @@ QString DelayTimeControl::getName() return qApp->translate("Delay","Delay"); } +QIcon DelayTimeControl::getIcon() +{ + return QIcon(":/rc/pic/pausebefore.png"); +} + QString DelayTimeControl::getDescription() { return qApp->translate("Delay","The clock waits for the delay period before starting"); diff --git a/classes/timecontrol/delaytimecontrol.h b/classes/timecontrol/delaytimecontrol.h index 2af88fa..36d9f30 100644 --- a/classes/timecontrol/delaytimecontrol.h +++ b/classes/timecontrol/delaytimecontrol.h @@ -30,6 +30,7 @@ public: DelayTimeControl(); QString getName(); + QIcon getIcon(); QString getDescription(); ClocksWidget* initGame(bool useLastSettings); }; diff --git a/classes/timecontrol/fischeraftertimecontrol.cpp b/classes/timecontrol/fischeraftertimecontrol.cpp index c1a3580..832fa5d 100644 --- a/classes/timecontrol/fischeraftertimecontrol.cpp +++ b/classes/timecontrol/fischeraftertimecontrol.cpp @@ -34,6 +34,11 @@ QString FischerAfterTimeControl::getDescription() return qApp->translate("FischerAfter","Specified time increment is added to clock after turn."); } +QIcon FischerAfterTimeControl::getIcon() +{ + return QIcon(":/rc/pic/addafter.png"); +} + ClocksWidget* FischerAfterTimeControl::initGame(bool useLastSettings) { BasicDialog dialog(getName()); diff --git a/classes/timecontrol/fischeraftertimecontrol.h b/classes/timecontrol/fischeraftertimecontrol.h index ac48fc9..a040fcc 100644 --- a/classes/timecontrol/fischeraftertimecontrol.h +++ b/classes/timecontrol/fischeraftertimecontrol.h @@ -32,6 +32,7 @@ public: QString getName() { return qApp->translate("FischerAfter","Addition after"); } QString getDescription(); + QIcon getIcon(); ClocksWidget* initGame( bool useLastSettings); }; diff --git a/classes/timecontrol/fischertimecontrol.cpp b/classes/timecontrol/fischertimecontrol.cpp index c960e4b..c085116 100644 --- a/classes/timecontrol/fischertimecontrol.cpp +++ b/classes/timecontrol/fischertimecontrol.cpp @@ -36,6 +36,11 @@ QString FischerTimeControl::getDescription() return qApp->translate("Fischer","Specified time increment is added to clock before turn."); } +QIcon FischerTimeControl::getIcon() +{ + return QIcon(":/rc/pic/addbefore.png"); +} + ClocksWidget* FischerTimeControl::initGame(bool useLastSettings) { BasicDialog dialog(getName()); diff --git a/classes/timecontrol/fischertimecontrol.h b/classes/timecontrol/fischertimecontrol.h index 5127f92..9c467cc 100644 --- a/classes/timecontrol/fischertimecontrol.h +++ b/classes/timecontrol/fischertimecontrol.h @@ -32,6 +32,7 @@ public: QString getName() { return qApp->translate("Fischer","Addition before"); } QString getDescription(); + QIcon getIcon(); ClocksWidget* initGame(bool useLastSettings); };