aboutsummaryrefslogtreecommitdiff
path: root/settingsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'settingsdialog.cpp')
-rw-r--r--settingsdialog.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/settingsdialog.cpp b/settingsdialog.cpp
index 644fa89..52cf791 100644
--- a/settingsdialog.cpp
+++ b/settingsdialog.cpp
@@ -31,6 +31,7 @@ void SettingsDialog::loadSettings()
int defaultPeriod = database->getSetting("default_period", "2").toInt();
bool showAccountBalances = database->getSetting("show_account_balances", "0").toInt();
weekStartDay = database->getSetting("week_start_day", "1").toInt();
+ int projectionMonths = database->getSetting("projection_months", "3").toInt();
// Set UI
ui->currencyEdit->setText(currency);
@@ -39,6 +40,7 @@ void SettingsDialog::loadSettings()
ui->defaultPeriodCombo->setCurrentIndex(defaultPeriod);
ui->defaultShowAccountBalancesCheck->setChecked(showAccountBalances);
ui->weekStartDayCombo->setCurrentIndex(weekStartDay - 1);
+ ui->projectionMonthsSpin->setValue(projectionMonths);
}
void SettingsDialog::saveSettings()
@@ -50,6 +52,7 @@ void SettingsDialog::saveSettings()
database->setSetting("default_period", QString::number(ui->defaultPeriodCombo->currentIndex()));
database->setSetting("show_account_balances", QString::number(ui->defaultShowAccountBalancesCheck->isChecked() ? 1 : 0));
database->setSetting("week_start_day", QString::number(ui->weekStartDayCombo->currentIndex() + 1));
+ database->setSetting("projection_months", QString::number(ui->projectionMonthsSpin->value()));
weekStartDay = ui->weekStartDayCombo->currentIndex() + 1;
}