aboutsummaryrefslogtreecommitdiff
path: root/src/main_qmladaptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main_qmladaptor.h')
-rw-r--r--src/main_qmladaptor.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/main_qmladaptor.h b/src/main_qmladaptor.h
index 05de1fd..a289a74 100644
--- a/src/main_qmladaptor.h
+++ b/src/main_qmladaptor.h
@@ -42,7 +42,7 @@ class MainQMLAdaptor : public QObject
{
Q_OBJECT
// this makes url available as a QML property
- Q_PROPERTY(QList<QObject*> rwaHostModel READ getRWAHostModel WRITE setRWAHostModel NOTIFY rwaHostModelChanged)
+ Q_PROPERTY(QList<QObject*> rwaHostModel READ getRWAHostModel NOTIFY rwaHostModelChanged)
// this makes url available as a QML property
Q_PROPERTY(QString url READ getURL WRITE setURL NOTIFY urlChanged)
// this makes pin available as a QML property
@@ -61,11 +61,15 @@ class MainQMLAdaptor : public QObject
public:
explicit MainQMLAdaptor(QObject *parent, QQmlApplicationEngine *engine = nullptr);
-// void setSession(Session session);
+ void setRWAHostModel(QList<QObject*> *rwa_hosts);
bool setConnectButtonEnabled(bool enabled);
bool setConnectButtonChecked(bool checked);
+ void main_content_push(QString);
+ void main_content_pop(QString);
+ void main_content_replace(QString);
+
bool setStatusIndicator(bool active, QColor color = QColor(255,255,255));
bool setStatus(QString status);
@@ -100,7 +104,8 @@ protected:
QString _url;
QString _pin;
QString _session_id;
- QList<QObject*>* _rwaHostModel;
+ DBusAPI *_dbus_api;
+ QList<QObject*> *_rwaHostModel;
private:
QQmlApplicationEngine* _engine;
@@ -119,11 +124,13 @@ public slots:
void setPin(QString pin);
void setURL(QString URL);
void setSessionID(QString session_id);
- void setRWAHostModel(QList<QObject*>);
void addRWAHost(RWAHost *rwa_host);
QString getURL();
QString getPin();
QString getSessionID();
+
+ // No pointer because QML doesn't
+ // like this type much with pointer
QList<QObject*> getRWAHostModel();
void onRwaHostSelected(QString host_uuid);