mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 04:20:05 +00:00 
			
		
		
		
	Add home button to quickly navigate to default radar site
This commit is contained in:
		
							parent
							
								
									132d92d357
								
							
						
					
					
						commit
						e721633629
					
				
					 5 changed files with 71 additions and 38 deletions
				
			
		|  | @ -521,6 +521,19 @@ void MainWindow::on_actionAboutSupercellWx_triggered() | |||
|    p->aboutDialog_->show(); | ||||
| } | ||||
| 
 | ||||
| void MainWindow::on_radarSiteHomeButton_clicked() | ||||
| { | ||||
|    std::string homeRadarSite = | ||||
|       settings::GeneralSettings::Instance().default_radar_site().GetValue(); | ||||
| 
 | ||||
|    for (map::MapWidget* map : p->maps_) | ||||
|    { | ||||
|       map->SelectRadarSite(homeRadarSite); | ||||
|    } | ||||
| 
 | ||||
|    p->UpdateRadarSite(); | ||||
| } | ||||
| 
 | ||||
| void MainWindow::on_radarSiteSelectButton_clicked() | ||||
| { | ||||
|    p->radarSiteDialog_->show(); | ||||
|  |  | |||
|  | @ -46,6 +46,7 @@ private slots: | |||
|    void on_actionGitHubRepository_triggered(); | ||||
|    void on_actionCheckForUpdates_triggered(); | ||||
|    void on_actionAboutSupercellWx_triggered(); | ||||
|    void on_radarSiteHomeButton_clicked(); | ||||
|    void on_radarSiteSelectButton_clicked(); | ||||
| 
 | ||||
| private: | ||||
|  |  | |||
|  | @ -39,7 +39,7 @@ | |||
|      <x>0</x> | ||||
|      <y>0</y> | ||||
|      <width>1024</width> | ||||
|      <height>22</height> | ||||
|      <height>21</height> | ||||
|     </rect> | ||||
|    </property> | ||||
|    <widget class="QMenu" name="menuFile"> | ||||
|  | @ -141,8 +141,8 @@ | |||
|          <rect> | ||||
|           <x>0</x> | ||||
|           <y>0</y> | ||||
|           <width>157</width> | ||||
|           <height>697</height> | ||||
|           <width>187</width> | ||||
|           <height>702</height> | ||||
|          </rect> | ||||
|         </property> | ||||
|         <layout class="QVBoxLayout" name="verticalLayout_6"> | ||||
|  | @ -166,37 +166,7 @@ | |||
|            <property name="frameShadow"> | ||||
|             <enum>QFrame::Raised</enum> | ||||
|            </property> | ||||
|            <layout class="QGridLayout" name="gridLayout" columnstretch="0,1,0"> | ||||
|             <item row="0" column="2"> | ||||
|              <widget class="QToolButton" name="radarSiteSelectButton"> | ||||
|               <property name="maximumSize"> | ||||
|                <size> | ||||
|                 <width>16777215</width> | ||||
|                 <height>13</height> | ||||
|                </size> | ||||
|               </property> | ||||
|               <property name="text"> | ||||
|                <string>...</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="1" column="1" colspan="2"> | ||||
|              <widget class="QLabel" name="radarLocationLabel"> | ||||
|               <property name="text"> | ||||
|                <string notr="true">St. Louis, MO</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="2" column="0"> | ||||
|              <widget class="QLabel" name="vcpLabel"> | ||||
|               <property name="toolTip"> | ||||
|                <string>Volume Coverage Pattern</string> | ||||
|               </property> | ||||
|               <property name="text"> | ||||
|                <string>VCP</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|            <layout class="QGridLayout" name="gridLayout" columnstretch="0,1,0,0,0"> | ||||
|             <item row="0" column="1"> | ||||
|              <widget class="QLabel" name="radarSiteValueLabel"> | ||||
|               <property name="text"> | ||||
|  | @ -211,20 +181,67 @@ | |||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="3" column="1" colspan="2"> | ||||
|              <widget class="QLabel" name="vcpDescriptionLabel"> | ||||
|             <item row="2" column="0"> | ||||
|              <widget class="QLabel" name="vcpLabel"> | ||||
|               <property name="toolTip"> | ||||
|                <string>Volume Coverage Pattern</string> | ||||
|               </property> | ||||
|               <property name="text"> | ||||
|                <string>Clear Air Mode</string> | ||||
|                <string>VCP</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="2" column="1" colspan="2"> | ||||
|             <item row="0" column="3"> | ||||
|              <widget class="QToolButton" name="radarSiteSelectButton"> | ||||
|               <property name="maximumSize"> | ||||
|                <size> | ||||
|                 <width>16777215</width> | ||||
|                 <height>13</height> | ||||
|                </size> | ||||
|               </property> | ||||
|               <property name="text"> | ||||
|                <string>...</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="0" column="4"> | ||||
|              <widget class="QToolButton" name="radarSiteHomeButton"> | ||||
|               <property name="maximumSize"> | ||||
|                <size> | ||||
|                 <width>16777215</width> | ||||
|                 <height>13</height> | ||||
|                </size> | ||||
|               </property> | ||||
|               <property name="text"> | ||||
|                <string>...</string> | ||||
|               </property> | ||||
|               <property name="icon"> | ||||
|                <iconset resource="../../../../scwx-qt.qrc"> | ||||
|                 <normaloff>:/res/icons/font-awesome-6/house-solid.svg</normaloff>:/res/icons/font-awesome-6/house-solid.svg</iconset> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="1" column="1" colspan="4"> | ||||
|              <widget class="QLabel" name="radarLocationLabel"> | ||||
|               <property name="text"> | ||||
|                <string notr="true">St. Louis, MO</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="2" column="1" colspan="4"> | ||||
|              <widget class="QLabel" name="vcpValueLabel"> | ||||
|               <property name="text"> | ||||
|                <string notr="true">35</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="3" column="1" colspan="4"> | ||||
|              <widget class="QLabel" name="vcpDescriptionLabel"> | ||||
|               <property name="text"> | ||||
|                <string>Clear Air Mode</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|            </layout> | ||||
|           </widget> | ||||
|          </item> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat