diff options
-rw-r--r-- | qt-ui/maintab.cpp | 7 | ||||
-rw-r--r-- | qt-ui/maintab.ui | 60 |
2 files changed, 48 insertions, 19 deletions
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<QObject *> infoTabWidgets = ui->infoTab->children(); - Q_FOREACH(QObject* obj, infoTabWidgets) { - QLabel* label = qobject_cast<QLabel *>(obj); - if (label) - label->setAlignment(Qt::AlignHCenter); - } QList<QObject *> statisticsTabWidgets = ui->statisticsTab->children(); Q_FOREACH(QObject* obj, statisticsTabWidgets) { QLabel* label = qobject_cast<QLabel *>(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 @@ <item> <widget class="QLabel" name="sacText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -240,7 +243,10 @@ <item> <widget class="QLabel" name="oxygenHeliumText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -256,7 +262,10 @@ <item> <widget class="QLabel" name="otuText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -272,7 +281,10 @@ <item> <widget class="QLabel" name="dateText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -288,7 +300,10 @@ <item> <widget class="QLabel" name="airPressureText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -304,7 +319,10 @@ <item> <widget class="QLabel" name="airTemperatureText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -320,7 +338,10 @@ <item> <widget class="QLabel" name="gasUsedText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -336,7 +357,10 @@ <item> <widget class="QLabel" name="maximumDepthText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -352,7 +376,10 @@ <item> <widget class="QLabel" name="averageDepthText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -368,7 +395,10 @@ <item> <widget class="QLabel" name="waterTemperatureText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -384,7 +414,10 @@ <item> <widget class="QLabel" name="surfaceIntervalText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> @@ -400,7 +433,10 @@ <item> <widget class="QLabel" name="diveTimeText"> <property name="text"> - <string>TextLabel</string> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> |