mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 18:30:06 +00:00 
			
		
		
		
	Replace radar site table view with tree view
This commit is contained in:
		
							parent
							
								
									9e3c525109
								
							
						
					
					
						commit
						4e514ee152
					
				
					 2 changed files with 18 additions and 4 deletions
				
			
		|  | @ -2,6 +2,7 @@ | ||||||
| #include "./ui_radar_site_dialog.h" | #include "./ui_radar_site_dialog.h" | ||||||
| 
 | 
 | ||||||
| #include <scwx/qt/model/radar_site_model.hpp> | #include <scwx/qt/model/radar_site_model.hpp> | ||||||
|  | #include <scwx/util/logger.hpp> | ||||||
| 
 | 
 | ||||||
| namespace scwx | namespace scwx | ||||||
| { | { | ||||||
|  | @ -10,6 +11,9 @@ namespace qt | ||||||
| namespace ui | namespace ui | ||||||
| { | { | ||||||
| 
 | 
 | ||||||
|  | static const std::string logPrefix_ = "scwx::qt::ui::radar_site_dialog"; | ||||||
|  | static const auto        logger_    = scwx::util::Logger::Create(logPrefix_); | ||||||
|  | 
 | ||||||
| class RadarSiteDialogImpl | class RadarSiteDialogImpl | ||||||
| { | { | ||||||
| public: | public: | ||||||
|  | @ -24,7 +28,13 @@ RadarSiteDialog::RadarSiteDialog(QWidget* parent) : | ||||||
| { | { | ||||||
|    ui->setupUi(this); |    ui->setupUi(this); | ||||||
| 
 | 
 | ||||||
|    ui->radarSiteView->setModel(new model::RadarSiteModel(this)); |    model::RadarSiteModel* radarSiteModel = new model::RadarSiteModel(this); | ||||||
|  |    ui->radarSiteView->setModel(radarSiteModel); | ||||||
|  | 
 | ||||||
|  |    for (int column = 0; column < radarSiteModel->columnCount(); column++) | ||||||
|  |    { | ||||||
|  |       ui->radarSiteView->resizeColumnToContents(column); | ||||||
|  |    } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| RadarSiteDialog::~RadarSiteDialog() | RadarSiteDialog::~RadarSiteDialog() | ||||||
|  |  | ||||||
|  | @ -6,8 +6,8 @@ | ||||||
|    <rect> |    <rect> | ||||||
|     <x>0</x> |     <x>0</x> | ||||||
|     <y>0</y> |     <y>0</y> | ||||||
|     <width>400</width> |     <width>470</width> | ||||||
|     <height>300</height> |     <height>550</height> | ||||||
|    </rect> |    </rect> | ||||||
|   </property> |   </property> | ||||||
|   <property name="windowTitle"> |   <property name="windowTitle"> | ||||||
|  | @ -15,7 +15,11 @@ | ||||||
|   </property> |   </property> | ||||||
|   <layout class="QVBoxLayout" name="verticalLayout"> |   <layout class="QVBoxLayout" name="verticalLayout"> | ||||||
|    <item> |    <item> | ||||||
|     <widget class="QTableView" name="radarSiteView"/> |     <widget class="QTreeView" name="radarSiteView"> | ||||||
|  |      <property name="indentation"> | ||||||
|  |       <number>0</number> | ||||||
|  |      </property> | ||||||
|  |     </widget> | ||||||
|    </item> |    </item> | ||||||
|    <item> |    <item> | ||||||
|     <widget class="QDialogButtonBox" name="buttonBox"> |     <widget class="QDialogButtonBox" name="buttonBox"> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat