aboutsummaryrefslogtreecommitdiffstats
path: root/core/downloadfromdcthread.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2017-11-12 12:33:20 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-11-13 20:48:17 -0800
commitde81effb258c9c55af299ef48e79df4de941b391 (patch)
treef4b4b0501046790fdeed71a307c295db8718f676 /core/downloadfromdcthread.h
parent0d023068b340bea8db421523156b5b460eaea41d (diff)
downloadsubsurface-de81effb258c9c55af299ef48e79df4de941b391.tar.gz
Make Bluetooth naming consistent
Currently, on Linux, after selecting a Bluetooth device the name of the device is shown. On reopening the download dialog, on the other hand, the address is shown. In the device selection dialog both are shown. This patch changes the download dialog such that both, name and address, are shown. The bulk of the patch introduces the name of the device in the preferences and DCDeviceData. It has to be noted that DCDeviceData is an encapsulation of the libdivecomputer device_data_t. Nevertheless, the new Bluetooth-name field is, at the moment, not passed through to libdivecomputer. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/downloadfromdcthread.h')
-rw-r--r--core/downloadfromdcthread.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/downloadfromdcthread.h b/core/downloadfromdcthread.h
index ff4b8f39c..e95cb7a98 100644
--- a/core/downloadfromdcthread.h
+++ b/core/downloadfromdcthread.h
@@ -19,6 +19,7 @@ class DCDeviceData : public QObject {
Q_PROPERTY(QString product READ product WRITE setProduct)
Q_PROPERTY(bool bluetoothMode READ bluetoothMode WRITE setBluetoothMode)
Q_PROPERTY(QString devName READ devName WRITE setDevName)
+ Q_PROPERTY(QString devBluetoothName READ devBluetoothName WRITE setDevBluetoothName)
Q_PROPERTY(QString descriptor READ descriptor)
Q_PROPERTY(bool forceDownload READ forceDownload WRITE setForceDownload)
Q_PROPERTY(bool createNewTrip READ createNewTrip WRITE setCreateNewTrip)
@@ -34,6 +35,7 @@ public:
QString vendor() const;
QString product() const;
QString devName() const;
+ QString devBluetoothName() const;
QString descriptor() const;
bool bluetoothMode() const;
bool forceDownload() const;
@@ -57,6 +59,7 @@ public slots:
void setVendor(const QString& vendor);
void setProduct(const QString& product);
void setDevName(const QString& devName);
+ void setDevBluetoothName(const QString& devBluetoothName);
void setBluetoothMode(bool mode);
void setForceDownload(bool force);
void setCreateNewTrip(bool create);
@@ -67,6 +70,9 @@ public slots:
private:
static DCDeviceData *m_instance;
device_data_t data;
+
+ // Bluetooth name is managed outside of libdivecomputer
+ QString m_devBluetoothName;
};
class DownloadThread : public QThread {