summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-07-12 14:24:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-12 08:03:34 -0700
commitc4981f28a6ada0571276bcdf75c6171e1638678d (patch)
tree6102a41cf950333b8f5073c2c5d87b43063753cb /qt-ui/diveplanner.cpp
parent6008d08557e8c883ff533d1d4205a66aba49ea95 (diff)
downloadsubsurface-c4981f28a6ada0571276bcdf75c6171e1638678d.tar.gz
Add step size in our SpinBox delegates
For the Set point spinbox, it was kinda hard just stepping by the default 1.0, so setting it to step by 0.1 makes much more sense. The int SpinBox got a step size parameter for consistency. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index a24f1487e..d98ac5992 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -290,10 +290,10 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg
connect(closeKey, SIGNAL(activated()), plannerModel, SLOT(cancelPlan()));
// This makes shure the spinbox gets a setMinimum(0) on it so we can't have negative time or depth.
- ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::DEPTH, new SpinBoxDelegate(0, INT_MAX, this));
- ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::RUNTIME, new SpinBoxDelegate(0, INT_MAX, this));
- ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::DURATION, new SpinBoxDelegate(0, INT_MAX, this));
- ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::CCSETPOINT, new DoubleSpinBoxDelegate(0.2, 2, this));
+ ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::DEPTH, new SpinBoxDelegate(0, INT_MAX, 1, this));
+ ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::RUNTIME, new SpinBoxDelegate(0, INT_MAX, 1, this));
+ ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::DURATION, new SpinBoxDelegate(0, INT_MAX, 1, this));
+ ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::CCSETPOINT, new DoubleSpinBoxDelegate(0.2, 2, 0.1, this));
/* set defaults. */
ui.ATMPressure->setValue(1013);