Break down MainTab into smaller classes

Maintab is one of our most complex classes, and it's
something I'm not actually proud of. But it currently
works and the idea of splitting it was in my head for
quite a while.

This is the third or fourth tentative of splitting it,
and this time I let the most complex part of it untouched,
the Notes and Equipment tab are way too complex to untangle
right now on my limited time.

A new class 'TabBase' should be used for any new tab that
we may create, and added on the MainTab (see the new lines
on the MainTab constructor).

Also, Extra Info, Information, Photos and Statistics where
ported to this new way helping reduce the number of
lines and functions on the MainTab quite a bit.

Overall this is a step in the right direction for the future.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2017-04-04 19:21:30 +02:00 committed by Dirk Hohndel
parent 8a71196e4e
commit 1fc4fba69f
23 changed files with 1152 additions and 886 deletions

View file

@ -0,0 +1,6 @@
#include "TabBase.h"
TabBase::TabBase(QWidget *parent) : QWidget(parent)
{
}

View file

@ -0,0 +1,17 @@
#ifndef TAB_BASE_H
#define TAB_BASE_H
#include <QWidget>
struct dive;
class TabBase : public QWidget {
Q_OBJECT
public:
TabBase(QWidget *parent);
virtual void updateData() = 0;
virtual void clear() = 0;
};
#endif

View file

@ -0,0 +1,29 @@
#include "TabDiveExtraInfo.h"
#include "ui_TabDiveExtraInfo.h"
#include <qt-models/divecomputerextradatamodel.h>
TabDiveExtraInfo::TabDiveExtraInfo(QWidget *parent) :
TabBase(parent),
ui(new Ui::TabDiveExtraInfo()),
extraDataModel(new ExtraDataModel())
{
ui->setupUi(this);
ui->extraData->setModel(extraDataModel);
}
TabDiveExtraInfo::~TabDiveExtraInfo()
{
delete ui;
}
void TabDiveExtraInfo::updateData()
{
extraDataModel->updateDive();
}
void TabDiveExtraInfo::clear()
{
extraDataModel->updateDive();
}

View file

