1
0
Fork 0

Launcher: select season.

This commit is contained in:
James Turner 2015-01-10 14:57:59 +00:00
parent ce10b4c8f1
commit 8bfb63e4ed
2 changed files with 38 additions and 0 deletions

View file

@ -432,6 +432,31 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Season:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="seasonCombo">
<item>
<property name="text">
<string>Summer</string>
</property>
</item>
<item>
<property name="text">
<string>Winter</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="msaaCheckbox">
<property name="text">

View file

@ -654,6 +654,8 @@ QtLauncher::QtLauncher() :
connect(m_ui->timeOfDayCombo, SIGNAL(currentIndexChanged(int)),
this, SLOT(updateSettingsSummary()));
connect(m_ui->seasonCombo, SIGNAL(currentIndexChanged(int)),
this, SLOT(updateSettingsSummary()));
connect(m_ui->fetchRealWxrCheckbox, SIGNAL(toggled(bool)),
this, SLOT(updateSettingsSummary()));
connect(m_ui->rembrandtCheckbox, SIGNAL(toggled(bool)),
@ -712,6 +714,7 @@ void QtLauncher::restoreSettings()
m_ui->fetchRealWxrCheckbox->setChecked(settings.value("enable-realwx", true).toBool());
m_ui->startPausedCheck->setChecked(settings.value("start-paused", false).toBool());
m_ui->timeOfDayCombo->setCurrentIndex(settings.value("timeofday", 0).toInt());
m_ui->seasonCombo->setCurrentIndex(settings.value("season", 0).toInt());
// full paths to -set.xml files
m_recentAircraft = settings.value("recent-aircraft").toStringList();
@ -758,6 +761,7 @@ void QtLauncher::saveSettings()
settings.setValue("recent-aircraft", m_recentAircraft);
settings.setValue("recent-airports", m_recentAirports);
settings.setValue("timeofday", m_ui->timeOfDayCombo->currentIndex());
settings.setValue("season", m_ui->seasonCombo->currentIndex());
QStringList paths;
for (int i=0; i<m_ui->sceneryPathsList->count(); ++i) {
@ -843,6 +847,11 @@ void QtLauncher::onRun()
opt->addOption("timeofday", dayval.toStdString());
}
if (m_ui->seasonCombo->currentIndex() != 0) {
QString dayval = m_ui->timeOfDayCombo->currentText().toLower();
opt->addOption("season", dayval.toStdString());
}
// scenery paths
for (int i=0; i<m_ui->sceneryPathsList->count(); ++i) {
QString path = m_ui->sceneryPathsList->item(i)->text();
@ -1125,6 +1134,10 @@ void QtLauncher::updateSettingsSummary()
summary.append(QString(m_ui->timeOfDayCombo->currentText().toLower()));
}
if (m_ui->seasonCombo->currentIndex() > 0) {
summary.append(QString(m_ui->seasonCombo->currentText().toLower()));
}
if (m_ui->rembrandtCheckbox->isChecked()) {
summary.append("Rembrandt enabled");
} else if (m_ui->msaaCheckbox->isChecked()) {