Remove redundant QML getter functions

QMLManager was full of redundant getter functions of the type
bool QMLManager::locationServiceAvailable() const
{
       return m_locationServiceAvailable;
}
These can be removed changing READ keywords to MEMBER keywords
in the QPROPERTY declarations.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-01-17 21:15:43 +01:00 committed by Jan Mulder
parent 2d24dceafa
commit ee17024ac5
2 changed files with 52 additions and 157 deletions

View file

@ -208,11 +208,11 @@ void QMLManager::openLocalThenRemote(QString url)
* no cloud repo solves this. * no cloud repo solves this.
*/ */
if (credentialStatus() != CS_NOCLOUD) if (m_credentialStatus != CS_NOCLOUD)
setCredentialStatus(CS_NEED_TO_VERIFY); setCredentialStatus(CS_NEED_TO_VERIFY);
} else { } else {
// if we can load from the cache, we know that we have a valid cloud account // if we can load from the cache, we know that we have a valid cloud account
if (credentialStatus() == CS_UNKNOWN) if (m_credentialStatus == CS_UNKNOWN)
setCredentialStatus(CS_VERIFIED); setCredentialStatus(CS_VERIFIED);
prefs.unit_system = git_prefs.unit_system; prefs.unit_system = git_prefs.unit_system;
if (git_prefs.unit_system == IMPERIAL) if (git_prefs.unit_system == IMPERIAL)
@ -231,11 +231,11 @@ void QMLManager::openLocalThenRemote(QString url)
appendTextToLog(QStringLiteral("%1 dives loaded from cache").arg(dive_table.nr)); appendTextToLog(QStringLiteral("%1 dives loaded from cache").arg(dive_table.nr));
setNotificationText(tr("%1 dives loaded from local dive data file").arg(dive_table.nr)); setNotificationText(tr("%1 dives loaded from local dive data file").arg(dive_table.nr));
} }
if (credentialStatus() == CS_NEED_TO_VERIFY) { if (m_credentialStatus == CS_NEED_TO_VERIFY) {
appendTextToLog(QStringLiteral("have cloud credentials, but still needs PIN")); appendTextToLog(QStringLiteral("have cloud credentials, but still needs PIN"));
setShowPin(true); setShowPin(true);
} }
if (oldStatus() == CS_NOCLOUD) { if (m_oldStatus == CS_NOCLOUD) {
// if we switch to credentials from CS_NOCLOUD, we take things online temporarily // if we switch to credentials from CS_NOCLOUD, we take things online temporarily
prefs.git_local_only = false; prefs.git_local_only = false;
appendTextToLog(QStringLiteral("taking things online to be able to switch to cloud account")); appendTextToLog(QStringLiteral("taking things online to be able to switch to cloud account"));
@ -284,9 +284,9 @@ void QMLManager::cancelCredentialsPinSetup()
setCredentialStatus(CS_UNKNOWN); setCredentialStatus(CS_UNKNOWN);
s.beginGroup("CloudStorage"); s.beginGroup("CloudStorage");
s.setValue("email", cloudUserName()); s.setValue("email", m_cloudUserName);
s.setValue("password", cloudPassword()); s.setValue("password", m_cloudPassword);
s.setValue("cloud_verification_status", credentialStatus()); s.setValue("cloud_verification_status", m_credentialStatus);
s.sync(); s.sync();
setStartPageText(tr("Starting...")); setStartPageText(tr("Starting..."));
@ -302,14 +302,14 @@ void QMLManager::finishSetup()
setCredentialStatus((cloud_status_qml) prefs.cloud_verification_status); setCredentialStatus((cloud_status_qml) prefs.cloud_verification_status);
// if the cloud credentials are valid, we should get the GPS Webservice ID as well // if the cloud credentials are valid, we should get the GPS Webservice ID as well
QString url; QString url;
if (!cloudUserName().isEmpty() && if (!m_cloudUserName.isEmpty() &&
!cloudPassword().isEmpty() && !m_cloudPassword.isEmpty() &&
getCloudURL(url) == 0) { getCloudURL(url) == 0) {
// we know that we are the first ones to access git storage, so we don't need to test, // we know that we are the first ones to access git storage, so we don't need to test,
// but we need to make sure we stay the only ones accessing git storage // but we need to make sure we stay the only ones accessing git storage
alreadySaving = true; alreadySaving = true;
openLocalThenRemote(url); openLocalThenRemote(url);
} else if (!empty_string(existing_filename) && credentialStatus() != CS_UNKNOWN) { } else if (!empty_string(existing_filename) && m_credentialStatus != CS_UNKNOWN) {
setCredentialStatus(CS_NOCLOUD); setCredentialStatus(CS_NOCLOUD);
saveCloudCredentials(); saveCloudCredentials();
appendTextToLog(tr("working in no-cloud mode")); appendTextToLog(tr("working in no-cloud mode"));
@ -350,8 +350,8 @@ QMLManager *QMLManager::instance()
void QMLManager::savePreferences() void QMLManager::savePreferences()
{ {
auto location = SettingsObjectWrapper::instance()->location_settings; auto location = SettingsObjectWrapper::instance()->location_settings;
location->setTimeThreshold(timeThreshold() * 60); location->setTimeThreshold(m_timeThreshold * 60);
location->setDistanceThreshold(distanceThreshold()); location->setDistanceThreshold(m_distanceThreshold);
} }
#define CLOUDURL QString(prefs.cloud_base_url) #define CLOUDURL QString(prefs.cloud_base_url)
@ -363,9 +363,9 @@ void QMLManager::saveCloudCredentials()
bool cloudCredentialsChanged = false; bool cloudCredentialsChanged = false;
// make sure we only have letters, numbers, and +-_. in password and email address // make sure we only have letters, numbers, and +-_. in password and email address
QRegularExpression regExp("^[a-zA-Z0-9@.+_-]+$"); QRegularExpression regExp("^[a-zA-Z0-9@.+_-]+$");
QString cloudPwd = cloudPassword(); QString cloudPwd = m_cloudPassword;
QString cloudUser = cloudUserName(); QString cloudUser = m_cloudUserName;
if (credentialStatus() != CS_NOCLOUD) { if (m_credentialStatus != CS_NOCLOUD) {
// in case of NO_CLOUD, the email address + passwd do not care, so do not check it. // in case of NO_CLOUD, the email address + passwd do not care, so do not check it.
if (cloudPwd.isEmpty() || !regExp.match(cloudPwd).hasMatch() || !regExp.match(cloudUser).hasMatch()) { if (cloudPwd.isEmpty() || !regExp.match(cloudPwd).hasMatch() || !regExp.match(cloudUser).hasMatch()) {
setStartPageText(RED_FONT + tr("Cloud storage email and password can only consist of letters, numbers, and '.', '-', '_', and '+'.") + END_FONT); setStartPageText(RED_FONT + tr("Cloud storage email and password can only consist of letters, numbers, and '.', '-', '_', and '+'.") + END_FONT);
@ -381,7 +381,7 @@ void QMLManager::saveCloudCredentials()
s.beginGroup("CloudStorage"); s.beginGroup("CloudStorage");
s.setValue("email", cloudUser); s.setValue("email", cloudUser);
s.setValue("password", cloudPwd); s.setValue("password", cloudPwd);
s.setValue("cloud_verification_status", credentialStatus()); s.setValue("cloud_verification_status", m_credentialStatus);
s.sync(); s.sync();
if (!same_string(prefs.cloud_storage_email, qPrintable(cloudUser))) { if (!same_string(prefs.cloud_storage_email, qPrintable(cloudUser))) {
free((void *)prefs.cloud_storage_email); free((void *)prefs.cloud_storage_email);
@ -391,9 +391,9 @@ void QMLManager::saveCloudCredentials()
cloudCredentialsChanged |= !same_string(prefs.cloud_storage_password, qPrintable(cloudPwd)); cloudCredentialsChanged |= !same_string(prefs.cloud_storage_password, qPrintable(cloudPwd));
if (credentialStatus() != CS_NOCLOUD && !cloudCredentialsChanged) { if (m_credentialStatus != CS_NOCLOUD && !cloudCredentialsChanged) {
// just go back to the dive list // just go back to the dive list
setCredentialStatus(oldStatus()); setCredentialStatus(m_oldStatus);
} }
if (!same_string(prefs.cloud_storage_password, qPrintable(cloudPwd))) { if (!same_string(prefs.cloud_storage_password, qPrintable(cloudPwd))) {
@ -423,7 +423,7 @@ void QMLManager::saveCloudCredentials()
currentGitLocalOnly = prefs.git_local_only; currentGitLocalOnly = prefs.git_local_only;
prefs.git_local_only = false; prefs.git_local_only = false;
openLocalThenRemote(url); openLocalThenRemote(url);
} else if (prefs.cloud_verification_status == CS_NEED_TO_VERIFY && !cloudPin().isEmpty()) { } else if (prefs.cloud_verification_status == CS_NEED_TO_VERIFY && !m_cloudPin.isEmpty()) {
// the user entered a PIN? // the user entered a PIN?
tryRetrieveDataFromBackend(); tryRetrieveDataFromBackend();
} }
@ -438,7 +438,7 @@ void QMLManager::checkCredentialsAndExecute(execute_function_type execute)
setStartPageText(tr("Testing cloud credentials")); setStartPageText(tr("Testing cloud credentials"));
appendTextToLog("Have credentials, let's see if they are valid"); appendTextToLog("Have credentials, let's see if they are valid");
CloudStorageAuthenticate *csa = new CloudStorageAuthenticate(this); CloudStorageAuthenticate *csa = new CloudStorageAuthenticate(this);
csa->backend(prefs.cloud_storage_email, prefs.cloud_storage_password, cloudPin()); csa->backend(prefs.cloud_storage_email, prefs.cloud_storage_password, m_cloudPin);
// let's wait here for the signal to avoid too many more nested functions // let's wait here for the signal to avoid too many more nested functions
QTimer myTimer; QTimer myTimer;
myTimer.setSingleShot(true); myTimer.setSingleShot(true);
@ -468,7 +468,7 @@ void QMLManager::checkCredentialsAndExecute(execute_function_type execute)
setShowPin(true); setShowPin(true);
return; return;
} }
if (showPin()) if (m_showPin)
setShowPin(false); setShowPin(false);
// now check the redirect URL to make sure everything is set up on the cloud server // now check the redirect URL to make sure everything is set up on the cloud server
@ -565,7 +565,7 @@ void QMLManager::retrieveUserid()
void QMLManager::loadDivesWithValidCredentials() void QMLManager::loadDivesWithValidCredentials()
{ {
QString url; QString url;
timestamp_t currentDiveTimestamp = selectedDiveTimestamp(); timestamp_t currentDiveTimestamp = m_selectedDiveTimestamp;
if (getCloudURL(url)) { if (getCloudURL(url)) {
QString errorString(get_error_string()); QString errorString(get_error_string());
appendTextToLog(errorString); appendTextToLog(errorString);
@ -612,7 +612,7 @@ successful_exit:
setLoadFromCloud(true); setLoadFromCloud(true);
// if we came from local storage mode, let's merge the local data into the local cache // if we came from local storage mode, let's merge the local data into the local cache
// for the remote data - which then later gets merged with the remote data if necessary // for the remote data - which then later gets merged with the remote data if necessary
if (oldStatus() == CS_NOCLOUD) { if (m_oldStatus == CS_NOCLOUD) {
git_storage_update_progress(qPrintable(tr("Loading dives from local storage ('no cloud' mode)"))); git_storage_update_progress(qPrintable(tr("Loading dives from local storage ('no cloud' mode)")));
dive_table.preexisting = dive_table.nr; dive_table.preexisting = dive_table.nr;
mergeLocalRepo(); mergeLocalRepo();
@ -620,9 +620,9 @@ successful_exit:
DiveListModel::instance()->addAllDives(); DiveListModel::instance()->addAllDives();
appendTextToLog(QStringLiteral("%1 dives loaded after importing nocloud local storage").arg(dive_table.nr)); appendTextToLog(QStringLiteral("%1 dives loaded after importing nocloud local storage").arg(dive_table.nr));
saveChangesLocal(); saveChangesLocal();
if (syncToCloud() == false) { if (m_syncToCloud == false) {
appendTextToLog(QStringLiteral("taking things back offline now that storage is synced")); appendTextToLog(QStringLiteral("taking things back offline now that storage is synced"));
prefs.git_local_only = syncToCloud(); prefs.git_local_only = m_syncToCloud;
} }
} }
// if we got here just for an initial connection to the cloud, reset to offline // if we got here just for an initial connection to the cloud, reset to offline
@ -640,15 +640,15 @@ void QMLManager::revertToNoCloudIfNeeded()
currentGitLocalOnly = false; currentGitLocalOnly = false;
prefs.git_local_only = true; prefs.git_local_only = true;
} }
if (oldStatus() == CS_NOCLOUD) { if (m_oldStatus == CS_NOCLOUD) {
// we tried to switch to a cloud account and had previously used local data, // we tried to switch to a cloud account and had previously used local data,
// but connecting to the cloud account (and subsequently merging the local // but connecting to the cloud account (and subsequently merging the local
// and cloud data) failed - so let's delete the cloud credentials and go // and cloud data) failed - so let's delete the cloud credentials and go
// back to CS_NOCLOUD mode in order to prevent us from losing the locally stored // back to CS_NOCLOUD mode in order to prevent us from losing the locally stored
// dives // dives
if (syncToCloud() == false) { if (m_syncToCloud == false) {
appendTextToLog(QStringLiteral("taking things back offline since sync with cloud failed")); appendTextToLog(QStringLiteral("taking things back offline since sync with cloud failed"));
prefs.git_local_only = syncToCloud(); prefs.git_local_only = m_syncToCloud;
} }
free((void *)prefs.cloud_storage_email); free((void *)prefs.cloud_storage_email);
prefs.cloud_storage_email = NULL; prefs.cloud_storage_email = NULL;
@ -1116,7 +1116,7 @@ void QMLManager::openNoCloudRepo()
void QMLManager::saveChangesLocal() void QMLManager::saveChangesLocal()
{ {
if (unsaved_changes()) { if (unsaved_changes()) {
if (credentialStatus() == CS_NOCLOUD) { if (m_credentialStatus == CS_NOCLOUD) {
if (empty_string(existing_filename)) { if (empty_string(existing_filename)) {
char *filename = NOCLOUD_LOCALSTORAGE; char *filename = NOCLOUD_LOCALSTORAGE;
if (git_create_local_repo(filename)) if (git_create_local_repo(filename))
@ -1126,7 +1126,7 @@ void QMLManager::saveChangesLocal()
s->setDefaultFilename(filename); s->setDefaultFilename(filename);
s->setDefaultFileBehavior(LOCAL_DEFAULT_FILE); s->setDefaultFileBehavior(LOCAL_DEFAULT_FILE);
} }
} else if (!loadFromCloud()) { } else if (!m_loadFromCloud) {
// this seems silly, but you need a common ancestor in the repository in // this seems silly, but you need a common ancestor in the repository in
// order to be able to merge che changes later // order to be able to merge che changes later
appendTextToLog("Don't save dives without loading from the cloud, first."); appendTextToLog("Don't save dives without loading from the cloud, first.");
@ -1174,7 +1174,7 @@ void QMLManager::saveChangesCloud(bool forceRemoteSync)
if (prefs.git_local_only && !forceRemoteSync) if (prefs.git_local_only && !forceRemoteSync)
return; return;
if (!loadFromCloud()) { if (!m_loadFromCloud) {
appendTextToLog("Don't save dives without loading from the cloud, first."); appendTextToLog("Don't save dives without loading from the cloud, first.");
return; return;
} }
@ -1332,11 +1332,6 @@ void QMLManager::appendTextToLog(const QString &newText)
qDebug() << QString::number(timer.elapsed() / 1000.0,'f', 3) + ": " + newText; qDebug() << QString::number(timer.elapsed() / 1000.0,'f', 3) + ": " + newText;
} }
bool QMLManager::locationServiceEnabled() const
{
return m_locationServiceEnabled;
}
void QMLManager::setLocationServiceEnabled(bool locationServiceEnabled) void QMLManager::setLocationServiceEnabled(bool locationServiceEnabled)
{ {
m_locationServiceEnabled = locationServiceEnabled; m_locationServiceEnabled = locationServiceEnabled;
@ -1344,11 +1339,6 @@ void QMLManager::setLocationServiceEnabled(bool locationServiceEnabled)
emit locationServiceEnabledChanged(); emit locationServiceEnabledChanged();
} }
bool QMLManager::locationServiceAvailable() const
{
return m_locationServiceAvailable;
}
void QMLManager::setLocationServiceAvailable(bool locationServiceAvailable) void QMLManager::setLocationServiceAvailable(bool locationServiceAvailable)
{ {
appendTextToLog(QStringLiteral("location service is ") + (locationServiceAvailable ? QStringLiteral("available") : QStringLiteral("not available"))); appendTextToLog(QStringLiteral("location service is ") + (locationServiceAvailable ? QStringLiteral("available") : QStringLiteral("not available")));
@ -1361,11 +1351,6 @@ void QMLManager::hasLocationSourceChanged()
setLocationServiceAvailable(locationProvider->hasLocationsSource()); setLocationServiceAvailable(locationProvider->hasLocationsSource());
} }
bool QMLManager::verboseEnabled() const
{
return m_verboseEnabled;
}
void QMLManager::setVerboseEnabled(bool verboseMode) void QMLManager::setVerboseEnabled(bool verboseMode)
{ {
m_verboseEnabled = verboseMode; m_verboseEnabled = verboseMode;
@ -1374,55 +1359,30 @@ void QMLManager::setVerboseEnabled(bool verboseMode)
emit verboseEnabledChanged(); emit verboseEnabledChanged();
} }
QString QMLManager::cloudPassword() const
{
return m_cloudPassword;
}
void QMLManager::setCloudPassword(const QString &cloudPassword) void QMLManager::setCloudPassword(const QString &cloudPassword)
{ {
m_cloudPassword = cloudPassword; m_cloudPassword = cloudPassword;
emit cloudPasswordChanged(); emit cloudPasswordChanged();
} }
QString QMLManager::cloudPin() const
{
return m_cloudPin;
}
void QMLManager::setCloudPin(const QString &cloudPin) void QMLManager::setCloudPin(const QString &cloudPin)
{ {
m_cloudPin = cloudPin; m_cloudPin = cloudPin;
emit cloudPinChanged(); emit cloudPinChanged();
} }
QString QMLManager::cloudUserName() const
{
return m_cloudUserName;
}
void QMLManager::setCloudUserName(const QString &cloudUserName) void QMLManager::setCloudUserName(const QString &cloudUserName)
{ {
m_cloudUserName = cloudUserName.toLower(); m_cloudUserName = cloudUserName.toLower();
emit cloudUserNameChanged(); emit cloudUserNameChanged();
} }
int QMLManager::distanceThreshold() const
{
return m_distanceThreshold;
}
void QMLManager::setDistanceThreshold(int distance) void QMLManager::setDistanceThreshold(int distance)
{ {
m_distanceThreshold = distance; m_distanceThreshold = distance;
emit distanceThresholdChanged(); emit distanceThresholdChanged();
} }
int QMLManager::timeThreshold() const
{
return m_timeThreshold;
}
void QMLManager::setTimeThreshold(int time) void QMLManager::setTimeThreshold(int time)
{ {
m_timeThreshold = time; m_timeThreshold = time;
@ -1445,11 +1405,6 @@ QString QMLManager::theme() const
return s.value("currentTheme", "Blue").toString(); return s.value("currentTheme", "Blue").toString();
} }
bool QMLManager::loadFromCloud() const
{
return m_loadFromCloud;
}
void QMLManager::syncLoadFromCloud() void QMLManager::syncLoadFromCloud()
{ {
QSettings s; QSettings s;
@ -1466,22 +1421,12 @@ void QMLManager::setLoadFromCloud(bool done)
emit loadFromCloudChanged(); emit loadFromCloudChanged();
} }
QString QMLManager::startPageText() const
{
return m_startPageText;
}
void QMLManager::setStartPageText(const QString& text) void QMLManager::setStartPageText(const QString& text)
{ {
m_startPageText = text; m_startPageText = text;
emit startPageTextChanged(); emit startPageTextChanged();
} }
QMLManager::cloud_status_qml QMLManager::credentialStatus() const
{
return m_credentialStatus;
}
void QMLManager::setCredentialStatus(const cloud_status_qml value) void QMLManager::setCredentialStatus(const cloud_status_qml value)
{ {
if (m_credentialStatus != value) { if (m_credentialStatus != value) {
@ -1496,11 +1441,6 @@ void QMLManager::setCredentialStatus(const cloud_status_qml value)
} }
} }
QMLManager::cloud_status_qml QMLManager::oldStatus() const
{
return m_oldStatus;
}
void QMLManager::setOldStatus(const cloud_status_qml value) void QMLManager::setOldStatus(const cloud_status_qml value)
{ {
if (m_oldStatus != value) { if (m_oldStatus != value) {
@ -1550,22 +1490,12 @@ QString QMLManager::getGpsFromSiteName(const QString& siteName)
return ""; return "";
} }
QString QMLManager::notificationText() const
{
return m_notificationText;
}
void QMLManager::setNotificationText(QString text) void QMLManager::setNotificationText(QString text)
{ {
m_notificationText = text; m_notificationText = text;
emit notificationTextChanged(); emit notificationTextChanged();
} }
bool QMLManager::syncToCloud() const
{
return m_syncToCloud;
}
void QMLManager::setSyncToCloud(bool status) void QMLManager::setSyncToCloud(bool status)
{ {
m_syncToCloud = status; m_syncToCloud = status;
@ -1576,22 +1506,12 @@ void QMLManager::setSyncToCloud(bool status)
emit syncToCloudChanged(); emit syncToCloudChanged();
} }
int QMLManager::updateSelectedDive() const
{
return m_updateSelectedDive;
}
void QMLManager::setUpdateSelectedDive(int idx) void QMLManager::setUpdateSelectedDive(int idx)
{ {
m_updateSelectedDive = idx; m_updateSelectedDive = idx;
emit updateSelectedDiveChanged(); emit updateSelectedDiveChanged();
} }
int QMLManager::selectedDiveTimestamp() const
{
return m_selectedDiveTimestamp;
}
void QMLManager::setSelectedDiveTimestamp(int when) void QMLManager::setSelectedDiveTimestamp(int when)
{ {
m_selectedDiveTimestamp = when; m_selectedDiveTimestamp = when;
@ -1691,33 +1611,18 @@ QStringList QMLManager::cylinderInit() const
return cylinders; return cylinders;
} }
bool QMLManager::showPin() const
{
return m_showPin;
}
void QMLManager::setShowPin(bool enable) void QMLManager::setShowPin(bool enable)
{ {
m_showPin = enable; m_showPin = enable;
emit showPinChanged(); emit showPinChanged();
} }
QString QMLManager::progressMessage() const
{
return m_progressMessage;
}
void QMLManager::setProgressMessage(QString text) void QMLManager::setProgressMessage(QString text)
{ {
m_progressMessage = text; m_progressMessage = text;
emit progressMessageChanged(); emit progressMessageChanged();
} }
bool QMLManager::libdcLog() const
{
return m_libdcLog;
}
void QMLManager::setLibdcLog(bool value) void QMLManager::setLibdcLog(bool value)
{ {
m_libdcLog = value; m_libdcLog = value;
@ -1725,22 +1630,12 @@ void QMLManager::setLibdcLog(bool value)
emit libdcLogChanged(); emit libdcLogChanged();
} }
bool QMLManager::developer() const
{
return m_developer;
}
void QMLManager::setDeveloper(bool value) void QMLManager::setDeveloper(bool value)
{ {
m_developer = value; m_developer = value;
emit developerChanged(); emit developerChanged();
} }
bool QMLManager::btEnabled() const
{
return m_btEnabled;
}
void QMLManager::setBtEnabled(bool value) void QMLManager::setBtEnabled(bool value)
{ {
m_btEnabled = value; m_btEnabled = value;

View file

@ -17,33 +17,33 @@
class QMLManager : public QObject { class QMLManager : public QObject {
Q_OBJECT Q_OBJECT
Q_ENUMS(cloud_status_qml) Q_ENUMS(cloud_status_qml)
Q_PROPERTY(QString cloudUserName READ cloudUserName WRITE setCloudUserName NOTIFY cloudUserNameChanged) Q_PROPERTY(QString cloudUserName MEMBER m_cloudUserName WRITE setCloudUserName NOTIFY cloudUserNameChanged)
Q_PROPERTY(QString cloudPassword READ cloudPassword WRITE setCloudPassword NOTIFY cloudPasswordChanged) Q_PROPERTY(QString cloudPassword MEMBER m_cloudPassword WRITE setCloudPassword NOTIFY cloudPasswordChanged)
Q_PROPERTY(QString cloudPin READ cloudPin WRITE setCloudPin NOTIFY cloudPinChanged) Q_PROPERTY(QString cloudPin MEMBER m_cloudPin WRITE setCloudPin NOTIFY cloudPinChanged)
Q_PROPERTY(QString logText READ logText WRITE setLogText NOTIFY logTextChanged) Q_PROPERTY(QString logText READ logText WRITE setLogText NOTIFY logTextChanged)
Q_PROPERTY(bool locationServiceEnabled READ locationServiceEnabled WRITE setLocationServiceEnabled NOTIFY locationServiceEnabledChanged) Q_PROPERTY(bool locationServiceEnabled MEMBER m_locationServiceEnabled WRITE setLocationServiceEnabled NOTIFY locationServiceEnabledChanged)
Q_PROPERTY(bool locationServiceAvailable READ locationServiceAvailable WRITE setLocationServiceAvailable NOTIFY locationServiceAvailableChanged) Q_PROPERTY(bool locationServiceAvailable MEMBER m_locationServiceAvailable WRITE setLocationServiceAvailable NOTIFY locationServiceAvailableChanged)
Q_PROPERTY(int distanceThreshold READ distanceThreshold WRITE setDistanceThreshold NOTIFY distanceThresholdChanged) Q_PROPERTY(int distanceThreshold MEMBER m_distanceThreshold WRITE setDistanceThreshold NOTIFY distanceThresholdChanged)
Q_PROPERTY(int timeThreshold READ timeThreshold WRITE setTimeThreshold NOTIFY timeThresholdChanged) Q_PROPERTY(int timeThreshold MEMBER m_timeThreshold WRITE setTimeThreshold NOTIFY timeThresholdChanged)
Q_PROPERTY(QString theme READ theme WRITE setTheme NOTIFY themeChanged) Q_PROPERTY(QString theme READ theme WRITE setTheme NOTIFY themeChanged)
Q_PROPERTY(bool loadFromCloud READ loadFromCloud WRITE setLoadFromCloud NOTIFY loadFromCloudChanged) Q_PROPERTY(bool loadFromCloud MEMBER m_loadFromCloud WRITE setLoadFromCloud NOTIFY loadFromCloudChanged)
Q_PROPERTY(QString startPageText READ startPageText WRITE setStartPageText NOTIFY startPageTextChanged) Q_PROPERTY(QString startPageText MEMBER m_startPageText WRITE setStartPageText NOTIFY startPageTextChanged)
Q_PROPERTY(bool verboseEnabled READ verboseEnabled WRITE setVerboseEnabled NOTIFY verboseEnabledChanged) Q_PROPERTY(bool verboseEnabled MEMBER m_verboseEnabled WRITE setVerboseEnabled NOTIFY verboseEnabledChanged)
Q_PROPERTY(cloud_status_qml credentialStatus READ credentialStatus WRITE setCredentialStatus NOTIFY credentialStatusChanged) Q_PROPERTY(cloud_status_qml credentialStatus MEMBER m_credentialStatus WRITE setCredentialStatus NOTIFY credentialStatusChanged)
Q_PROPERTY(cloud_status_qml oldStatus READ oldStatus WRITE setOldStatus NOTIFY oldStatusChanged) Q_PROPERTY(cloud_status_qml oldStatus MEMBER m_oldStatus WRITE setOldStatus NOTIFY oldStatusChanged)
Q_PROPERTY(QString notificationText READ notificationText WRITE setNotificationText NOTIFY notificationTextChanged) Q_PROPERTY(QString notificationText MEMBER m_notificationText WRITE setNotificationText NOTIFY notificationTextChanged)
Q_PROPERTY(bool syncToCloud READ syncToCloud WRITE setSyncToCloud NOTIFY syncToCloudChanged) Q_PROPERTY(bool syncToCloud MEMBER m_syncToCloud WRITE setSyncToCloud NOTIFY syncToCloudChanged)
Q_PROPERTY(int updateSelectedDive READ updateSelectedDive WRITE setUpdateSelectedDive NOTIFY updateSelectedDiveChanged) Q_PROPERTY(int updateSelectedDive MEMBER m_updateSelectedDive WRITE setUpdateSelectedDive NOTIFY updateSelectedDiveChanged)
Q_PROPERTY(int selectedDiveTimestamp READ selectedDiveTimestamp WRITE setSelectedDiveTimestamp NOTIFY selectedDiveTimestampChanged) Q_PROPERTY(int selectedDiveTimestamp MEMBER m_selectedDiveTimestamp WRITE setSelectedDiveTimestamp NOTIFY selectedDiveTimestampChanged)
Q_PROPERTY(QStringList suitInit READ suitInit CONSTANT) Q_PROPERTY(QStringList suitInit READ suitInit CONSTANT)
Q_PROPERTY(QStringList buddyInit READ buddyInit CONSTANT) Q_PROPERTY(QStringList buddyInit READ buddyInit CONSTANT)
Q_PROPERTY(QStringList divemasterInit READ divemasterInit CONSTANT) Q_PROPERTY(QStringList divemasterInit READ divemasterInit CONSTANT)
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 MEMBER m_showPin WRITE setShowPin NOTIFY showPinChanged)
Q_PROPERTY(QString progressMessage READ progressMessage WRITE setProgressMessage NOTIFY progressMessageChanged) Q_PROPERTY(QString progressMessage MEMBER m_progressMessage WRITE setProgressMessage NOTIFY progressMessageChanged)
Q_PROPERTY(bool libdcLog READ libdcLog WRITE setLibdcLog NOTIFY libdcLogChanged) Q_PROPERTY(bool libdcLog MEMBER m_libdcLog WRITE setLibdcLog NOTIFY libdcLogChanged)
Q_PROPERTY(bool developer READ developer WRITE setDeveloper NOTIFY developerChanged) Q_PROPERTY(bool developer MEMBER m_developer WRITE setDeveloper NOTIFY developerChanged)
Q_PROPERTY(bool btEnabled READ btEnabled WRITE setBtEnabled NOTIFY btEnabledChanged) Q_PROPERTY(bool btEnabled MEMBER m_btEnabled WRITE setBtEnabled NOTIFY btEnabledChanged)
public: public:
QMLManager(); QMLManager();