2017-04-27 20:26:05 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2017-04-04 19:21:30 +02:00
|
|
|
#include "TabDiveExtraInfo.h"
|
|
|
|
#include "ui_TabDiveExtraInfo.h"
|
2020-05-06 22:25:48 +02:00
|
|
|
#include "core/dive.h"
|
2019-11-02 22:52:27 +01:00
|
|
|
#include "qt-models/divecomputerextradatamodel.h"
|
2017-04-04 19:21:30 +02:00
|
|
|
|
|
|
|
TabDiveExtraInfo::TabDiveExtraInfo(QWidget *parent) :
|
|
|
|
TabBase(parent),
|
|
|
|
ui(new Ui::TabDiveExtraInfo()),
|
2020-05-06 22:25:48 +02:00
|
|
|
extraDataModel(new ExtraDataModel(this))
|
2017-04-04 19:21:30 +02:00
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
ui->extraData->setModel(extraDataModel);
|
|
|
|
}
|
|
|
|
|
|
|
|
TabDiveExtraInfo::~TabDiveExtraInfo()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
|
|
|
|
void TabDiveExtraInfo::updateData()
|
|
|
|
{
|
2020-05-06 22:25:48 +02:00
|
|
|
extraDataModel->updateDiveComputer(current_dc);
|
2017-04-04 19:21:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void TabDiveExtraInfo::clear()
|
|
|
|
{
|
2020-05-06 22:25:48 +02:00
|
|
|
extraDataModel->clear();
|
2017-04-04 19:21:30 +02:00
|
|
|
}
|