aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-14 07:02:06 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-14 07:02:06 -0700
commit983e5f63563a091dfb15a8d3ee56bfa3e7a6e5c0 (patch)
tree65cf2814a080c1b5f3632f7612a9ef7c3dc3f448 /qt-ui
parentd8e11439ad27063b0dad05b2f8f0f4cd7f3e7de1 (diff)
parentf913eacbd95ddd9ef52dcbd29995ac2b7fc17476 (diff)
downloadsubsurface-983e5f63563a091dfb15a8d3ee56bfa3e7a6e5c0.tar.gz
Merge branch 'fixCppStyleToC' of https://github.com/tcanabrava/subsurface into Qt
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp45
1 files changed, 27 insertions, 18 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 53926cb25..7d60db5c2 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -26,28 +26,37 @@ void MainTab::clearEquipment()
void MainTab::clearInfo()
{
- QList<QLabel*> labels;
- labels << ui->sac << ui->otu << ui->oxygenhelium << ui->gasused
- << ui->date << ui->divetime << ui->surfinterval
- << ui->maxdepth << ui->avgdepth << ui->visibility
- << ui->watertemperature << ui->airtemperature << ui->airpress;
-
- Q_FOREACH(QLabel *l, labels){
- l->setText(QString());
- }
+ ui->sac->setText(QString());
+ ui->otu->setText(QString());
+ ui->oxygenhelium->setText(QString());
+ ui->gasused->setText(QString());
+ ui->date->setText(QString());
+ ui->divetime->setText(QString());
+ ui->surfinterval->setText(QString());
+ ui->maxdepth->setText(QString());
+ ui->avgdepth->setText(QString());
+ ui->visibility->setText(QString());
+ ui->watertemperature->setText(QString());
+ ui->airtemperature->setText(QString());
+ ui->airpress->setText(QString());
}
void MainTab::clearStats()
{
- QList<QLabel*> labels;
- labels << ui->maxdepth_2 << ui->mindepth << ui->avgdepth
- << ui->maxsac << ui->minsac << ui->avgsac
- << ui->dives << ui->maxtemp << ui->mintemp << ui->avgtemp
- << ui->totaltime << ui->avgtime << ui->longestdive << ui->shortestdive;
-
- Q_FOREACH(QLabel *l, labels){
- l->setText(QString());
- }
+ ui->maxdepth_2->setText(QString());
+ ui->mindepth->setText(QString());
+ ui->avgdepth->setText(QString());
+ ui->maxsac->setText(QString());
+ ui->minsac->setText(QString());
+ ui->avgsac->setText(QString());
+ ui->dives->setText(QString());
+ ui->maxtemp->setText(QString());
+ ui->mintemp->setText(QString());
+ ui->avgtemp->setText(QString());
+ ui->totaltime->setText(QString());
+ ui->avgtime->setText(QString());
+ ui->longestdive->setText(QString());
+ ui->shortestdive->setText(QString());
}
void MainTab::on_addCylinder_clicked()