From a350ae6be688f5fbc98dcb8657287e7116d084c3 Mon Sep 17 00:00:00 2001
From: lat9nq <lat9nq@virginia.edu>
Date: Mon, 13 Jul 2020 23:01:18 -0400
Subject: [PATCH] configure_system: Implement highlighted overrides

---
 src/yuzu/configuration/configuration_shared.h |   3 +
 src/yuzu/configuration/configure_system.cpp   | 108 +-
 src/yuzu/configuration/configure_system.ui    | 972 +++++++++---------
 3 files changed, 544 insertions(+), 539 deletions(-)

diff --git a/src/yuzu/configuration/configuration_shared.h b/src/yuzu/configuration/configuration_shared.h
index b5d6ea8c8..d3e86c3cf 100644
--- a/src/yuzu/configuration/configuration_shared.h
+++ b/src/yuzu/configuration/configuration_shared.h
@@ -36,6 +36,9 @@ struct Trackers {
     CheckState use_asynchronous_shaders;
     CheckState use_fast_gpu_time;
     CheckState force_30fps_mode;
+
+    CheckState use_rng_seed;
+    CheckState use_custom_rtc;
 } extern trackers;
 
 // Global-aware apply and set functions
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index 68e02738b..dffe357c7 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -67,21 +67,21 @@ void ConfigureSystem::SetConfiguration() {
     const auto rtc_time = Settings::values.custom_rtc.GetValue().value_or(
         std::chrono::seconds(QDateTime::currentSecsSinceEpoch()));
 
+    ui->rng_seed_checkbox->setChecked(Settings::values.rng_seed.GetValue().has_value());
+    ui->rng_seed_edit->setEnabled(Settings::values.rng_seed.GetValue().has_value() &&
+                                  Settings::values.rng_seed.UsingGlobal());
+    ui->rng_seed_edit->setText(rng_seed);
+
+    ui->custom_rtc_checkbox->setChecked(Settings::values.custom_rtc.GetValue().has_value());
+    ui->custom_rtc_edit->setEnabled(Settings::values.custom_rtc.GetValue().has_value() &&
+                                    Settings::values.rng_seed.UsingGlobal());
+    ui->custom_rtc_edit->setDateTime(QDateTime::fromSecsSinceEpoch(rtc_time.count()));
+
     if (Settings::configuring_global) {
         ui->combo_language->setCurrentIndex(Settings::values.language_index.GetValue());
         ui->combo_region->setCurrentIndex(Settings::values.region_index.GetValue());
         ui->combo_time_zone->setCurrentIndex(Settings::values.time_zone_index.GetValue());
         ui->combo_sound->setCurrentIndex(Settings::values.sound_index.GetValue());
-
-        ui->rng_seed_checkbox->setChecked(Settings::values.rng_seed.GetValue().has_value());
-        ui->rng_seed_edit->setEnabled(Settings::values.rng_seed.GetValue().has_value() &&
-                                      Settings::values.rng_seed.UsingGlobal());
-        ui->rng_seed_edit->setText(rng_seed);
-
-        ui->custom_rtc_checkbox->setChecked(Settings::values.custom_rtc.GetValue().has_value());
-        ui->custom_rtc_edit->setEnabled(Settings::values.custom_rtc.GetValue().has_value() &&
-                                        Settings::values.rng_seed.UsingGlobal());
-        ui->custom_rtc_edit->setDateTime(QDateTime::fromSecsSinceEpoch(rtc_time.count()));
     } else {
         ConfigurationShared::SetPerGameSetting(ui->combo_language,
                                                &Settings::values.language_index);
@@ -89,28 +89,6 @@ void ConfigureSystem::SetConfiguration() {
         ConfigurationShared::SetPerGameSetting(ui->combo_time_zone,
                                                &Settings::values.time_zone_index);
         ConfigurationShared::SetPerGameSetting(ui->combo_sound, &Settings::values.sound_index);
-
-        if (Settings::values.rng_seed.UsingGlobal()) {
-            ui->rng_seed_checkbox->setCheckState(Qt::PartiallyChecked);
-        } else {
-            ui->rng_seed_checkbox->setCheckState(
-                Settings::values.rng_seed.GetValue().has_value() ? Qt::Checked : Qt::Unchecked);
-            ui->rng_seed_edit->setEnabled(Settings::values.rng_seed.GetValue().has_value());
-            if (Settings::values.rng_seed.GetValue().has_value()) {
-                ui->rng_seed_edit->setText(rng_seed);
-            }
-        }
-
-        if (Settings::values.custom_rtc.UsingGlobal()) {
-            ui->custom_rtc_checkbox->setCheckState(Qt::PartiallyChecked);
-        } else {
-            ui->custom_rtc_checkbox->setCheckState(
-                Settings::values.custom_rtc.GetValue().has_value() ? Qt::Checked : Qt::Unchecked);
-            ui->custom_rtc_edit->setEnabled(Settings::values.custom_rtc.GetValue().has_value());
-            if (Settings::values.custom_rtc.GetValue().has_value()) {
-                ui->custom_rtc_edit->setDateTime(QDateTime::fromSecsSinceEpoch(rtc_time.count()));
-            }
-        }
     }
 }
 
@@ -161,37 +139,42 @@ void ConfigureSystem::ApplyConfiguration() {
                                                  ui->combo_time_zone);
         ConfigurationShared::ApplyPerGameSetting(&Settings::values.sound_index, ui->combo_sound);
 
-        switch (ui->rng_seed_checkbox->checkState()) {
-        case Qt::Checked:
+        switch (ConfigurationShared::trackers.use_rng_seed) {
+        case ConfigurationShared::CheckState::On:
+        case ConfigurationShared::CheckState::Off:
             Settings::values.rng_seed.SetGlobal(false);
-            Settings::values.rng_seed.SetValue(ui->rng_seed_edit->text().toULongLong(nullptr, 16));
+            if (ui->rng_seed_checkbox->isChecked()) {
+                Settings::values.rng_seed.SetValue(
+                    ui->rng_seed_edit->text().toULongLong(nullptr, 16));
+            } else {
+                Settings::values.rng_seed.SetValue(std::nullopt);
+            }
             break;
-        case Qt::Unchecked:
-            Settings::values.rng_seed.SetGlobal(false);
-            Settings::values.rng_seed.SetValue(std::nullopt);
-            break;
-        case Qt::PartiallyChecked:
+        case ConfigurationShared::CheckState::Global:
             Settings::values.rng_seed.SetGlobal(false);
             Settings::values.rng_seed.SetValue(std::nullopt);
             Settings::values.rng_seed.SetGlobal(true);
             break;
+        case ConfigurationShared::CheckState::Count:;
         }
 
-        switch (ui->custom_rtc_checkbox->checkState()) {
-        case Qt::Checked:
+        switch (ConfigurationShared::trackers.use_custom_rtc) {
+        case ConfigurationShared::CheckState::On:
+        case ConfigurationShared::CheckState::Off:
             Settings::values.custom_rtc.SetGlobal(false);
-            Settings::values.custom_rtc.SetValue(
-                std::chrono::seconds(ui->custom_rtc_edit->dateTime().toSecsSinceEpoch()));
+            if (ui->custom_rtc_checkbox->isChecked()) {
+                Settings::values.custom_rtc.SetValue(
+                    std::chrono::seconds(ui->custom_rtc_edit->dateTime().toSecsSinceEpoch()));
+            } else {
+                Settings::values.custom_rtc.SetValue(std::nullopt);
+            }
             break;
-        case Qt::Unchecked:
-            Settings::values.custom_rtc.SetGlobal(false);
-            Settings::values.custom_rtc.SetValue(std::nullopt);
-            break;
-        case Qt::PartiallyChecked:
+        case ConfigurationShared::CheckState::Global:
             Settings::values.custom_rtc.SetGlobal(false);
             Settings::values.custom_rtc.SetValue(std::nullopt);
             Settings::values.custom_rtc.SetGlobal(true);
             break;
+        case ConfigurationShared::CheckState::Count:;
         }
     }
 
@@ -229,10 +212,25 @@ void ConfigureSystem::SetupPerGameUI() {
         return;
     }
 
-    ConfigurationShared::InsertGlobalItem(ui->combo_language);
-    ConfigurationShared::InsertGlobalItem(ui->combo_region);
-    ConfigurationShared::InsertGlobalItem(ui->combo_time_zone);
-    ConfigurationShared::InsertGlobalItem(ui->combo_sound);
-    ui->rng_seed_checkbox->setTristate(true);
-    ui->custom_rtc_checkbox->setTristate(true);
+    ConfigurationShared::SetColoredComboBox(ui->combo_language, ui->label_language,
+                                            "label_language",
+                                            Settings::values.language_index.GetValue(true));
+    ConfigurationShared::SetColoredComboBox(ui->combo_region, ui->label_region, "label_region",
+                                            Settings::values.region_index.GetValue(true));
+    ConfigurationShared::SetColoredComboBox(ui->combo_time_zone, ui->label_timezone,
+                                            "label_timezone",
+                                            Settings::values.time_zone_index.GetValue(true));
+    ConfigurationShared::SetColoredComboBox(ui->combo_sound, ui->label_sound, "label_sound",
+                                            Settings::values.sound_index.GetValue(true));
+
+    ConfigurationShared::SetColoredTristate(ui->rng_seed_checkbox, "rng_seed_checkbox",
+                                            Settings::values.rng_seed.UsingGlobal(),
+                                            Settings::values.rng_seed.GetValue().has_value(),
+                                            Settings::values.rng_seed.GetValue(true).has_value(),
+                                            ConfigurationShared::trackers.use_rng_seed);
+    ConfigurationShared::SetColoredTristate(ui->custom_rtc_checkbox, "custom_rtc_checkbox",
+                                            Settings::values.custom_rtc.UsingGlobal(),
+                                            Settings::values.custom_rtc.GetValue().has_value(),
+                                            Settings::values.custom_rtc.GetValue(true).has_value(),
+                                            ConfigurationShared::trackers.use_custom_rtc);
 }
diff --git a/src/yuzu/configuration/configure_system.ui b/src/yuzu/configuration/configure_system.ui
index 9c8cca6dc..53b95658b 100644
--- a/src/yuzu/configuration/configure_system.ui
+++ b/src/yuzu/configuration/configure_system.ui
@@ -21,490 +21,494 @@
        <property name="title">
         <string>System Settings</string>
        </property>
-       <layout class="QGridLayout" name="gridLayout">
-        <item row="3" column="0">
-         <widget class="QLabel" name="label_sound">
-          <property name="text">
-           <string>Sound output mode</string>
-          </property>
-         </widget>
-        </item>
-        <item row="4" column="0">
-         <widget class="QLabel" name="label_console_id">
-          <property name="text">
-           <string>Console ID:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QComboBox" name="combo_language">
-          <property name="toolTip">
-           <string>Note: this can be overridden when region setting is auto-select</string>
-          </property>
-          <item>
-           <property name="text">
-            <string>Japanese (日本語)</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>English</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>French (français)</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>German (Deutsch)</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Italian (italiano)</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Spanish (español)</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Chinese</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Korean (한국어)</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Dutch (Nederlands)</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Portuguese (português)</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Russian (Русский)</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Taiwanese</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>British English</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Canadian French</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Latin American Spanish</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Simplified Chinese</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Traditional Chinese (正體中文)</string>
-           </property>
-          </item>
-         </widget>
-        </item>
-        <item row="1" column="0">
-         <widget class="QLabel" name="label_region">
-          <property name="text">
-           <string>Region:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1">
-         <widget class="QComboBox" name="combo_region">
-          <item>
-           <property name="text">
-            <string>Japan</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>USA</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Europe</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Australia</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>China</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Korea</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Taiwan</string>
-           </property>
-          </item>
-         </widget>
-        </item>
-        <item row="2" column="0">
-         <widget class="QLabel" name="label_timezone">
-          <property name="text">
-           <string>Time Zone:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="1">
-         <widget class="QComboBox" name="combo_time_zone">
-          <item>
-           <property name="text">
-            <string>Auto</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Default</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>CET</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>CST6CDT</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Cuba</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>EET</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Egypt</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Eire</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>EST</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>EST5EDT</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>GB</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>GB-Eire</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>GMT</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>GMT+0</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>GMT-0</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>GMT0</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Greenwich</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Hongkong</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>HST</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Iceland</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Iran</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Israel</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Jamaica</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Japan</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Kwajalein</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Libya</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>MET</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>MST</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>MST7MDT</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Navajo</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>NZ</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>NZ-CHAT</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Poland</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Portugal</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>PRC</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>PST8PDT</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>ROC</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>ROK</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Singapore</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Turkey</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>UCT</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Universal</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>UTC</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>W-SU</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>WET</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Zulu</string>
-           </property>
-          </item>
-         </widget>
-        </item>
-        <item row="6" column="0">
-         <widget class="QCheckBox" name="rng_seed_checkbox">
-          <property name="text">
-           <string>RNG Seed</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="1">
-         <widget class="QComboBox" name="combo_sound">
-          <item>
-           <property name="text">
-            <string>Mono</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Stereo</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>Surround</string>
-           </property>
-          </item>
-         </widget>
-        </item>
-        <item row="0" column="0">
-         <widget class="QLabel" name="label_language">
-          <property name="text">
-           <string>Language</string>
-          </property>
-         </widget>
-        </item>
-        <item row="4" column="1">
-         <widget class="QPushButton" name="button_regenerate_console_id">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="layoutDirection">
-           <enum>Qt::RightToLeft</enum>
-          </property>
-          <property name="text">
-           <string>Regenerate</string>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="0">
-         <widget class="QCheckBox" name="custom_rtc_checkbox">
-          <property name="text">
-           <string>Custom RTC</string>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="1">
-         <widget class="QDateTimeEdit" name="custom_rtc_edit">
-          <property name="minimumDate">
-           <date>
-            <year>1970</year>
-            <month>1</month>
-            <day>1</day>
-           </date>
-          </property>
-          <property name="displayFormat">
-           <string>d MMM yyyy h:mm:ss AP</string>
-          </property>
-         </widget>
-        </item>
-        <item row="6" column="1">
-         <widget class="QLineEdit" name="rng_seed_edit">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="font">
-           <font>
-            <family>Lucida Console</family>
-           </font>
-          </property>
-          <property name="inputMask">
-           <string notr="true">HHHHHHHH</string>
-          </property>
-          <property name="maxLength">
-           <number>8</number>
-          </property>
-         </widget>
+       <layout class="QVBoxLayout" name="verticalLayout_2">
+        <item>
+         <layout class="QGridLayout" name="gridLayout_2">
+          <item row="1" column="0">
+           <widget class="QLabel" name="label_region">
+            <property name="text">
+             <string>Region:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="1">
+           <widget class="QComboBox" name="combo_time_zone">
+            <item>
+             <property name="text">
+              <string>Auto</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Default</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>CET</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>CST6CDT</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Cuba</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>EET</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Egypt</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Eire</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>EST</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>EST5EDT</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>GB</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>GB-Eire</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>GMT</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>GMT+0</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>GMT-0</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>GMT0</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Greenwich</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Hongkong</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>HST</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Iceland</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Iran</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Israel</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Jamaica</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Japan</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Kwajalein</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Libya</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>MET</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>MST</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>MST7MDT</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Navajo</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>NZ</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>NZ-CHAT</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Poland</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Portugal</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>PRC</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>PST8PDT</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>ROC</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>ROK</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Singapore</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Turkey</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>UCT</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Universal</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>UTC</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>W-SU</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>WET</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Zulu</string>
+             </property>
+            </item>
+           </widget>
+          </item>
+          <item row="1" column="1">
+           <widget class="QComboBox" name="combo_region">
+            <item>
+             <property name="text">
+              <string>Japan</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>USA</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Europe</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Australia</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>China</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Korea</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Taiwan</string>
+             </property>
+            </item>
+           </widget>
+          </item>
+          <item row="2" column="0">
+           <widget class="QLabel" name="label_timezone">
+            <property name="text">
+             <string>Time Zone:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QComboBox" name="combo_language">
+            <property name="toolTip">
+             <string>Note: this can be overridden when region setting is auto-select</string>
+            </property>
+            <item>
+             <property name="text">
+              <string>Japanese (日本語)</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>English</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>French (français)</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>German (Deutsch)</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Italian (italiano)</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Spanish (español)</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Chinese</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Korean (한국어)</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Dutch (Nederlands)</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Portuguese (português)</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Russian (Русский)</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Taiwanese</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>British English</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Canadian French</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Latin American Spanish</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Simplified Chinese</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Traditional Chinese (正體中文)</string>
+             </property>
+            </item>
+           </widget>
+          </item>
+          <item row="5" column="0">
+           <widget class="QCheckBox" name="custom_rtc_checkbox">
+            <property name="text">
+             <string>Custom RTC</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="0">
+           <widget class="QLabel" name="label_language">
+            <property name="text">
+             <string>Language</string>
+            </property>
+           </widget>
+          </item>
+          <item row="6" column="0">
+           <widget class="QCheckBox" name="rng_seed_checkbox">
+            <property name="text">
+             <string>RNG Seed</string>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="1">
+           <widget class="QComboBox" name="combo_sound">
+            <item>
+             <property name="text">
+              <string>Mono</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Stereo</string>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Surround</string>
+             </property>
+            </item>
+           </widget>
+          </item>
+          <item row="4" column="0">
+           <widget class="QLabel" name="label_console_id">
+            <property name="text">
+             <string>Console ID:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="0">
+           <widget class="QLabel" name="label_sound">
+            <property name="text">
+             <string>Sound output mode</string>
+            </property>
+           </widget>
+          </item>
+          <item row="5" column="1">
+           <widget class="QDateTimeEdit" name="custom_rtc_edit">
+            <property name="minimumDate">
+             <date>
+              <year>1970</year>
+              <month>1</month>
+              <day>1</day>
+             </date>
+            </property>
+            <property name="displayFormat">
+             <string>d MMM yyyy h:mm:ss AP</string>
+            </property>
+           </widget>
+          </item>
+          <item row="6" column="1">
+           <widget class="QLineEdit" name="rng_seed_edit">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="font">
+             <font>
+              <family>Lucida Console</family>
+             </font>
+            </property>
+            <property name="inputMask">
+             <string notr="true">HHHHHHHH</string>
+            </property>
+            <property name="maxLength">
+             <number>8</number>
+            </property>
+           </widget>
+          </item>
+          <item row="4" column="1">
+           <widget class="QPushButton" name="button_regenerate_console_id">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="layoutDirection">
+             <enum>Qt::RightToLeft</enum>
+            </property>
+            <property name="text">
+             <string>Regenerate</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
         </item>
        </layout>
       </widget>