--- a/QTfrontend/ui/page/pageoptions.cpp Sun Sep 09 14:45:21 2012 +0400
+++ b/QTfrontend/ui/page/pageoptions.cpp Sun Sep 09 15:37:10 2012 +0400
@@ -403,6 +403,7 @@
QPushButton * btn = new QPushButton(this);
gbCLayout->addWidget(btn, (model->rowCount() - 1) / 3 + 1, 0, 1, 3);
btn->setText(tr("Reset to default colors"));
+ connect(btn, SIGNAL(clicked()), &DataManager::instance(), SLOT(resetColors()));
}
{
--- a/QTfrontend/util/DataManager.cpp Sun Sep 09 14:45:21 2012 +0400
+++ b/QTfrontend/util/DataManager.cpp Sun Sep 09 15:37:10 2012 +0400
@@ -207,3 +207,11 @@
m_themeModel->loadThemes();
emit updated();
}
+
+void DataManager::resetColors()
+{
+ for(int i = colorsModel()->rowCount() - 1; i >= 0; --i)
+ {
+ m_colorsModel->item(i)->setData(QColor(colors[i]));
+ }
+}
--- a/QTfrontend/util/DataManager.h Sun Sep 09 14:45:21 2012 +0400
+++ b/QTfrontend/util/DataManager.h Sun Sep 09 15:37:10 2012 +0400
@@ -133,6 +133,7 @@
public slots:
/// Reloads data from storage.
void reload();
+ void resetColors();
signals: