mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Desktop/remember DCs: base UI
Simply create the buttons that can be used as shortcuts to previously used dive computers. This isn't hooked up at all. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
77a5c9ac65
commit
e2ee8c57df
2 changed files with 93 additions and 60 deletions
|
@ -78,6 +78,19 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) :
|
|||
ui.product->setCurrentIndex(ui.product->findText(qPrefDiveComputer::product()));
|
||||
}
|
||||
|
||||
// now lets set the four shortcuts for previously used dive computers
|
||||
#define SETUPDC(num) \
|
||||
if (!qPrefDiveComputer::vendor##num().isEmpty()) { \
|
||||
ui.DC##num->setVisible(true); \
|
||||
ui.DC##num->setText(qPrefDiveComputer::vendor##num() + " - " + qPrefDiveComputer::product##num()); \
|
||||
} else { \
|
||||
ui.DC##num->setVisible(false); \
|
||||
}
|
||||
SETUPDC(1)
|
||||
SETUPDC(2)
|
||||
SETUPDC(3)
|
||||
SETUPDC(4)
|
||||
|
||||
updateState(INITIAL);
|
||||
ui.ok->setEnabled(false);
|
||||
ui.downloadCancelRetryButton->setEnabled(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue