mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: add variable for libdc logfile
It seemed cleanest and easiest to have this in the QMLManager and not in the DCDownload object. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ff659396c3
commit
0a0c93e3b7
2 changed files with 19 additions and 1 deletions
|
@ -85,7 +85,8 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
|
||||||
m_selectedDiveTimestamp(0),
|
m_selectedDiveTimestamp(0),
|
||||||
m_credentialStatus(UNKNOWN),
|
m_credentialStatus(UNKNOWN),
|
||||||
alreadySaving(false),
|
alreadySaving(false),
|
||||||
m_device_data(new DCDeviceData(this))
|
m_device_data(new DCDeviceData(this)),
|
||||||
|
m_libdcLog(false)
|
||||||
{
|
{
|
||||||
m_instance = this;
|
m_instance = this;
|
||||||
m_lastDevicePixelRatio = qApp->devicePixelRatio();
|
m_lastDevicePixelRatio = qApp->devicePixelRatio();
|
||||||
|
@ -1544,6 +1545,17 @@ void QMLManager::setProgressMessage(QString text)
|
||||||
emit progressMessageChanged();
|
emit progressMessageChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QMLManager::libdcLog() const
|
||||||
|
{
|
||||||
|
return m_libdcLog;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QMLManager::setLibdcLog(bool value)
|
||||||
|
{
|
||||||
|
m_libdcLog = value;
|
||||||
|
emit libdcLogChanged();
|
||||||
|
}
|
||||||
|
|
||||||
#if defined (Q_OS_ANDROID)
|
#if defined (Q_OS_ANDROID)
|
||||||
|
|
||||||
void writeToAppLogFile(QString logText)
|
void writeToAppLogFile(QString logText)
|
||||||
|
|
|
@ -41,6 +41,7 @@ class QMLManager : public QObject {
|
||||||
Q_PROPERTY(QStringList cylinderInit READ cylinderInit CONSTANT)
|
Q_PROPERTY(QStringList cylinderInit READ cylinderInit CONSTANT)
|
||||||
Q_PROPERTY(bool showPin READ showPin WRITE setShowPin NOTIFY showPinChanged)
|
Q_PROPERTY(bool showPin READ showPin WRITE setShowPin NOTIFY showPinChanged)
|
||||||
Q_PROPERTY(QString progressMessage READ progressMessage WRITE setProgressMessage NOTIFY progressMessageChanged)
|
Q_PROPERTY(QString progressMessage READ progressMessage WRITE setProgressMessage NOTIFY progressMessageChanged)
|
||||||
|
Q_PROPERTY(bool libdcLog READ libdcLog WRITE setLibdcLog NOTIFY libdcLogChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QMLManager();
|
QMLManager();
|
||||||
|
@ -115,6 +116,9 @@ public:
|
||||||
QString progressMessage() const;
|
QString progressMessage() const;
|
||||||
void setProgressMessage(QString text);
|
void setProgressMessage(QString text);
|
||||||
|
|
||||||
|
bool libdcLog() const;
|
||||||
|
void setLibdcLog(bool value);
|
||||||
|
|
||||||
typedef void (QMLManager::*execute_function_type)();
|
typedef void (QMLManager::*execute_function_type)();
|
||||||
DiveListSortModel *dlSortModel;
|
DiveListSortModel *dlSortModel;
|
||||||
|
|
||||||
|
@ -211,6 +215,7 @@ private:
|
||||||
bool m_showPin;
|
bool m_showPin;
|
||||||
DCDeviceData *m_device_data;
|
DCDeviceData *m_device_data;
|
||||||
QString m_progressMessage;
|
QString m_progressMessage;
|
||||||
|
bool m_libdcLog;
|
||||||
#if defined(Q_OS_ANDROID)
|
#if defined(Q_OS_ANDROID)
|
||||||
QString appLogFileName;
|
QString appLogFileName;
|
||||||
QFile appLogFile;
|
QFile appLogFile;
|
||||||
|
@ -239,6 +244,7 @@ signals:
|
||||||
void showPinChanged();
|
void showPinChanged();
|
||||||
void sendScreenChanged(QScreen *screen);
|
void sendScreenChanged(QScreen *screen);
|
||||||
void progressMessageChanged();
|
void progressMessageChanged();
|
||||||
|
void libdcLogChanged();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue