mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Added debug code to help understand the Profile
This commit adds a QTableView if built in debug mode. This is very userful to understand the Profile that will be drawn by the graphics classes and fix the possible errors. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									7affccdf5b
								
							
						
					
					
						commit
						52064d9e02
					
				
					 3 changed files with 15 additions and 1 deletions
				
			
		|  | @ -125,6 +125,9 @@ void MainWindow::on_actionOpen_triggered() | |||
| 	loadFiles( QStringList() << filename ); | ||||
| } | ||||
| 
 | ||||
| QTabWidget *MainWindow::tabWidget(){ | ||||
| 	return ui.tabWidget; | ||||
| } | ||||
| void MainWindow::on_actionSave_triggered() | ||||
| { | ||||
| 	file_save(); | ||||
|  |  | |||
|  | @ -55,7 +55,7 @@ public: | |||
| 	void loadFiles(const QStringList files); | ||||
| 	void importFiles(const QStringList importFiles); | ||||
| 	void cleanUpEmpty(); | ||||
| 
 | ||||
| 	QTabWidget *tabWidget(); | ||||
| private slots: | ||||
| 	/* file menu action */ | ||||
| 	void on_actionNew_triggered(); | ||||
|  |  | |||
|  | @ -12,6 +12,11 @@ | |||
| #include <QMenu> | ||||
| #include <QContextMenuEvent> | ||||
| 
 | ||||
| #ifndef QT_NO_DEBUG | ||||
| #include <QTableView> | ||||
| #include "mainwindow.h" | ||||
| #endif | ||||
| 
 | ||||
| ProfileWidget2::ProfileWidget2(QWidget *parent) : | ||||
| 	QGraphicsView(parent), | ||||
| 	dataModel(new DivePlotDataModel(this)), | ||||
|  | @ -212,6 +217,12 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : | |||
| 
 | ||||
| 	// Starting the transitions:
 | ||||
| 	stateMachine->start(); | ||||
| 
 | ||||
| #ifndef QT_NO_DEBUG | ||||
| 	QTableView *diveDepthTableView = new QTableView(); | ||||
| 	diveDepthTableView->setModel(dataModel); | ||||
| 	mainWindow()->tabWidget()->addTab(diveDepthTableView, "Depth Model"); | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
| // Currently just one dive, but the plan is to enable All of the selected dives.
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue