mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:50:06 +00:00 
			
		
		
		
	added inital radar site based alerts (only default radar site)
This commit is contained in:
		
							parent
							
								
									2bc971eb94
								
							
						
					
					
						commit
						dea53bddb4
					
				
					 7 changed files with 197 additions and 128 deletions
				
			
		|  | @ -134,6 +134,7 @@ public: | |||
|           &alertAudioLocationMethod_, | ||||
|           &alertAudioLatitude_, | ||||
|           &alertAudioLongitude_, | ||||
|           &alertAudioRadius_, | ||||
|           &alertAudioCounty_, | ||||
|           &hoverTextWrap_, | ||||
|           &tooltipMethod_, | ||||
|  | @ -252,6 +253,7 @@ public: | |||
|    settings::SettingsInterface<std::string> alertAudioLocationMethod_ {}; | ||||
|    settings::SettingsInterface<double>      alertAudioLatitude_ {}; | ||||
|    settings::SettingsInterface<double>      alertAudioLongitude_ {}; | ||||
|    settings::SettingsInterface<double>      alertAudioRadius_ {}; | ||||
|    settings::SettingsInterface<std::string> alertAudioCounty_ {}; | ||||
| 
 | ||||
|    std::unordered_map<awips::Phenomenon, settings::SettingsInterface<bool>> | ||||
|  | @ -474,6 +476,7 @@ void SettingsDialogImpl::ConnectSignals() | |||
|             break; | ||||
| 
 | ||||
|          case QDialogButtonBox::ButtonRole::ResetRole: // Restore Defaults
 | ||||
|             logger_->info("ButtonRole Reset"); | ||||
|             ResetToDefault(); | ||||
|             break; | ||||
| 
 | ||||
|  | @ -900,6 +903,10 @@ void SettingsDialogImpl::SetupAudioTab() | |||
| 
 | ||||
|          bool coordinateEntryEnabled = | ||||
|             locationMethod == types::LocationMethod::Fixed; | ||||
|          bool radiusEntryEnable = | ||||
|             locationMethod == types::LocationMethod::Fixed || | ||||
|             locationMethod == types::LocationMethod::Track || | ||||
|             locationMethod == types::LocationMethod::RadarSite; | ||||
|          bool countyEntryEnabled = | ||||
|             locationMethod == types::LocationMethod::County; | ||||
| 
 | ||||
|  | @ -912,6 +919,11 @@ void SettingsDialogImpl::SetupAudioTab() | |||
|          self_->ui->resetAlertAudioLongitudeButton->setEnabled( | ||||
|             coordinateEntryEnabled); | ||||
| 
 | ||||
|          self_->ui->alertAudioRadiusSpinBox->setEnabled( | ||||
|             radiusEntryEnable); | ||||
|          self_->ui->resetAlertAudioRadiusButton->setEnabled( | ||||
|             radiusEntryEnable); | ||||
| 
 | ||||
|          self_->ui->alertAudioCountyLineEdit->setEnabled(countyEntryEnabled); | ||||
|          self_->ui->alertAudioCountySelectButton->setEnabled( | ||||
|             countyEntryEnabled); | ||||
|  | @ -983,6 +995,11 @@ void SettingsDialogImpl::SetupAudioTab() | |||
|    alertAudioLongitude_.SetResetButton( | ||||
|       self_->ui->resetAlertAudioLongitudeButton); | ||||
| 
 | ||||
|    alertAudioRadius_.SetSettingsVariable(audioSettings.alert_radius()); | ||||
|    alertAudioRadius_.SetEditWidget(self_->ui->alertAudioRadiusSpinBox); | ||||
|    alertAudioRadius_.SetResetButton( | ||||
|       self_->ui->resetAlertAudioRadiusButton); | ||||
| 
 | ||||
|    auto& alertAudioPhenomena = types::GetAlertAudioPhenomena(); | ||||
|    auto  alertAudioLayout = | ||||
|       static_cast<QGridLayout*>(self_->ui->alertAudioGroupBox->layout()); | ||||
|  |  | |||
|  | @ -698,6 +698,62 @@ | |||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="0" column="1" colspan="2"> | ||||
|                <widget class="QLineEdit" name="alertAudioSoundLineEdit"/> | ||||
|               </item> | ||||
|               <item row="2" column="6"> | ||||
|                <widget class="QToolButton" name="resetAlertAudioLatitudeButton"> | ||||
|                 <property name="text"> | ||||
|                  <string>...</string> | ||||
|                 </property> | ||||
|                 <property name="icon"> | ||||
|                  <iconset resource="../../../../scwx-qt.qrc"> | ||||
|                   <normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="0" column="5"> | ||||
|                <widget class="QToolButton" name="alertAudioSoundStopButton"> | ||||
|                 <property name="icon"> | ||||
|                  <iconset resource="../../../../scwx-qt.qrc"> | ||||
|                   <normaloff>:/res/icons/font-awesome-6/stop-solid.svg</normaloff>:/res/icons/font-awesome-6/stop-solid.svg</iconset> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="3" column="1" colspan="2"> | ||||
|                <widget class="QDoubleSpinBox" name="alertAudioLongitudeSpinBox"> | ||||
|                 <property name="decimals"> | ||||
|                  <number>4</number> | ||||
|                 </property> | ||||
|                 <property name="minimum"> | ||||
|                  <double>-180.000000000000000</double> | ||||
|                 </property> | ||||
|                 <property name="maximum"> | ||||
|                  <double>180.000000000000000</double> | ||||
|                 </property> | ||||
|                 <property name="singleStep"> | ||||
|                  <double>0.000100000000000</double> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="5" column="3"> | ||||
|                <widget class="QToolButton" name="alertAudioCountySelectButton"> | ||||
|                 <property name="text"> | ||||
|                  <string>...</string> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="0" column="6"> | ||||
|                <widget class="QToolButton" name="resetAlertAudioSoundButton"> | ||||
|                 <property name="text"> | ||||
|                  <string>...</string> | ||||
|                 </property> | ||||
|                 <property name="icon"> | ||||
|                  <iconset resource="../../../../scwx-qt.qrc"> | ||||
|                   <normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="1" column="6"> | ||||
|                <widget class="QToolButton" name="resetAlertAudioLocationMethodButton"> | ||||
|                 <property name="text"> | ||||
|  | @ -709,6 +765,30 @@ | |||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="0" column="4"> | ||||
|                <widget class="QToolButton" name="alertAudioSoundTestButton"> | ||||
|                 <property name="icon"> | ||||
|                  <iconset resource="../../../../scwx-qt.qrc"> | ||||
|                   <normaloff>:/res/icons/font-awesome-6/play-solid.svg</normaloff>:/res/icons/font-awesome-6/play-solid.svg</iconset> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="2" column="1" colspan="2"> | ||||
|                <widget class="QDoubleSpinBox" name="alertAudioLatitudeSpinBox"> | ||||
|                 <property name="decimals"> | ||||
|                  <number>4</number> | ||||
|                 </property> | ||||
|                 <property name="minimum"> | ||||
|                  <double>-90.000000000000000</double> | ||||
|                 </property> | ||||
|                 <property name="maximum"> | ||||
|                  <double>90.000000000000000</double> | ||||
|                 </property> | ||||
|                 <property name="singleStep"> | ||||
|                  <double>0.000100000000000</double> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="3" column="0"> | ||||
|                <widget class="QLabel" name="label_16"> | ||||
|                 <property name="text"> | ||||
|  | @ -716,6 +796,13 @@ | |||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="5" column="0"> | ||||
|                <widget class="QLabel" name="label_19"> | ||||
|                 <property name="text"> | ||||
|                  <string>County</string> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="0" column="3"> | ||||
|                <widget class="QToolButton" name="alertAudioSoundSelectButton"> | ||||
|                 <property name="text"> | ||||
|  | @ -723,6 +810,60 @@ | |||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="1" column="1" colspan="2"> | ||||
|                <widget class="QComboBox" name="alertAudioLocationMethodComboBox"> | ||||
|                 <property name="sizePolicy"> | ||||
|                  <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> | ||||
|                   <horstretch>0</horstretch> | ||||
|                   <verstretch>0</verstretch> | ||||
|                  </sizepolicy> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="5" column="6"> | ||||
|                <widget class="QToolButton" name="resetAlertAudioCountyButton"> | ||||
|                 <property name="text"> | ||||
|                  <string>...</string> | ||||
|                 </property> | ||||
|                 <property name="icon"> | ||||
|                  <iconset resource="../../../../scwx-qt.qrc"> | ||||
|                   <normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="0" column="0"> | ||||
|                <widget class="QLabel" name="label_17"> | ||||
|                 <property name="text"> | ||||
|                  <string>Sound</string> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="5" column="2"> | ||||
|                <widget class="QLabel" name="alertAudioCountyLabel"> | ||||
|                 <property name="sizePolicy"> | ||||
|                  <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> | ||||
|                   <horstretch>0</horstretch> | ||||
|                   <verstretch>0</verstretch> | ||||
|                  </sizepolicy> | ||||
|                 </property> | ||||
|                 <property name="text"> | ||||
|                  <string/> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="5" column="1"> | ||||
|                <widget class="QLineEdit" name="alertAudioCountyLineEdit"> | ||||
|                 <property name="sizePolicy"> | ||||
|                  <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> | ||||
|                   <horstretch>0</horstretch> | ||||
|                   <verstretch>0</verstretch> | ||||
|                  </sizepolicy> | ||||
|                 </property> | ||||
|                 <property name="readOnly"> | ||||
|                  <bool>true</bool> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="1" column="0"> | ||||
|                <widget class="QLabel" name="label_12"> | ||||
|                 <property name="text"> | ||||
|  | @ -741,105 +882,31 @@ | |||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="0" column="5"> | ||||
|                <widget class="QToolButton" name="alertAudioSoundStopButton"> | ||||
|                 <property name="icon"> | ||||
|                  <iconset resource="../../../../scwx-qt.qrc"> | ||||
|                   <normaloff>:/res/icons/font-awesome-6/stop-solid.svg</normaloff>:/res/icons/font-awesome-6/stop-solid.svg</iconset> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="2" column="6"> | ||||
|                <widget class="QToolButton" name="resetAlertAudioLatitudeButton"> | ||||
|                 <property name="text"> | ||||
|                  <string>...</string> | ||||
|                 </property> | ||||
|                 <property name="icon"> | ||||
|                  <iconset resource="../../../../scwx-qt.qrc"> | ||||
|                   <normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="0" column="6"> | ||||
|                <widget class="QToolButton" name="resetAlertAudioSoundButton"> | ||||
|                 <property name="text"> | ||||
|                  <string>...</string> | ||||
|                 </property> | ||||
|                 <property name="icon"> | ||||
|                  <iconset resource="../../../../scwx-qt.qrc"> | ||||
|                   <normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</normaloff>:/res/icons/font-awesome-6/rotate-left-solid.svg</iconset> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="0" column="4"> | ||||
|                <widget class="QToolButton" name="alertAudioSoundTestButton"> | ||||
|                 <property name="icon"> | ||||
|                  <iconset resource="../../../../scwx-qt.qrc"> | ||||
|                   <normaloff>:/res/icons/font-awesome-6/play-solid.svg</normaloff>:/res/icons/font-awesome-6/play-solid.svg</iconset> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="0" column="0"> | ||||
|                <widget class="QLabel" name="label_17"> | ||||
|                 <property name="text"> | ||||
|                  <string>Sound</string> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="4" column="0"> | ||||
|                <widget class="QLabel" name="label_19"> | ||||
|                <widget class="QLabel" name="label_28"> | ||||
|                 <property name="text"> | ||||
|                  <string>County</string> | ||||
|                  <string>Radius</string> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="3" column="1" colspan="2"> | ||||
|                <widget class="QDoubleSpinBox" name="alertAudioLongitudeSpinBox"> | ||||
|               <item row="4" column="1" colspan="2"> | ||||
|                <widget class="QDoubleSpinBox" name="alertAudioRadiusSpinBox"> | ||||
|                 <property name="decimals"> | ||||
|                  <number>4</number> | ||||
|                 </property> | ||||
|                 <property name="minimum"> | ||||
|                  <double>-180.000000000000000</double> | ||||
|                  <double>0.000000000000000</double> | ||||
|                 </property> | ||||
|                 <property name="maximum"> | ||||
|                  <double>180.000000000000000</double> | ||||
|                  <double>9999999999999.000000000000000</double> | ||||
|                 </property> | ||||
|                 <property name="singleStep"> | ||||
|                  <double>0.000100000000000</double> | ||||
|                  <double>0.010000000000000</double> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="2" column="1" colspan="2"> | ||||
|                <widget class="QDoubleSpinBox" name="alertAudioLatitudeSpinBox"> | ||||
|                 <property name="decimals"> | ||||
|                  <number>4</number> | ||||
|                 </property> | ||||
|                 <property name="minimum"> | ||||
|                  <double>-90.000000000000000</double> | ||||
|                 </property> | ||||
|                 <property name="maximum"> | ||||
|                  <double>90.000000000000000</double> | ||||
|                 </property> | ||||
|                 <property name="singleStep"> | ||||
|                  <double>0.000100000000000</double> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="1" column="1" colspan="2"> | ||||
|                <widget class="QComboBox" name="alertAudioLocationMethodComboBox"> | ||||
|                 <property name="sizePolicy"> | ||||
|                  <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> | ||||
|                   <horstretch>0</horstretch> | ||||
|                   <verstretch>0</verstretch> | ||||
|                  </sizepolicy> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="0" column="1" colspan="2"> | ||||
|                <widget class="QLineEdit" name="alertAudioSoundLineEdit"/> | ||||
|               </item> | ||||
|               <item row="4" column="6"> | ||||
|                <widget class="QToolButton" name="resetAlertAudioCountyButton"> | ||||
|                <widget class="QToolButton" name="resetAlertAudioRadiusButton"> | ||||
|                 <property name="text"> | ||||
|                  <string>...</string> | ||||
|                 </property> | ||||
|  | @ -849,39 +916,6 @@ | |||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="4" column="3"> | ||||
|                <widget class="QToolButton" name="alertAudioCountySelectButton"> | ||||
|                 <property name="text"> | ||||
|                  <string>...</string> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="4" column="2"> | ||||
|                <widget class="QLabel" name="alertAudioCountyLabel"> | ||||
|                 <property name="sizePolicy"> | ||||
|                  <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> | ||||
|                   <horstretch>0</horstretch> | ||||
|                   <verstretch>0</verstretch> | ||||
|                  </sizepolicy> | ||||
|                 </property> | ||||
|                 <property name="text"> | ||||
|                  <string/> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|               <item row="4" column="1"> | ||||
|                <widget class="QLineEdit" name="alertAudioCountyLineEdit"> | ||||
|                 <property name="sizePolicy"> | ||||
|                  <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> | ||||
|                   <horstretch>0</horstretch> | ||||
|                   <verstretch>0</verstretch> | ||||
|                  </sizepolicy> | ||||
|                 </property> | ||||
|                 <property name="readOnly"> | ||||
|                  <bool>true</bool> | ||||
|                 </property> | ||||
|                </widget> | ||||
|               </item> | ||||
|              </layout> | ||||
|             </widget> | ||||
|            </item> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak