From 085dca69e53255c717794c76d4a23a569936ed8e Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 30 May 2013 11:44:27 -0300 Subject: Redesign of the Statistics tab try1 This moves the contents of the statistics tab to groupboxes, so it's similar to what we had in GTK, but a bit prettier. it's not what I plan to do in the final form, since I think that a few 'min max avg' can be in it's own widget ( and maybe a cute graph showing the values would also be nice. ) but its an improvement from what we had. Signed-off-by: Tomaz Canabrava --- qt-ui/maintab.ui | 622 ++++++++++++++++++++++++------------------------------- 1 file changed, 274 insertions(+), 348 deletions(-) diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui index eed6b1c2e..2b9f74b30 100644 --- a/qt-ui/maintab.ui +++ b/qt-ui/maintab.ui @@ -6,15 +6,15 @@ 0 0 - 400 - 368 + 692 + 513 TabWidget - 1 + 3 @@ -158,8 +158,8 @@ - - QTableView { + + QTableView { show-decoration-selected: 1; } @@ -188,11 +188,11 @@ } - - - true - - + + + true + + @@ -523,348 +523,274 @@ Stats - - - - - Qt::Vertical - - - - 20 - 20 - - - + + + + + Max. Temp. + + + + + + TextLabel + + + Qt::AlignCenter + + + + + - - - - 10 - - - 15 - - - - - - 75 - true - - - - Max. Depth - - - - - - - - 75 - true - - - - Min. Depth - - - - - - - - 75 - true - - - - Ave. Depth - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - - 75 - true - - - - Max. SAC - - - - - - - - 75 - true - - - - Min. SAC - - - - - - - - 75 - true - - - - Ave. SAC - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - + + + + Min Depth + + + + + + TextLabel + + + Qt::AlignCenter + + + + + - - - - Qt::Vertical - - - - 20 - 20 - - - + + + + Max. Depth + + + + + + TextLabel + + + Qt::AlignCenter + + + + + maximumDepthAllText + minimumDepthAllText + - - - - 10 - - - 15 - - - - - - 75 - true - - - - Dives - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - - 75 - true - - - - Max. Temp. - - - - - - - - 75 - true - - - - Min. Temp. - - - - - - - - 75 - true - - - - Ave. Temp. - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - - 75 - true - - - - Total Time - - - - - - - - 75 - true - - - - Ave. Time - - - - - - - - 75 - true - - - - Longest - - - - - - - - 75 - true - - - - Shortest - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - + + + + Ave. Temp. + + + + + + TextLabel + + + Qt::AlignCenter + + + + + - - - - Qt::Vertical - - - - 20 - 20 - - - + + + + Ave. Time + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + Min. Temp. + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + Ave. Depth + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + Max. SAC + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + Min. SAC + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + Ave. SAC + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + Dives + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + Longest + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + Total Time + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + Shortest + + + + + + TextLabel + + + Qt::AlignCenter + + + + + -- cgit v1.2.3-70-g09d2 From 8f713447085ab833201f469024a582f47e5b3c60 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 30 May 2013 11:46:06 -0300 Subject: Removed the code to center-allign labels on the Statistics Since I already put the center-allign label on the interface designer, this was just dead code. getting rid of it. Signed-off-by: Tomaz Canabrava --- qt-ui/maintab.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index ca2f18ef0..57f0d1da5 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -55,12 +55,6 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), if (label) label->setAlignment(Qt::AlignHCenter); } - QList statisticsTabWidgets = ui->statisticsTab->children(); - Q_FOREACH(QObject* obj, statisticsTabWidgets) { - QLabel* label = qobject_cast(obj); - if (label) - label->setAlignment(Qt::AlignHCenter); - } /*Thid couldn't be done on the ui file because element is floating, instead of being fixed on the layout. */ -- cgit v1.2.3-70-g09d2