mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Add logic to switch views
Rename the 3 main widgets in the Qt mainwindow. Wire view menu options to the setVisible methods of same. Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									55106a7583
								
							
						
					
					
						commit
						6e02e9d5b7
					
				
					 2 changed files with 19 additions and 3 deletions
				
			
		|  | @ -99,21 +99,37 @@ void MainWindow::on_actionYearlyStatistics_triggered() | ||||||
| void MainWindow::on_actionViewList_triggered() | void MainWindow::on_actionViewList_triggered() | ||||||
| { | { | ||||||
| 	qDebug("actionViewList"); | 	qDebug("actionViewList"); | ||||||
|  | 
 | ||||||
|  | 	ui->InfoWidget->setVisible(false); | ||||||
|  | 	ui->ListWidget->setVisible(true); | ||||||
|  | 	ui->ProfileWidget->setVisible(false); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MainWindow::on_actionViewProfile_triggered() | void MainWindow::on_actionViewProfile_triggered() | ||||||
| { | { | ||||||
| 	qDebug("actionViewProfile"); | 	qDebug("actionViewProfile"); | ||||||
|  | 
 | ||||||
|  | 	ui->InfoWidget->setVisible(false); | ||||||
|  | 	ui->ListWidget->setVisible(false); | ||||||
|  | 	ui->ProfileWidget->setVisible(true); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MainWindow::on_actionViewInfo_triggered() | void MainWindow::on_actionViewInfo_triggered() | ||||||
| { | { | ||||||
| 	qDebug("actionViewInfo"); | 	qDebug("actionViewInfo"); | ||||||
|  | 
 | ||||||
|  | 	ui->InfoWidget->setVisible(true); | ||||||
|  | 	ui->ListWidget->setVisible(false); | ||||||
|  | 	ui->ProfileWidget->setVisible(false); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MainWindow::on_actionViewAll_triggered() | void MainWindow::on_actionViewAll_triggered() | ||||||
| { | { | ||||||
| 	qDebug("actionViewAll"); | 	qDebug("actionViewAll"); | ||||||
|  | 
 | ||||||
|  | 	ui->InfoWidget->setVisible(true); | ||||||
|  | 	ui->ListWidget->setVisible(true); | ||||||
|  | 	ui->ProfileWidget->setVisible(true); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MainWindow::on_actionPreviousDC_triggered() | void MainWindow::on_actionPreviousDC_triggered() | ||||||
|  |  | ||||||
|  | @ -24,10 +24,10 @@ | ||||||
|        <property name="orientation"> |        <property name="orientation"> | ||||||
|         <enum>Qt::Horizontal</enum> |         <enum>Qt::Horizontal</enum> | ||||||
|        </property> |        </property> | ||||||
|        <widget class="MainTab" name="widget" native="true"/> |        <widget class="MainTab" name="InfoWidget" native="true"/> | ||||||
|        <widget class="QGraphicsView" name="graphicsView"/> |        <widget class="QGraphicsView" name="ProfileWidget"/> | ||||||
|       </widget> |       </widget> | ||||||
|       <widget class="QTableView" name="tableView"/> |       <widget class="QTableView" name="ListWidget"/> | ||||||
|      </widget> |      </widget> | ||||||
|     </item> |     </item> | ||||||
|     <item> |     <item> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue