mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Tweaks to maintab
Align statistics tab labels as per infotab. Amend helper function to show degree symbol for temp measurements. Change order of member initialisation list to match order of decl (ProfileGraphicsView::ProfileGraphicsView) Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1245c232db
commit
97a044d41f
4 changed files with 20 additions and 4 deletions
|
@ -29,6 +29,12 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
if (label)
|
||||
label->setAlignment(Qt::AlignHCenter);
|
||||
}
|
||||
QList<QObject *> statisticsTabWidgets = ui->statisticsTab->children();
|
||||
Q_FOREACH( QObject* obj, statisticsTabWidgets ){
|
||||
QLabel* label = qobject_cast<QLabel *>(obj);
|
||||
if (label)
|
||||
label->setAlignment(Qt::AlignHCenter);
|
||||
}
|
||||
}
|
||||
|
||||
void MainTab::clearEquipment()
|
||||
|
@ -95,6 +101,7 @@ void MainTab::updateDiveInfo(int dive)
|
|||
UPDATE_TEXT(d, suit);
|
||||
UPDATE_TEXT(d, divemaster);
|
||||
UPDATE_TEXT(d, buddy);
|
||||
/* infoTab */
|
||||
if (d) {
|
||||
ui->rating->setCurrentStars(d->rating);
|
||||
ui->maximumDepthText->setText(get_depth_string(d->maxdepth, TRUE));
|
||||
|
@ -128,6 +135,13 @@ void MainTab::updateDiveInfo(int dive)
|
|||
ui->gasUsedText->setText(QString());
|
||||
ui->airPressureText->setText(QString());
|
||||
}
|
||||
/* statisticsTab*/
|
||||
/* we can access the stats_selection struct but how to we ensure the relevant dives are selected
|
||||
* if we don't use the gtk widget to drive this?
|
||||
* Maybe call process_selected_dives? Or re-write to query our Qt list view.
|
||||
*/
|
||||
qDebug("max temp %u",stats_selection.max_temp);
|
||||
qDebug("min temp %u",stats_selection.min_temp);
|
||||
}
|
||||
|
||||
void MainTab::on_addCylinder_clicked()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue