mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 23:00:04 +00:00 
			
		
		
		
	Add alert palette settings widget to settings dialog
This commit is contained in:
		
							parent
							
								
									6b0aaea773
								
							
						
					
					
						commit
						928b3397d2
					
				
					 2 changed files with 22 additions and 6 deletions
				
			
		|  | @ -26,6 +26,7 @@ | |||
| #include <scwx/qt/ui/wfo_dialog.hpp> | ||||
| #include <scwx/qt/ui/radar_site_dialog.hpp> | ||||
| #include <scwx/qt/ui/serial_port_dialog.hpp> | ||||
| #include <scwx/qt/ui/settings/alert_palette_settings_widget.hpp> | ||||
| #include <scwx/qt/ui/settings/hotkey_settings_widget.hpp> | ||||
| #include <scwx/qt/ui/settings/unit_settings_widget.hpp> | ||||
| #include <scwx/qt/util/color.hpp> | ||||
|  | @ -224,6 +225,7 @@ public: | |||
|       manager::PositionManager::Instance()}; | ||||
| 
 | ||||
|    std::vector<SettingsPageWidget*> settingsPages_ {}; | ||||
|    AlertPaletteSettingsWidget*      alertPaletteSettingsWidget_ {}; | ||||
|    HotkeySettingsWidget*            hotkeySettingsWidget_ {}; | ||||
|    UnitSettingsWidget*              unitSettingsWidget_ {}; | ||||
| 
 | ||||
|  | @ -807,6 +809,15 @@ void SettingsDialogImpl::SetupPalettesAlertsTab() | |||
|       settings::PaletteSettings::Instance(); | ||||
| 
 | ||||
|    // Palettes > Alerts
 | ||||
|    QVBoxLayout* layout = new QVBoxLayout(self_->ui->alertsPalette); | ||||
| 
 | ||||
|    alertPaletteSettingsWidget_ = | ||||
|       new AlertPaletteSettingsWidget(self_->ui->hotkeys); | ||||
|    layout->addWidget(alertPaletteSettingsWidget_); | ||||
| 
 | ||||
|    settingsPages_.push_back(alertPaletteSettingsWidget_); | ||||
| 
 | ||||
|    // Palettes > Old Alerts
 | ||||
|    QGridLayout* alertsLayout = | ||||
|       reinterpret_cast<QGridLayout*>(self_->ui->alertsFrame->layout()); | ||||
| 
 | ||||
|  |  | |||
|  | @ -122,7 +122,7 @@ | |||
|           </sizepolicy> | ||||
|          </property> | ||||
|          <property name="currentIndex"> | ||||
|           <number>3</number> | ||||
|           <number>0</number> | ||||
|          </property> | ||||
|          <widget class="QWidget" name="general"> | ||||
|           <layout class="QVBoxLayout" name="verticalLayout_2"> | ||||
|  | @ -136,8 +136,8 @@ | |||
|                <rect> | ||||
|                 <x>0</x> | ||||
|                 <y>0</y> | ||||
|                 <width>274</width> | ||||
|                 <height>691</height> | ||||
|                 <width>513</width> | ||||
|                 <height>622</height> | ||||
|                </rect> | ||||
|               </property> | ||||
|               <layout class="QVBoxLayout" name="verticalLayout"> | ||||
|  | @ -610,8 +610,8 @@ | |||
|                    <rect> | ||||
|                     <x>0</x> | ||||
|                     <y>0</y> | ||||
|                     <width>98</width> | ||||
|                     <height>28</height> | ||||
|                     <width>506</width> | ||||
|                     <height>383</height> | ||||
|                    </rect> | ||||
|                   </property> | ||||
|                   <layout class="QGridLayout" name="gridLayout_3"> | ||||
|  | @ -634,10 +634,15 @@ | |||
|                </item> | ||||
|               </layout> | ||||
|              </widget> | ||||
|              <widget class="QWidget" name="tab_2"> | ||||
|              <widget class="QWidget" name="alertsPalette"> | ||||
|               <attribute name="title"> | ||||
|                <string>Alerts</string> | ||||
|               </attribute> | ||||
|              </widget> | ||||
|              <widget class="QWidget" name="tab_2"> | ||||
|               <attribute name="title"> | ||||
|                <string>Old Alerts</string> | ||||
|               </attribute> | ||||
|               <layout class="QVBoxLayout" name="verticalLayout_3"> | ||||
|                <item> | ||||
|                 <widget class="QFrame" name="alertsFrame"> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat