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 18014c8a0..11984c7b2 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 true @@ -217,308 +217,234 @@ Dive Info - - - - - Qt::Vertical + + + + + SAC - - - 20 - 40 - - - + + + + + + + + Qt::AlignCenter + + + + + - - - - 10 + + + + O²/HE - - 15 - - - 10 - - - - - - 75 - true - - - - SAC - - - - - - - - 75 - true - - - - OTU - - - - - - - - 75 - true - - - - 0²/He - - - - - - - - 75 - true - - - - Gas Used - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - + + + + + + + + Qt::AlignCenter + + + + + - - - - Qt::Vertical + + + + OTU - - - 20 - 40 - - - + + + + + + + + Qt::AlignCenter + + + + + - - - - 10 + + + + Date - - 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 - - - - + + + + + + + + Qt::AlignCenter + + + + + - - - - Qt::Vertical + + + + Air Pressure - - - 20 - 40 - + + + + + + + + Qt::AlignCenter + + + + + + + + + + Air Temperature - + + + + + + + + Qt::AlignCenter + + + + + + + + + + Gas Used + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Max. Depth + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Ave. Depth + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Water Temperature + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Interval + + + + + + + + + Qt::AlignCenter + + + + + + + + + + Dive Time + + + + + + + + + Qt::AlignCenter + + + + +