@ -0,0 +1,24 @@
#ifndef TAB_DIVE_EXTRA_INFO_H
#define TAB_DIVE_EXTRA_INFO_H
#include "TabBase.h"
namespace Ui {
class TabDiveExtraInfo;
};
class ExtraDataModel;
class TabDiveExtraInfo : public TabBase {
Q_OBJECT
public:
TabDiveExtraInfo(QWidget *parent);
~TabDiveExtraInfo();
void updateData() override;
void clear() override;
private:
Ui::TabDiveExtraInfo *ui;
ExtraDataModel *extraDataModel;
};
#endif

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TabDiveExtraInfo</class>
<widget class="QWidget" name="TabDiveExtraInfo">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Extra Info</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTableView" name="extraData"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -0,0 +1,100 @@
#include "TabDiveInformation.h"
#include "ui_TabDiveInformation.h"
#include "../tagwidget.h"
#include <core/helpers.h>
#include <core/statistics.h>
#include <core/display.h>
TabDiveInformation::TabDiveInformation(QWidget *parent) : TabBase(parent), ui(new Ui::TabDiveInformation())
{
ui->setupUi(this);
}
TabDiveInformation::~TabDiveInformation()
{
delete ui;
}
void TabDiveInformation::clear()
{
ui->sacText->clear();
ui->otuText->clear();
ui->maxcnsText->clear();
ui->oxygenHeliumText->clear();
ui->gasUsedText->clear();
ui->dateText->clear();
ui->diveTimeText->clear();
ui->surfaceIntervalText->clear();
ui->maximumDepthText->clear();
ui->averageDepthText->clear();
ui->waterTemperatureText->clear();
ui->airTemperatureText->clear();
ui->airPressureText->clear();
ui->salinityText->clear();
}
void TabDiveInformation::updateData()
{
clear();
ui->maxcnsText->setText(QString("%1\%").arg(displayed_dive.maxcns));
ui->otuText->setText(QString("%1").arg(displayed_dive.otu));
ui->maximumDepthText->setText(get_depth_string(displayed_dive.maxdepth, true));
ui->averageDepthText->setText(get_depth_string(displayed_dive.meandepth, true));
ui->dateText->setText(get_short_dive_date_string(displayed_dive.when));
ui->waterTemperatureText->setText(get_temperature_string(displayed_dive.watertemp, true));
ui->airTemperatureText->setText(get_temperature_string(displayed_dive.airtemp, true));
volume_t gases[MAX_CYLINDERS] = {};
get_gas_used(&displayed_dive, gases);
QString volumes;
int mean[MAX_CYLINDERS], duration[MAX_CYLINDERS];
per_cylinder_mean_depth(&displayed_dive, select_dc(&displayed_dive), mean, duration);
volume_t sac;
QString gaslist, SACs, separator;
gaslist = ""; SACs = ""; volumes = ""; separator = "";
for (int i = 0; i < MAX_CYLINDERS; i++) {
if (!is_cylinder_used(&displayed_dive, i))
continue;
gaslist.append(separator); volumes.append(separator); SACs.append(separator);
separator = "\n";
gaslist.append(gasname(&displayed_dive.cylinder[i].gasmix));
if (!gases[i].mliter)
continue;
volumes.append(get_volume_string(gases[i], true));
if (duration[i]) {
sac.mliter = gases[i].mliter / (depth_to_atm(mean[i], &displayed_dive) * duration[i] / 60);
SACs.append(get_volume_string(sac, true).append(tr("/min")));
}
}
ui->gasUsedText->setText(volumes);
ui->oxygenHeliumText->setText(gaslist);
int sum = displayed_dive.dc.divemode != FREEDIVE ? 30 : 0;
ui->diveTimeText->setText(get_time_string_s(displayed_dive.duration.seconds + sum, 0, false));
struct dive *prevd;
process_all_dives(&displayed_dive, &prevd);
if (prevd)
ui->surfaceIntervalText->setText(get_time_string_s(displayed_dive.when - (prevd->when + prevd->duration.seconds), 4,
(displayed_dive.dc.divemode == FREEDIVE)));
else
ui->surfaceIntervalText->clear();
ui->sacText->setText( mean[0] ? SACs : QString());
if (displayed_dive.surface_pressure.mbar) /* this is ALWAYS displayed in mbar */
ui->airPressureText->setText(QString("%1mbar").arg(displayed_dive.surface_pressure.mbar));
else
ui->airPressureText->clear();
if (displayed_dive.salinity)
ui->salinityText->setText(QString("%1g/l").arg(displayed_dive.salinity / 10.0));
else
ui->salinityText->clear();
}

View file

@ -0,0 +1,23 @@
#ifndef TAB_DIVE_INFORMATION_H
#define TAB_DIVE_INFORMATION_H
#include "TabBase.h"
namespace Ui {
class TabDiveInformation;
};
class TabDiveInformation : public TabBase {
Q_OBJECT
public:
TabDiveInformation(QWidget *parent);
~TabDiveInformation();
void updateData() override;
void clear() override;
private:
Ui::TabDiveInformation *ui;
};
#endif

View file

