Rename all the settings accessor functions

Rename the settings accessor functions from Settings::getSettingsValue()
(and similar) to Settings::getValue() (and similar). The 'Settings' bit
seems a bit redundant and costs a lot of screen space.
This commit is contained in:
Martin Kleusberg
2017-03-20 23:16:52 +01:00
parent e6390b4d22
commit f1194d845e
18 changed files with 167 additions and 166 deletions

View File

@@ -17,17 +17,17 @@ PlotDock::PlotDock(QWidget* parent)
ui->treePlotColumns->setSelectionMode(QAbstractItemView::NoSelection);
// Restore state
ui->splitterForPlot->restoreState(Settings::getSettingsValue("PlotDock", "splitterSize").toByteArray());
ui->comboLineType->setCurrentIndex(Settings::getSettingsValue("PlotDock", "lineType").toInt());
ui->comboPointShape->setCurrentIndex(Settings::getSettingsValue("PlotDock", "pointShape").toInt());
ui->splitterForPlot->restoreState(Settings::getValue("PlotDock", "splitterSize").toByteArray());
ui->comboLineType->setCurrentIndex(Settings::getValue("PlotDock", "lineType").toInt());
ui->comboPointShape->setCurrentIndex(Settings::getValue("PlotDock", "pointShape").toInt());
}
PlotDock::~PlotDock()
{
// Save state
Settings::setSettingsValue("PlotDock", "splitterSize", ui->splitterForPlot->saveState());
Settings::setSettingsValue("PlotDock", "lineType", ui->comboLineType->currentIndex());
Settings::setSettingsValue("PlotDock", "pointShape", ui->comboPointShape->currentIndex());
Settings::setValue("PlotDock", "splitterSize", ui->splitterForPlot->saveState());
Settings::setValue("PlotDock", "lineType", ui->comboLineType->currentIndex());
Settings::setValue("PlotDock", "pointShape", ui->comboPointShape->currentIndex());
// Finally, delete all widgets
delete ui;