diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-05-22 14:52:38 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-05-22 14:52:38 -0300 |
commit | 134e20bdc27f63c73ef8257dc357ae05642fece8 (patch) | |
tree | 54546b6fac535625676d14bbc05a0334acb6380a /qt-ui/maintab.cpp | |
parent | 3e51476d8757752ccfa908d54b4f2425d908c839 (diff) | |
download | subsurface-134e20bdc27f63c73ef8257dc357ae05642fece8.tar.gz |
Removed the unused add cylinder and add weigthsystem dialogs.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index c172deeea..4be27426c 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -6,8 +6,6 @@ */ #include "maintab.h" #include "ui_maintab.h" -#include "addcylinderdialog.h" -#include "addweightsystemdialog.h" #include "mainwindow.h" #include "../helpers.h" #include "../statistics.h" @@ -290,21 +288,7 @@ void MainTab::updateDiveInfo(int dive) void MainTab::addCylinder_clicked() { - if (cylindersModel->rowCount() >= MAX_CYLINDERS) - return; - - AddCylinderDialog dialog(this); - cylinder_t newCylinder; - newCylinder.type.description = ""; - - dialog.setCylinder(&newCylinder); - int result = dialog.exec(); - if (result == QDialog::Rejected) { - return; - } - - dialog.updateCylinder(); - cylindersModel->add(&newCylinder); + cylindersModel->add(); } void MainTab::on_editCylinder_clicked() @@ -317,21 +301,7 @@ void MainTab::on_delCylinder_clicked() void MainTab::addWeight_clicked() { - if (weightModel->rowCount() >= MAX_WEIGHTSYSTEMS) - return; - - AddWeightsystemDialog dialog(this); - weightsystem_t newWeightsystem; - newWeightsystem.description = ""; - newWeightsystem.weight.grams = 0; - - dialog.setWeightsystem(&newWeightsystem); - int result = dialog.exec(); - if (result == QDialog::Rejected) - return; - - dialog.updateWeightsystem(); - weightModel->add(&newWeightsystem); + weightModel->add(); } void MainTab::on_editWeight_clicked() |