mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Added the code to populate the tabs when a dive is selected.
So, this is what happens now: Every tab should be populated from updateDiveInfo method, it will be called whenever a new dive is selected I'm already populating the 'notes' box to show how it can be done. If you are unsure what's the name of anything, open the file maintab.ui on the designer, click on the item and check its objectName, the access is ui->objectName from here on. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
baee897574
commit
06eab74a72
3 changed files with 19 additions and 0 deletions
|
@ -60,6 +60,22 @@ void MainTab::clearStats()
|
|||
ui->shortestAllText->setText(QString());
|
||||
}
|
||||
|
||||
void MainTab::updateDiveInfo(int dive)
|
||||
{
|
||||
// So, this is what happens now:
|
||||
// Every tab should be populated from this method,
|
||||
// it will be called whenever a new dive is selected
|
||||
// I'm already populating the 'notes' box
|
||||
// to show how it can be done.
|
||||
// If you are unsure what's the name of anything,
|
||||
// open the file maintab.ui on the designer
|
||||
// click on the item and check its objectName,
|
||||
// the access is ui->objectName from here on.
|
||||
|
||||
struct dive *d = get_dive(dive);
|
||||
ui->notes->setText(d->notes);
|
||||
}
|
||||
|
||||
void MainTab::on_addCylinder_clicked()
|
||||
{
|
||||
if (cylindersModel->rowCount() >= MAX_CYLINDERS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue