2015-06-04 10:29:50 +00:00
|
|
|
#ifndef QMLMANAGER_H
|
|
|
|
#define QMLMANAGER_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class QMLManager : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2015-07-10 07:47:26 +00:00
|
|
|
Q_PROPERTY(QString cloudUserName READ cloudUserName WRITE setCloudUserName NOTIFY cloudUserNameChanged)
|
|
|
|
Q_PROPERTY(QString cloudPassword READ cloudPassword WRITE setCloudPassword NOTIFY cloudPasswordChanged)
|
2015-07-21 08:57:10 +00:00
|
|
|
Q_PROPERTY(bool saveCloudPassword READ saveCloudPassword WRITE setSaveCloudPassword NOTIFY saveCloudPasswordChanged)
|
2015-06-04 10:29:50 +00:00
|
|
|
public:
|
|
|
|
QMLManager();
|
|
|
|
~QMLManager();
|
|
|
|
|
2015-07-10 07:47:26 +00:00
|
|
|
QString cloudUserName() const;
|
|
|
|
void setCloudUserName(const QString &cloudUserName);
|
|
|
|
|
|
|
|
QString cloudPassword() const;
|
|
|
|
void setCloudPassword(const QString &cloudPassword);
|
|
|
|
|
2015-07-21 08:57:10 +00:00
|
|
|
bool saveCloudPassword() const;
|
|
|
|
void setSaveCloudPassword(bool saveCloudPassword);
|
|
|
|
|
2015-06-04 10:29:50 +00:00
|
|
|
public slots:
|
2015-07-10 07:47:26 +00:00
|
|
|
void savePreferences();
|
2015-07-10 08:31:24 +00:00
|
|
|
void loadDives();
|
2015-07-17 15:28:01 +00:00
|
|
|
void commitChanges(QString diveId, QString suit, QString buddy, QString diveMaster, QString notes);
|
|
|
|
void saveChanges();
|
2015-06-04 10:29:50 +00:00
|
|
|
private:
|
2015-07-10 07:47:26 +00:00
|
|
|
QString m_cloudUserName;
|
|
|
|
QString m_cloudPassword;
|
2015-07-21 08:57:10 +00:00
|
|
|
bool m_saveCloudPassword;
|
2015-06-04 10:29:50 +00:00
|
|
|
|
|
|
|
signals:
|
2015-07-10 07:47:26 +00:00
|
|
|
void cloudUserNameChanged();
|
|
|
|
void cloudPasswordChanged();
|
2015-07-21 08:57:10 +00:00
|
|
|
void saveCloudPasswordChanged();
|
2015-06-04 10:29:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|