mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:50:04 +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
				
			
		
							
								
								
									
										1
									
								
								scwx-qt/res/icons/font-awesome-6/house-solid.svg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								scwx-qt/res/icons/font-awesome-6/house-solid.svg
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| <svg xmlns="http://www.w3.org/2000/svg" height="16" width="18" viewBox="0 0 576 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.--><path opacity="1" fill="#000000" d="M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"/></svg> | ||||
| After Width: | Height: | Size: 734 B | 
|  | @ -34,6 +34,7 @@ | |||
|         <file>res/icons/font-awesome-6/forward-step-solid.svg</file> | ||||
|         <file>res/icons/font-awesome-6/gears-solid.svg</file> | ||||
|         <file>res/icons/font-awesome-6/github.svg</file> | ||||
|         <file>res/icons/font-awesome-6/house-solid.svg</file> | ||||
|         <file>res/icons/font-awesome-6/layer-group-solid.svg</file> | ||||
|         <file>res/icons/font-awesome-6/palette-solid.svg</file> | ||||
|         <file>res/icons/font-awesome-6/pause-solid.svg</file> | ||||
|  |  | |||
|  | @ -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