From 533d18e069073ede64d217cca5e5a4172a914a10 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 30 May 2013 11:22:33 -0300 Subject: This is a redesign-tryout of the Info panel. This is a redesign-tryout of the info panel, it's not the way that I want to do, actually - I think that textual representations are quite boring, and we can do much better if we use better widgets, for instance, a Calendar to show the date, a Termometer to show the temperatures and so on. This version has a fixed layout, but I'll most probably try to make it more dynamic in the future. Signed-off-by: Tomaz Canabrava --- qt-ui/maintab.ui | 504 ++++++++++++++++++++++--------------------------------- 1 file changed, 197 insertions(+), 307 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui index eed6b1c2e..7845cfb52 100644 --- a/qt-ui/maintab.ui +++ b/qt-ui/maintab.ui @@ -6,7 +6,7 @@ 0 0 - 400 + 409 368 @@ -14,7 +14,7 @@ TabWidget - 1 + 2 @@ -158,8 +158,8 @@ - - QTableView { + + QTableView { show-decoration-selected: 1; } @@ -188,11 +188,11 @@ } - - - true - - + + + true + + @@ -214,308 +214,198 @@ Dive Info - - - - - Qt::Vertical - - - - 20 - 40 - - - + + + + + SAC + + + + + + TextLabel + + + + + - - - - 10 - - - 15 - - - 10 - - - - - - 75 - true - - - - SAC - - - - - - - - 75 - true - - - - OTU - - - - - - - - 75 - true - - - - 0²/He - - - - - - - - 75 - true - - - - Gas Used - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - + + + + O²/HE + + + + + + TextLabel + + + + + - - - - Qt::Vertical - - - - 20 - 40 - - - + + + + OTU + + + + + + TextLabel + + + + + - - - - 10 - - - 15 - - - - - - 75 - true - - - - Date - - - - - - - TextLabel - - - - - - - - 75 - true - - - - Water Temp. - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - - 75 - true - - - - Air Pressure - - - - - - - - 75 - true - - - - Ave. Depth - - - - - - - - 75 - true - - - - Max. Depth - - - - - - - - 75 - true - - - - Air Temp. - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - - 75 - true - - - - Interval - - - - - - - - 75 - true - - - - Dive Time - - - - + + + + Date + + + + + + TextLabel + + + + + - - - - Qt::Vertical - - - - 20 - 40 - - - + + + + Air Pressure + + + + + + TextLabel + + + + + + + + + + Air Temperature + + + + + + TextLabel + + + + + + + + + + Gas Used + + + + + + TextLabel + + + + + + + + + + Max. Depth + + + + + + TextLabel + + + + + + + + + + Ave. Depth + + + + + + TextLabel + + + + + + + + + + Water Temperature + + + + + + TextLabel + + + + + + + + + + Interval + + + + + + TextLabel + + + + + + + + + + Dive Time + + + + + + TextLabel + + + + + -- cgit v1.2.3-70-g09d2 From bd6dfa1ebd790469fa77d220e6eea8cd11cff848 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 30 May 2013 11:30:23 -0300 Subject: Align Labels on center. There was already a code for that on the maintab.cpp, but since I moved all labels to groupboxes, the code stopped working, and I tougth it'd better to kill the code since it's faster and safer to use the interface builder for that. Signed-off-by: Tomaz Canabrava --- qt-ui/maintab.cpp | 7 ------- qt-ui/maintab.ui | 60 ++++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 48 insertions(+), 19 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index ca2f18ef0..1de80271e 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -48,13 +48,6 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), ui->rating->installEventFilter(this); ui->visibility->installEventFilter(this); - /* example of where code is more concise than Qt designer */ - QList infoTabWidgets = ui->infoTab->children(); - Q_FOREACH(QObject* obj, infoTabWidgets) { - QLabel* label = qobject_cast(obj); - if (label) - label->setAlignment(Qt::AlignHCenter); - } QList statisticsTabWidgets = ui->statisticsTab->children(); Q_FOREACH(QObject* obj, statisticsTabWidgets) { QLabel* label = qobject_cast(obj); diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui index 7845cfb52..39dcb7dc6 100644 --- a/qt-ui/maintab.ui +++ b/qt-ui/maintab.ui @@ -224,7 +224,10 @@ - TextLabel + + + + Qt::AlignCenter @@ -240,7 +243,10 @@ - TextLabel + + + + Qt::AlignCenter @@ -256,7 +262,10 @@ - TextLabel + + + + Qt::AlignCenter @@ -272,7 +281,10 @@ - TextLabel + + + + Qt::AlignCenter @@ -288,7 +300,10 @@ - TextLabel + + + + Qt::AlignCenter @@ -304,7 +319,10 @@ - TextLabel + + + + Qt::AlignCenter @@ -320,7 +338,10 @@ - TextLabel + + + + Qt::AlignCenter @@ -336,7 +357,10 @@ - TextLabel + + + + Qt::AlignCenter @@ -352,7 +376,10 @@ - TextLabel + + + + Qt::AlignCenter @@ -368,7 +395,10 @@ - TextLabel + + + + Qt::AlignCenter @@ -384,7 +414,10 @@ - TextLabel + + + + Qt::AlignCenter @@ -400,7 +433,10 @@ - TextLabel + + + + Qt::AlignCenter -- cgit v1.2.3-70-g09d2