mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Polish up on classes
This patch polishes up on all classes added for dive computer configuration to give a clean workflow. The classes can now write and read data from the OSTC 3. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
This commit is contained in:
parent
4fc16b1674
commit
20eb62a98a
7 changed files with 150 additions and 60 deletions
|
@ -11,31 +11,29 @@
|
|||
class ReadSettingsThread : public QThread {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ReadSettingsThread(QObject *parent, DeviceDetails *deviceDetails, device_data_t *data);
|
||||
ReadSettingsThread(QObject *parent, device_data_t *data);
|
||||
virtual void run();
|
||||
QString result;
|
||||
QString lastError;
|
||||
signals:
|
||||
void error(QString err);
|
||||
void devicedetails(DeviceDetails *newDeviceDetails);
|
||||
private:
|
||||
DeviceDetails *m_deviceDetails;
|
||||
device_data_t *m_data;
|
||||
};
|
||||
|
||||
class WriteSettingsThread : public QThread {
|
||||
Q_OBJECT
|
||||
public:
|
||||
WriteSettingsThread(QObject *parent, DeviceDetails *deviceDetails, QString settingName, QVariant settingValue);
|
||||
WriteSettingsThread(QObject *parent, device_data_t *data);
|
||||
void setDeviceDetails(DeviceDetails *details);
|
||||
virtual void run();
|
||||
QString result;
|
||||
QString lastError;
|
||||
signals:
|
||||
void error(QString err);
|
||||
private:
|
||||
device_data_t *data;
|
||||
QString m_settingName;
|
||||
QVariant m_settingValue;
|
||||
|
||||
device_data_t *m_data;
|
||||
DeviceDetails *m_deviceDetails;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue