From 28deb3e65dd04ba0eb178b44b2a3bdd16f40ef0f Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 22 May 2013 09:40:26 -0300 Subject: Re Enable the option to add cylinders / weigthsystems. Signed-off-by: Tomaz Canabrava --- qt-ui/maintab.cpp | 7 +++++-- qt-ui/maintab.h | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index bbd9ebad8..50549f2c0 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -68,9 +68,12 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), addCylinder = new QPushButton(plusIcon, QString(), ui->cylindersGroup); addCylinder->setFlat(true); addCylinder->setToolTip(tr("Add Cylinder")); + connect(addCylinder, SIGNAL(clicked(bool)), this, SLOT(addCylinder_clicked())); + addWeight = new QPushButton(plusIcon, QString(), ui->weightGroup); addWeight->setFlat(true); addWeight->setToolTip(tr("Add Weight System")); + connect(addWeight, SIGNAL(clicked(bool)), this, SLOT(addWeight_clicked())); } // We need to manually position the 'plus' on cylinder and weight. @@ -270,7 +273,7 @@ void MainTab::updateDiveInfo(int dive) // qDebug("min temp %u",stats_selection.min_temp); } -void MainTab::on_addCylinder_clicked() +void MainTab::addCylinder_clicked() { if (cylindersModel->rowCount() >= MAX_CYLINDERS) return; @@ -297,7 +300,7 @@ void MainTab::on_delCylinder_clicked() { } -void MainTab::on_addWeight_clicked() +void MainTab::addWeight_clicked() { if (weightModel->rowCount() >= MAX_WEIGHTSYSTEMS) return; diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h index 2bdb63fbc..4b10e7a6b 100644 --- a/qt-ui/maintab.h +++ b/qt-ui/maintab.h @@ -42,10 +42,10 @@ public: virtual void showEvent(QShowEvent* ); public Q_SLOTS: - void on_addCylinder_clicked(); + void addCylinder_clicked(); void on_editCylinder_clicked(); void on_delCylinder_clicked(); - void on_addWeight_clicked(); + void addWeight_clicked(); void on_editWeight_clicked(); void on_delWeight_clicked(); void updateDiveInfo(int dive); -- cgit v1.2.3-70-g09d2