mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Show extra data in separate tab on MainTab
This way any extra data probided by the dive computer is visible to the user (without other processing). This data cannot be edited by the user as it reflects the information given by the dive computer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4ccddf95d7
commit
45251ec724
5 changed files with 149 additions and 8 deletions
|
@ -32,6 +32,7 @@
|
|||
MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
||||
weightModel(new WeightModel(this)),
|
||||
cylindersModel(CylindersModel::instance()),
|
||||
extraDataModel(new ExtraDataModel(this)),
|
||||
editMode(NONE),
|
||||
divePictureModel(DivePictureModel::instance()),
|
||||
currentTrip(0),
|
||||
|
@ -47,6 +48,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
ui.weights->setModel(weightModel);
|
||||
ui.photosView->setModel(divePictureModel);
|
||||
connect(ui.photosView, SIGNAL(photoDoubleClicked(QString)), this, SLOT(photoDoubleClicked(QString)));
|
||||
ui.extraData->setModel(extraDataModel);
|
||||
closeMessage();
|
||||
|
||||
QAction *action = new QAction(tr("Save"), this);
|
||||
|
@ -473,6 +475,7 @@ void MainTab::updateDiveInfo(bool clear)
|
|||
ui.equipmentTab->setEnabled(true);
|
||||
cylindersModel->updateDive();
|
||||
weightModel->updateDive();
|
||||
extraDataModel->updateDive();
|
||||
taglist_get_tagstring(displayed_dive.tag_list, buf, 1024);
|
||||
ui.tagWidget->setText(QString(buf));
|
||||
}
|
||||
|
@ -899,6 +902,7 @@ void MainTab::rejectChanges()
|
|||
weightModel->changed = false;
|
||||
cylindersModel->updateDive();
|
||||
weightModel->updateDive();
|
||||
extraDataModel->updateDive();
|
||||
}
|
||||
#undef EDIT_TEXT2
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue