mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 04:10:06 +00:00 
			
		
		
		
	Add imgui debug window, still need to use unique contexts
This commit is contained in:
		
							parent
							
								
									b18692657a
								
							
						
					
					
						commit
						cd01bb70b6
					
				
					 10 changed files with 325 additions and 3 deletions
				
			
		|  | @ -11,6 +11,7 @@ | |||
| #include <scwx/qt/model/radar_product_model.hpp> | ||||
| #include <scwx/qt/ui/alert_dock_widget.hpp> | ||||
| #include <scwx/qt/ui/flow_layout.hpp> | ||||
| #include <scwx/qt/ui/imgui_debug_dialog.hpp> | ||||
| #include <scwx/qt/ui/level2_products_widget.hpp> | ||||
| #include <scwx/qt/ui/level2_settings_widget.hpp> | ||||
| #include <scwx/qt/ui/level3_products_widget.hpp> | ||||
|  | @ -49,6 +50,7 @@ public: | |||
|        level2SettingsWidget_ {nullptr}, | ||||
|        level3ProductsWidget_ {nullptr}, | ||||
|        alertDockWidget_ {nullptr}, | ||||
|        imGuiDebugDialog_ {nullptr}, | ||||
|        radarSiteDialog_ {nullptr}, | ||||
|        radarProductModel_ {nullptr}, | ||||
|        textEventManager_ {manager::TextEventManager::Instance()}, | ||||
|  | @ -109,8 +111,9 @@ public: | |||
| 
 | ||||
|    ui::Level3ProductsWidget* level3ProductsWidget_; | ||||
| 
 | ||||
|    ui::AlertDockWidget* alertDockWidget_; | ||||
|    ui::RadarSiteDialog* radarSiteDialog_; | ||||
|    ui::AlertDockWidget*  alertDockWidget_; | ||||
|    ui::ImGuiDebugDialog* imGuiDebugDialog_; | ||||
|    ui::RadarSiteDialog*  radarSiteDialog_; | ||||
| 
 | ||||
|    std::unique_ptr<model::RadarProductModel>  radarProductModel_; | ||||
|    std::shared_ptr<manager::TextEventManager> textEventManager_; | ||||
|  | @ -196,6 +199,9 @@ MainWindow::MainWindow(QWidget* parent) : | |||
|    ui->settingsFrame->layout()->addWidget(p->level2SettingsWidget_); | ||||
|    p->level2SettingsWidget_->setVisible(false); | ||||
| 
 | ||||
|    // ImGui Debug Dialog
 | ||||
|    p->imGuiDebugDialog_ = new ui::ImGuiDebugDialog(this); | ||||
| 
 | ||||
|    auto mapSettings = manager::SettingsManager::map_settings(); | ||||
|    for (size_t i = 0; i < p->maps_.size(); i++) | ||||
|    { | ||||
|  | @ -323,6 +329,11 @@ void MainWindow::on_actionExit_triggered() | |||
|    close(); | ||||
| } | ||||
| 
 | ||||
| void MainWindow::on_actionImGuiDebug_triggered() | ||||
| { | ||||
|    p->imGuiDebugDialog_->show(); | ||||
| } | ||||
| 
 | ||||
| void MainWindow::on_radarSiteSelectButton_clicked() | ||||
| { | ||||
|    p->radarSiteDialog_->show(); | ||||
|  |  | |||
|  | @ -35,6 +35,7 @@ private slots: | |||
|    void on_actionOpenNexrad_triggered(); | ||||
|    void on_actionOpenTextEvent_triggered(); | ||||
|    void on_actionExit_triggered(); | ||||
|    void on_actionImGuiDebug_triggered(); | ||||
|    void on_radarSiteSelectButton_clicked(); | ||||
|    void on_resourceTreeCollapseAllButton_clicked(); | ||||
|    void on_resourceTreeExpandAllButton_clicked(); | ||||
|  |  | |||
|  | @ -35,7 +35,7 @@ | |||
|      <x>0</x> | ||||
|      <y>0</y> | ||||
|      <width>1024</width> | ||||
|      <height>22</height> | ||||
|      <height>21</height> | ||||
|     </rect> | ||||
|    </property> | ||||
|    <widget class="QMenu" name="menuFile"> | ||||
|  | @ -67,8 +67,15 @@ | |||
|     <addaction name="actionResourceExplorer"/> | ||||
|     <addaction name="actionAlerts"/> | ||||
|    </widget> | ||||
|    <widget class="QMenu" name="menuDebug"> | ||||
|     <property name="title"> | ||||
|      <string>&Debug</string> | ||||
|     </property> | ||||
|     <addaction name="actionImGuiDebug"/> | ||||
|    </widget> | ||||
|    <addaction name="menuFile"/> | ||||
|    <addaction name="menuView"/> | ||||
|    <addaction name="menuDebug"/> | ||||
|    <addaction name="menuHelp"/> | ||||
|   </widget> | ||||
|   <widget class="QStatusBar" name="statusbar"/> | ||||
|  | @ -342,6 +349,11 @@ | |||
|     <string>&Alerts</string> | ||||
|    </property> | ||||
|   </action> | ||||
|   <action name="actionImGuiDebug"> | ||||
|    <property name="text"> | ||||
|     <string>&ImGui Debug</string> | ||||
|    </property> | ||||
|   </action> | ||||
|  </widget> | ||||
|  <resources> | ||||
|   <include location="../../../../scwx-qt.qrc"/> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat