summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Amit Chaudhuri <amit.k.chaudhuri@gmail.com>2013-05-10 23:56:05 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-10 16:01:17 -0700
commit97a044d41f67757de1e5bd0694f6502af1be4f4c (patch)
tree72e6b235c2dd3ff0bb4da33418a904e4f79a73ba /qt-ui
parent1245c232dba019d5a87102b93c1a011e0998b47c (diff)
downloadsubsurface-97a044d41f67757de1e5bd0694f6502af1be4f4c.tar.gz
Tweaks to maintab
Align statistics tab labels as per infotab. Amend helper function to show degree symbol for temp measurements. Change order of member initialisation list to match order of decl (ProfileGraphicsView::ProfileGraphicsView) Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp14
-rw-r--r--qt-ui/profilegraphics.cpp2
2 files changed, 15 insertions, 1 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index e1ac7c275..edacf45a4 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -29,6 +29,12 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
if (label)
label->setAlignment(Qt::AlignHCenter);
}
+ QList<QObject *> statisticsTabWidgets = ui->statisticsTab->children();
+ Q_FOREACH( QObject* obj, statisticsTabWidgets ){
+ QLabel* label = qobject_cast<QLabel *>(obj);
+ if (label)
+ label->setAlignment(Qt::AlignHCenter);
+ }
}
void MainTab::clearEquipment()
@@ -95,6 +101,7 @@ void MainTab::updateDiveInfo(int dive)
UPDATE_TEXT(d, suit);
UPDATE_TEXT(d, divemaster);
UPDATE_TEXT(d, buddy);
+ /* infoTab */
if (d) {
ui->rating->setCurrentStars(d->rating);
ui->maximumDepthText->setText(get_depth_string(d->maxdepth, TRUE));
@@ -128,6 +135,13 @@ void MainTab::updateDiveInfo(int dive)
ui->gasUsedText->setText(QString());
ui->airPressureText->setText(QString());
}
+ /* statisticsTab*/
+ /* we can access the stats_selection struct but how to we ensure the relevant dives are selected
+ * if we don't use the gtk widget to drive this?
+ * Maybe call process_selected_dives? Or re-write to query our Qt list view.
+ */
+ qDebug("max temp %u",stats_selection.max_temp);
+ qDebug("min temp %u",stats_selection.min_temp);
}
void MainTab::on_addCylinder_clicked()
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index 6e699fe51..c6a2669ef 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -114,7 +114,7 @@ extern struct ev_select *ev_namelist;
extern int evn_allocated;
extern int evn_used;
-ProfileGraphicsView::ProfileGraphicsView(QWidget* parent) : QGraphicsView(parent) , dive(0), toolTip(0)
+ProfileGraphicsView::ProfileGraphicsView(QWidget* parent) : QGraphicsView(parent), toolTip(0) , dive(0)
{
gc.printer = false;
setScene(new QGraphicsScene());