Added the code to show the cylinders from a dive.

i
Added the code to show the cylinders from a dive,
this code also already permits additions from the
interface, so the user can click 'add' and insert
what he wants there.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-05-21 09:33:55 -03:00
parent 246fbd0333
commit 126bc8cfa3
4 changed files with 44 additions and 28 deletions

View file

@ -202,6 +202,7 @@ void MainTab::updateDiveInfo(int dive)
ui->averageTimeAllText->setText(get_time_string(seconds, 0));
ui->longestAllText->setText(get_time_string(stats_selection.longest_time.seconds, 0));
ui->shortestAllText->setText(get_time_string(stats_selection.shortest_time.seconds, 0));
cylindersModel->setDive(d);
} else {
/* make the fields read-only */
ui->location->setReadOnly(true);
@ -226,6 +227,7 @@ void MainTab::updateDiveInfo(int dive)
ui->airTemperatureText->clear();
ui->gasUsedText->clear();
ui->airPressureText->clear();
cylindersModel->clear();
}
/* statisticsTab*/
/* we can access the stats_selection struct, but how do we ensure the relevant dives are selected
@ -292,7 +294,6 @@ void MainTab::on_delWeight_clicked()
void MainTab::reload()
{
cylindersModel->update();
}
void MainTab::on_editAccept_clicked(bool edit)