@ -0,0 +1,340 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TabDiveInformation</class>
<widget class="QWidget" name="TabDiveInformation">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>421</height>
</rect>
</property>
<property name="windowTitle">
<string>Information</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QScrollArea" name="scrollArea_3">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_3">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>388</width>
<height>409</height>
</rect>
</property>
<layout class="QGridLayout" name="diveInfoScrollAreaLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Date</string>
</property>
<layout class="QHBoxLayout" name="diveInfoDateLayout">
<item>
<widget class="QLabel" name="dateText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="2">
<widget class="QGroupBox" name="groupBox_12">
<property name="title">
<string>Interval</string>
</property>
<layout class="QHBoxLayout" name="diveInfoSurfintervallLayout">
<item>
<widget class="QLabel" name="surfaceIntervalText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Gases used</string>
</property>
<layout class="QHBoxLayout" name="diveInfoGasesUsedLayout">
<item>
<widget class="QLabel" name="oxygenHeliumText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Gas consumed</string>
</property>
<layout class="QHBoxLayout" name="diveInfoGasConsumedLayout">
<item>
<widget class="QLabel" name="gasUsedText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="2">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>SAC</string>
</property>
<layout class="QHBoxLayout" name="diveInfoSacLayout">
<item>
<widget class="QLabel" name="sacText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_15">
<property name="title">
<string>CNS</string>
</property>
<layout class="QHBoxLayout" name="diveInfoCnsLayout">
<item>
<widget class="QLabel" name="maxcnsText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="1">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>OTU</string>
</property>
<layout class="QHBoxLayout" name="diveInfoOtuLayout">
<item>
<widget class="QLabel" name="otuText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>Max. depth</string>
</property>
<layout class="QHBoxLayout" name="diveInfoMaxDepthLayout">
<item>
<widget class="QLabel" name="maximumDepthText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
<string>Avg. depth</string>
</property>
<layout class="QHBoxLayout" name="diveInfoAvgDepthLayout">
<item>
<widget class="QLabel" name="averageDepthText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="2">
<widget class="QGroupBox" name="groupBox_10">
<property name="title">
<string>Air pressure</string>
</property>
<layout class="QHBoxLayout" name="diveInfoAirPressureLayout">
<item>
<widget class="QLabel" name="airPressureText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="2">
<widget class="QGroupBox" name="groupBox_9">
<property name="title">
<string>Air temp.</string>
</property>
<layout class="QHBoxLayout" name="diveInfoAirTempLayout">
<item>
<widget class="QLabel" name="airTemperatureText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QGroupBox" name="groupBox_8">
<property name="title">
<string>Water temp.</string>
</property>
<layout class="QHBoxLayout" name="diveInfoWaterTempLayout">
<item>
<widget class="QLabel" name="waterTemperatureText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_11">
<property name="title">
<string>Dive time</string>
</property>
<layout class="QHBoxLayout" name="diveInfoDiveTimeLayout">
<item>
<widget class="QLabel" name="diveTimeText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="1">
<widget class="QGroupBox" name="groupBox_1">
<property name="title">
<string>Salinity</string>
</property>
<layout class="QHBoxLayout" name="diveInfoSalinityLayout">
<item>
<widget class="QLabel" name="salinityText">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="5" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -0,0 +1,98 @@
#include "TabDivePhotos.h"
#include "ui_TabDivePhotos.h"
#include <qt-models/divepicturemodel.h>
#include <QDesktopServices>
#include <QContextMenuEvent>
#include <QMenu>
#include <QUrl>
#include <QMessageBox>
//TODO: Remove those in the future.
#include "../mainwindow.h"
#include "../divelistview.h"
TabDivePhotos::TabDivePhotos(QWidget *parent)
: TabBase(parent),
ui(new Ui::TabDivePhotos()),
divePictureModel(DivePictureModel::instance())
{
ui->setupUi(this);
ui->photosView->setModel(divePictureModel);
ui->photosView->setSelectionMode(QAbstractItemView::MultiSelection);
connect(ui->photosView, &DivePictureWidget::photoDoubleClicked,
[](const QString& path) {
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
}
);
}
TabDivePhotos::~TabDivePhotos()
{
delete ui;
}
void TabDivePhotos::clear()
{
updateData();
}
void TabDivePhotos::contextMenuEvent(QContextMenuEvent *event)
{
QMenu popup(this);
popup.addAction(tr("Load image(s) from file(s)"), this, &TabDivePhotos::addPhotosFromFile);
popup.addAction(tr("Load image(s) from web"), this, &TabDivePhotos::addPhotosFromURL);
popup.addSeparator();
popup.addAction(tr("Delete selected images"), this, &TabDivePhotos::removeSelectedPhotos);
popup.addAction(tr("Delete all images"), this, &TabDivePhotos::removeAllPhotos);
popup.exec(event->globalPos());
event->accept();
}
void TabDivePhotos::removeSelectedPhotos()
{
bool last = false;
if (!ui->photosView->selectionModel()->hasSelection())
return;
QModelIndexList indexes = ui->photosView->selectionModel()->selectedRows();
if (indexes.count() == 0)
indexes = ui->photosView->selectionModel()->selectedIndexes();
QModelIndex photo = indexes.first();
do {
photo = indexes.first();
last = indexes.count() == 1;
if (photo.isValid()) {
QString fileUrl = photo.data(Qt::DisplayPropertyRole).toString();
if (fileUrl.length() > 0)
DivePictureModel::instance()->removePicture(fileUrl, last);
}
indexes.removeFirst();
} while(!indexes.isEmpty());
}
//TODO: This looks overly wrong. We shouldn't call MainWindow to retrieve the DiveList to add Images.
void TabDivePhotos::addPhotosFromFile()
{
MainWindow::instance()->dive_list()->loadImages();
}
void TabDivePhotos::addPhotosFromURL()
{
MainWindow::instance()->dive_list()->loadWebImages();
}
void TabDivePhotos::removeAllPhotos()
{
if (QMessageBox::warning(this, tr("Deleting Images"), tr("Are you sure you want to delete all images?"), QMessageBox::Cancel | QMessageBox::Ok, QMessageBox::Cancel) != QMessageBox::Cancel ) {
ui->photosView->selectAll();
removeSelectedPhotos();
}
}
void TabDivePhotos::updateData()
{
divePictureModel->updateDivePictures();
}

View file

@ -0,0 +1,33 @@
#ifndef TAB_DIVE_PHOTOS_H
#define TAB_DIVE_PHOTOS_H
#include "TabBase.h"
namespace Ui {
class TabDivePhotos;
};
class DivePictureModel;
class TabDivePhotos : public TabBase {
Q_OBJECT
public:
TabDivePhotos(QWidget *parent);
~TabDivePhotos();
void updateData() override;
void clear() override;
protected:
void contextMenuEvent(QContextMenuEvent *ev) override;
private:
void addPhotosFromFile();
void addPhotosFromURL();
void removeAllPhotos();
void removeSelectedPhotos();
Ui::TabDivePhotos *ui;
DivePictureModel *divePictureModel;
};
#endif

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TabDivePhotos</class>
<widget class="QWidget" name="TabDivePhotos">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Photos</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="DivePictureWidget" name="photosView">
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>DivePictureWidget</class>
<extends>QListView</extends>
<header>desktop-widgets/divepicturewidget.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View file

@ -0,0 +1,125 @@
#include "TabDiveStatistics.h"
#include "ui_TabDiveStatistics.h"
#include <core/helpers.h>
#include <core/display.h>
#include <core/statistics.h>
TabDiveStatistics::TabDiveStatistics(QWidget *parent) : TabBase(parent), ui(new Ui::TabDiveStatistics())
{
ui->setupUi(this);
ui->sacLimits->overrideMaxToolTipText(tr("Highest total SAC of a dive"));
ui->sacLimits->overrideMinToolTipText(tr("Lowest total SAC of a dive"));
ui->sacLimits->overrideAvgToolTipText(tr("Average total SAC of all selected dives"));
ui->tempLimits->overrideMaxToolTipText(tr("Highest temperature"));
ui->tempLimits->overrideMinToolTipText(tr("Lowest temperature"));
ui->tempLimits->overrideAvgToolTipText(tr("Average temperature of all selected dives"));
ui->depthLimits->overrideMaxToolTipText(tr("Deepest dive"));
ui->depthLimits->overrideMinToolTipText(tr("Shallowest dive"));
ui->timeLimits->overrideMaxToolTipText(tr("Longest dive"));
ui->timeLimits->overrideMinToolTipText(tr("Shortest dive"));
ui->timeLimits->overrideAvgToolTipText(tr("Average length of all selected dives"));
Q_FOREACH (QObject *obj, children()) {
if (QLabel *label = qobject_cast<QLabel *>(obj))
label->setAlignment(Qt::AlignHCenter);
}
}
TabDiveStatistics::~TabDiveStatistics()
{
delete ui;
}
void TabDiveStatistics::clear()
{
ui->depthLimits->clear();
ui->sacLimits->clear();
ui->divesAllText->clear();
ui->tempLimits->clear();
ui->totalTimeAllText->clear();
ui->timeLimits->clear();
}
void TabDiveStatistics::updateData()
{
clear();
ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, true));
ui->depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, true));
// the overall average depth is really confusing when listed between the
// deepest and shallowest dive - let's just not set it
// ui->depthLimits->setAverage(get_depth_string(stats_selection.avg_depth, true));
if (amount_selected > 1 && stats_selection.max_sac.mliter)
ui->sacLimits->setMaximum(get_volume_string(stats_selection.max_sac, true).append(tr("/min")));
else
ui->sacLimits->setMaximum("");
if (amount_selected > 1 && stats_selection.min_sac.mliter)
ui->sacLimits->setMinimum(get_volume_string(stats_selection.min_sac, true).append(tr("/min")));
else
ui->sacLimits->setMinimum("");
if (stats_selection.avg_sac.mliter)
ui->sacLimits->setAverage(get_volume_string(stats_selection.avg_sac, true).append(tr("/min")));
else
ui->sacLimits->setAverage("");
temperature_t temp;
temp.mkelvin = stats_selection.max_temp;
ui->tempLimits->setMaximum(get_temperature_string(temp, true));
temp.mkelvin = stats_selection.min_temp;
ui->tempLimits->setMinimum(get_temperature_string(temp, true));
if (stats_selection.combined_temp && stats_selection.combined_count) {
const char *unit;
get_temp_units(0, &unit);
ui->tempLimits->setAverage(QString("%1%2").arg(stats_selection.combined_temp / stats_selection.combined_count, 0, 'f', 1).arg(unit));
}
ui->divesAllText->setText(QString::number(stats_selection.selection_size));
ui->totalTimeAllText->setText(get_time_string_s(stats_selection.total_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE)));
int seconds = stats_selection.total_time.seconds;
if (stats_selection.selection_size)
seconds /= stats_selection.selection_size;
ui->timeLimits->setAverage(get_time_string_s(seconds, 0,(displayed_dive.dc.divemode == FREEDIVE)));
if (amount_selected > 1) {
ui->timeLimits->setMaximum(get_time_string_s(stats_selection.longest_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE)));
ui->timeLimits->setMinimum(get_time_string_s(stats_selection.shortest_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE)));
} else {
ui->timeLimits->setMaximum("");
ui->timeLimits->setMinimum("");
}
QVector<QPair<QString, int> > gasUsed;
QString gasUsedString;
volume_t vol;
selectedDivesGasUsed(gasUsed);
for (int j = 0; j < 20; j++) {
if (gasUsed.isEmpty())
break;
QPair<QString, int> gasPair = gasUsed.last();
gasUsed.pop_back();
vol.mliter = gasPair.second;
gasUsedString.append(gasPair.first).append(": ").append(get_volume_string(vol, true)).append("\n");
}
if (!gasUsed.isEmpty())
gasUsedString.append("...");
volume_t o2_tot = {}, he_tot = {};
selected_dives_gas_parts(&o2_tot, &he_tot);
/* No need to show the gas mixing information if diving
* with pure air, and only display the he / O2 part when
* it is used.
*/
if (he_tot.mliter || o2_tot.mliter) {
gasUsedString.append(tr("These gases could be\nmixed from Air and using:\n"));
if (he_tot.mliter)
gasUsedString.append(QString("He: %1").arg(get_volume_string(he_tot, true)));
if (he_tot.mliter && o2_tot.mliter)
gasUsedString.append(tr(" and "));
if (o2_tot.mliter)
gasUsedString.append(QString("O2: %2\n").arg(get_volume_string(o2_tot, true)));
}
ui->gasConsumption->setText(gasUsedString);
}

View file

@ -0,0 +1,22 @@
#ifndef TAB_DIVE_STATISTICS_H
#define TAB_DIVE_STATISTICS_H
#include "TabBase.h"
namespace Ui {
class TabDiveStatistics;
};
class TabDiveStatistics : public TabBase {
Q_OBJECT
public:
TabDiveStatistics(QWidget *parent);
~TabDiveStatistics();
void updateData() override;
void clear() override;
private:
Ui::TabDiveStatistics *ui;
};
#endif

View file

@ -0,0 +1,222 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TabDiveStatistics</class>
<widget class="QWidget" name="TabDiveStatistics">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Statistics</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QScrollArea" name="scrollArea_4">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_4">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>388</width>
<height>288</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QGroupBox" name="groupBoxb">
<property name="title">
<string>Depth</string>
</property>
<layout class="QHBoxLayout" name="statsDepthLayout">
<item>
<widget class="MinMaxAvgWidget" name="depthLimits" native="true"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_14">
<property name="title">
<string>Duration</string>
</property>
<layout class="QHBoxLayout" name="statsDurationLayout">
<item>
<widget class="MinMaxAvgWidget" name="timeLimits" native="true"/>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QGroupBox" name="groupBox_8b">
<property name="title">
<string>Temperature</string>
</property>
<layout class="QHBoxLayout" name="statsTempLayout">
<item>
<widget class="MinMaxAvgWidget" name="tempLimits" native="true"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_11b">
<property name="title">
<string>Total time</string>
</property>
<layout class="QHBoxLayout" name="statsTotalTimeLayout">
<item>
<widget class="QLabel" name="totalTimeAllText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_7b">
<property name="title">
<string>Dives</string>
</property>
<layout class="QHBoxLayout" name="statsDivesLayout">
<item>
<widget class="QLabel" name="divesAllText">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QGroupBox" name="groupBox_4b">
<property name="title">
<string>SAC</string>
</property>
<layout class="QHBoxLayout" name="statsSacLayout">
<item>
<widget class="MinMaxAvgWidget" name="sacLimits" native="true"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_13">
<property name="title">
<string>Gas consumption</string>
</property>
<layout class="QHBoxLayout" name="statsGasConsumptionLayout">
<item>
<widget class="QLabel" name="gasConsumption">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>MinMaxAvgWidget</class>
<extends>QWidget</extends>
<header>desktop-widgets/simplewidgets.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,129 @@
/*
* maintab.h
*
* header file for the main tab of Subsurface
*
*/
#ifndef MAINTAB_H
#define MAINTAB_H
#include <QTabWidget>
#include <QDialog>
#include <QMap>
#include <QUuid>
#include "ui_maintab.h"
#include "qt-models/completionmodels.h"
#include "qt-models/divelocationmodel.h"
#include "core/dive.h"
class WeightModel;
class CylindersModel;
class ExtraDataModel;
class DivePictureModel;
class QCompleter;
struct Completers {
QCompleter *divemaster;
QCompleter *buddy;
QCompleter *suit;
QCompleter *tags;
};
class TabBase;
class MainTab : public QTabWidget {
Q_OBJECT
public:
enum EditMode {
NONE,
DIVE,
TRIP,
ADD,
MANUALLY_ADDED_DIVE,
IGNORE
};
MainTab(QWidget *parent = 0);
~MainTab();
void clearTabs();
void clearEquipment();
void reload();
void initialUiSetup();
bool isEditing();
void updateCoordinatesText(qreal lat, qreal lon);
void refreshDisplayedDiveSite();
void nextInputField(QKeyEvent *event);
void showAndTriggerEditSelective(struct dive_components what);
signals:
void addDiveFinished();
void dateTimeChanged();
void diveSiteChanged(struct dive_site * ds);
public
slots:
void addCylinder_clicked();
void addWeight_clicked();
void refreshDiveInfo();
void updateDiveInfo(bool clear = false);
void updateDepthDuration();
void acceptChanges();
void rejectChanges();
void on_location_diveSiteSelected();
void on_location_textChanged();
void on_divemaster_textChanged();
void on_buddy_textChanged();
void on_suit_textChanged(const QString &text);
void on_diveTripLocation_textEdited(const QString& text);
void on_notes_textChanged();
void on_airtemp_textChanged(const QString &text);
void on_duration_textChanged(const QString &text);
void on_depth_textChanged(const QString &text);
void divetype_Changed(int);
void on_watertemp_textChanged(const QString &text);
void validate_temp_field(QLineEdit *tempField, const QString &text);
void on_dateEdit_dateChanged(const QDate &date);
void on_timeEdit_timeChanged(const QTime & time);
void on_rating_valueChanged(int value);
void on_visibility_valueChanged(int value);
void on_tagWidget_textChanged();
void editCylinderWidget(const QModelIndex &index);
void editWeightWidget(const QModelIndex &index);
void addDiveStarted();
void addMessageAction(QAction *action);
void hideMessage();
void closeMessage();
void displayMessage(QString str);
void enableEdition(EditMode newEditMode = NONE);
void toggleTriggeredColumn();
void updateTextLabels(bool showUnits = true);
void escDetected(void);
void showLocation();
void enableGeoLookupEdition();
void disableGeoLookupEdition();
void setCurrentLocationIndex();
EditMode getEditMode() const;
private:
Ui::MainTab ui;
WeightModel *weightModel;
CylindersModel *cylindersModel;
EditMode editMode;
BuddyCompletionModel buddyModel;
DiveMasterCompletionModel diveMasterModel;
SuitCompletionModel suitModel;
TagCompletionModel tagModel;
Completers completers;
bool modified;
bool copyPaste;
void resetPallete();
void saveTags();
void saveTaggedStrings();
void diffTaggedStrings(QString currentString, QString displayedString, QStringList &addedList, QStringList &removedList);
void markChangedWidget(QWidget *w);
dive_trip_t *currentTrip;
dive_trip_t displayedTrip;
bool acceptingEdit;
uint32_t updateDiveSite(uint32_t pickedUuid, int divenr);
QList<TabBase*> extraWidgets;
};
#endif // MAINTAB_H

View file

@ -0,0 +1,657 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainTab</class>
<widget class="QTabWidget" name="MainTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>463</width>
<height>815</height>
</rect>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="notesTab">
<attribute name="title">
<string>Notes</string>
</attribute>
<attribute name="toolTip">
<string>General notes about the current selection</string>
</attribute>
<layout class="QGridLayout" name="diveNotesLayout">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="2" column="1">
<widget class="KMessageWidget" name="diveNotesMessage"/>
</item>
<item row="3" column="1">
<widget class="QScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>445</width>
<height>726</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="horizontalSpacing">
<number>8</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="2" column="3">
<widget class="QLabel" name="durationLabel">
<property name="text">
<string>Duration</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Date</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label">
<property name="text">
<string>Time</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="airTempLabel">
<property name="text">
<string>Air temp.</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="waterTempLabel">
<property name="text">
<string>Water temp.</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QDateEdit" name="dateEdit">
<property name="calendarPopup">
<bool>true</bool>
</property>
<property name="timeSpec">
<enum>Qt::UTC</enum>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QTimeEdit" name="timeEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="timeSpec">
<enum>Qt::UTC</enum>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="airtemp">
<property name="readOnly">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLineEdit" name="watertemp">
<property name="readOnly">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="depthLabel">
<property name="text">
<string>Depth</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="depth"/>
</item>
<item row="3" column="3">
<widget class="QLineEdit" name="duration"/>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<item>
<layout class="QHBoxLayout" name="LocationLayout" stretch="0,1">
<item>
<widget class="QLabel" name="LocationLabel">
<property name="text">
<string>Location</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="locationTags">
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="DiveLocationLineEdit" name="location"/>
</item>
<item>
<widget class="QToolButton" name="editDiveSiteButton">
<property name="toolTip">
<string>Edit dive site</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../subsurface.qrc">
<normaloff>:/geocode</normaloff>:/geocode</iconset>
</property>
</widget>
</item>
<item>
<widget class="QtWaitingSpinner" name="waitingSpinner" native="true"/>
</item>
</layout>
</item>
<item>
<widget class="QLineEdit" name="diveTripLocation"/>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_4">
<property name="leftMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="horizontalSpacing">
<number>5</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="DivemasterLabel">
<property name="text">
<string>Divemaster</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="BuddyLabel">
<property name="text">
<string>Buddy</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="TagWidget" name="divemaster">
<property name="readOnly">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="TagWidget" name="buddy">
<property name="readOnly">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,0,1">
<property name="leftMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="horizontalSpacing">
<number>5</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="RatingLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Rating</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="visibilityLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Visibility</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="SuitLabel">
<property name="text">
<string>Suit</string>
</property>
</widget>
</item>
<item row="1" column="0" alignment="Qt::AlignVCenter">
<widget class="StarWidget" name="rating" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
</widget>
</item>
<item row="1" column="1" alignment="Qt::AlignVCenter">
<widget class="StarWidget" name="visibility" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="suit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<property name="horizontalSpacing">
<number>5</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="1" column="1">
<widget class="QComboBox" name="DiveType"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="TagLabel">
<property name="text">
<string>Tags</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="TypeLabel">
<property name="text">
<string>Dive mode</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="TagWidget" name="tagWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="NotesLabel">
<property name="text">
<string>Notes</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="notesAndSocialNetworksLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QTextEdit" name="notes">
<property name="readOnly">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="socialNetworks" native="true">
<layout class="QVBoxLayout" name="socialNetworksLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="equipmentTab">
<attribute name="title">
<string>Equipment</string>
</attribute>
<attribute name="toolTip">
<string>Used equipment in the current selection</string>
</attribute>
<layout class="QGridLayout" name="equiptmentTabLayout">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item row="0" column="0">
<widget class="KMessageWidget" name="diveEquipmentMessage"/>
</item>
<item row="1" column="0">
<widget class="QScrollArea" name="scrollArea_2">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_2">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>445</width>
<height>720</height>
</rect>
</property>
<layout class="QGridLayout" name="equipmentTabScrollAreaLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>2</number>
</property>
<item row="1" column="0">
<widget class="QWidget" name="widget" native="true">
<layout class="QVBoxLayout" name="cylinderWeightsLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="TableView" name="cylinders" native="true"/>
<widget class="TableView" name="weights" native="true"/>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>KMessageWidget</class>
<extends>QFrame</extends>
<header>desktop-widgets/kmessagewidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>StarWidget</class>
<extends>QWidget</extends>
<header>desktop-widgets/starwidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>TableView</class>
<extends>QWidget</extends>
<header>desktop-widgets/tableview.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>TagWidget</class>
<extends>QPlainTextEdit</extends>
<header>desktop-widgets/tagwidget.h</header>
</customwidget>
<customwidget>
<class>QtWaitingSpinner</class>
<extends>QWidget</extends>
<header>desktop-widgets/qtwaitingspinner.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>DiveLocationLineEdit</class>
<extends>QLineEdit</extends>
<header>desktop-widgets/locationinformation.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>dateEdit</tabstop>
<tabstop>timeEdit</tabstop>
<tabstop>airtemp</tabstop>
<tabstop>watertemp</tabstop>
<tabstop>divemaster</tabstop>
<tabstop>buddy</tabstop>
<tabstop>rating</tabstop>
<tabstop>visibility</tabstop>
<tabstop>suit</tabstop>
<tabstop>notes</tabstop>
</tabstops>
<resources>
<include location="../../subsurface.qrc"/>
</resources>
<connections/>
</ui>