mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:13:24 +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);
|
||||
|
|
|
@ -46,10 +46,34 @@
|
|||
<property name="verticalSpacing">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="forceDownload">
|
||||
<property name="text">
|
||||
<string>Device or mount point</string>
|
||||
<string>Force download of all dives</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Dive computer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QComboBox" name="vendor"/>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="preferDownloaded">
|
||||
<property name="text">
|
||||
<string>Always prefer downloaded dives</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="logToFile">
|
||||
<property name="text">
|
||||
<string>Save libdivecomputer logfile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -60,6 +84,23 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QCheckBox" name="bluetoothMode">
|
||||
<property name="text">
|
||||
<string>Choose Bluetooth download mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QToolButton" name="chooseBluetoothDevice">
|
||||
<property name="toolTip">
|
||||
<string>Select a remote Bluetooth device.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QToolButton" name="search">
|
||||
<property name="text">
|
||||
|
@ -67,67 +108,22 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="forceDownload">
|
||||
<property name="text">
|
||||
<string>Force download of all dives</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="preferDownloaded">
|
||||
<property name="text">
|
||||
<string>Always prefer downloaded dives</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="createNewTrip">
|
||||
<property name="text">
|
||||
<string>Download into new trip</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="logToFile">
|
||||
<property name="text">
|
||||
<string>Save libdivecomputer logfile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QToolButton" name="chooseLogFile">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="dumpToFile">
|
||||
<property name="text">
|
||||
<string>Save libdivecomputer dumpfile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<item row="11" column="1">
|
||||
<widget class="QToolButton" name="chooseDumpFile">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QCheckBox" name="bluetoothMode">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Choose Bluetooth download mode</string>
|
||||
<string>Device or mount point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QToolButton" name="chooseBluetoothDevice">
|
||||
<property name="toolTip">
|
||||
<string>Select a remote Bluetooth device.</string>
|
||||
</property>
|
||||
<item row="10" column="1">
|
||||
<widget class="QToolButton" name="chooseLogFile">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
|
@ -140,19 +136,43 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QComboBox" name="vendor"/>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="createNewTrip">
|
||||
<property name="text">
|
||||
<string>Dive computer</string>
|
||||
<string>Download into new trip</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QCheckBox" name="dumpToFile">
|
||||
<property name="text">
|
||||
<string>Save libdivecomputer dumpfile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QComboBox" name="product"/>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<layout class="QGridLayout" name="DCGrid">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="DC1">
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="DC2">
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="DC3">
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="DC4">
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
|
Loading…
Add table
Reference in a new issue