subsurface/qt-mobile/qmlmanager.h
Grace Karanja 866d67c5e7 QML UI: Load dives from cloud
Load dives from the Subsurface cloud service using the user's saved
credentials. This will display the dives in the same way as loading
them from a local file.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-10 06:03:56 -07:00

34 lines
752 B
C++

#ifndef QMLMANAGER_H
#define QMLMANAGER_H
#include <QObject>
#include <QString>
class QMLManager : public QObject
{
Q_OBJECT
Q_PROPERTY(QString cloudUserName READ cloudUserName WRITE setCloudUserName NOTIFY cloudUserNameChanged)
Q_PROPERTY(QString cloudPassword READ cloudPassword WRITE setCloudPassword NOTIFY cloudPasswordChanged)
public:
QMLManager();
~QMLManager();
QString cloudUserName() const;
void setCloudUserName(const QString &cloudUserName);
QString cloudPassword() const;
void setCloudPassword(const QString &cloudPassword);
public slots:
void savePreferences();
void loadDives();
private:
QString m_cloudUserName;
QString m_cloudPassword;
signals:
void cloudUserNameChanged();
void cloudPasswordChanged();
};
#endif