mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-07 19:53:23 +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 );
|
loadFiles( QStringList() << filename );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QTabWidget *MainWindow::tabWidget(){
|
||||||
|
return ui.tabWidget;
|
||||||
|
}
|
||||||
void MainWindow::on_actionSave_triggered()
|
void MainWindow::on_actionSave_triggered()
|
||||||
{
|
{
|
||||||
file_save();
|
file_save();
|
||||||
|
|
|
@ -55,7 +55,7 @@ public:
|
||||||
void loadFiles(const QStringList files);
|
void loadFiles(const QStringList files);
|
||||||
void importFiles(const QStringList importFiles);
|
void importFiles(const QStringList importFiles);
|
||||||
void cleanUpEmpty();
|
void cleanUpEmpty();
|
||||||
|
QTabWidget *tabWidget();
|
||||||
private slots:
|
private slots:
|
||||||
/* file menu action */
|
/* file menu action */
|
||||||
void on_actionNew_triggered();
|
void on_actionNew_triggered();
|
||||||
|
|
|
@ -12,6 +12,11 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
|
|
||||||
|
#ifndef QT_NO_DEBUG
|
||||||
|
#include <QTableView>
|
||||||
|
#include "mainwindow.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
ProfileWidget2::ProfileWidget2(QWidget *parent) :
|
ProfileWidget2::ProfileWidget2(QWidget *parent) :
|
||||||
QGraphicsView(parent),
|
QGraphicsView(parent),
|
||||||
dataModel(new DivePlotDataModel(this)),
|
dataModel(new DivePlotDataModel(this)),
|
||||||
|
@ -212,6 +217,12 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
|
||||||
|
|
||||||
// Starting the transitions:
|
// Starting the transitions:
|
||||||
stateMachine->start();
|
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.
|
// Currently just one dive, but the plan is to enable All of the selected dives.
|
||||||
|
|
Loading…
Add table
Reference in a new issue