summaryrefslogtreecommitdiffstats
path: root/qt-ui/addweightsystemdialog.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-22 12:14:06 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-22 12:14:06 -0700
commit63b6f7d5a25967f003a734d2058a73b4b13e8387 (patch)
tree0f5d68199afacaa04bd2bac7029fc08e42db18c5 /qt-ui/addweightsystemdialog.cpp
parent9c3b512701c59955350f317eb6d19e6fdc93f546 (diff)
parent134e20bdc27f63c73ef8257dc357ae05642fece8 (diff)
downloadsubsurface-63b6f7d5a25967f003a734d2058a73b4b13e8387.tar.gz
Merge branch 'comboBoxDelegate' of https://github.com/tcanabrava/subsurface
Diffstat (limited to 'qt-ui/addweightsystemdialog.cpp')
-rw-r--r--qt-ui/addweightsystemdialog.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/qt-ui/addweightsystemdialog.cpp b/qt-ui/addweightsystemdialog.cpp
deleted file mode 100644
index 48a399de9..000000000
--- a/qt-ui/addweightsystemdialog.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * addweightsystemdialog.cpp
- *
- * classes for the add weightsystem dialog of Subsurface
- *
- */
-#include "addweightsystemdialog.h"
-#include "ui_addweightsystemdialog.h"
-#include <QComboBox>
-#include <QDoubleSpinBox>
-#include "../conversions.h"
-#include "models.h"
-
-AddWeightsystemDialog::AddWeightsystemDialog(QWidget *parent) : ui(new Ui::AddWeightsystemDialog())
-{
- ui->setupUi(this);
- currentWeightsystem = NULL;
-}
-
-void AddWeightsystemDialog::setWeightsystem(weightsystem_t *ws)
-{
- currentWeightsystem = ws;
-
- ui->description->insert(QString(ws->description));
- if (get_units()->weight == units::KG)
- ui->weight->setValue(ws->weight.grams / 1000);
- else
- ui->weight->setValue(grams_to_lbs(ws->weight.grams));
-}
-
-void AddWeightsystemDialog::updateWeightsystem()
-{
- currentWeightsystem->description = strdup(ui->description->text().toUtf8().data());
- if (get_units()->weight == units::KG)
- currentWeightsystem->weight.grams = ui->weight->value() * 1000;
- else
- currentWeightsystem->weight.grams = lbs_to_grams(ui->weight->value());
-}
-