]> git.mxchange.org Git - flightgear.git/commitdiff
Launcher: select season.
authorJames Turner <zakalawe@mac.com>
Sat, 10 Jan 2015 14:57:59 +0000 (14:57 +0000)
committerJames Turner <zakalawe@mac.com>
Sat, 10 Jan 2015 14:57:59 +0000 (14:57 +0000)
src/GUI/Launcher.ui
src/GUI/QtLauncher.cxx

index 46060e728272f94040e781330ab215925540d00c..05ddb78b37bbbd71b47bd128b27ff4893a22932b 100644 (file)
          </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">
index 0d9eb2374ec1026bbe79819277a6d4c34c9ccd76..815939177f33447f0d566bce37b4d05f7b8604d5 100644 (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()) {