diff options
author | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-07-07 15:03:13 +0200 |
---|---|---|
committer | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2021-07-07 15:40:01 +0200 |
commit | 54249d9c37ce3994b03123ee6367c7f5519d3b40 (patch) | |
tree | cb9657620cda008edaf87299b4b3878e757c097b /src/scenes | |
parent | 3b2c865566aea43ab21afadcd34f58db0a5d5ab8 (diff) | |
download | RWA.Support.DesktopApp-54249d9c37ce3994b03123ee6367c7f5519d3b40.tar.gz RWA.Support.DesktopApp-54249d9c37ce3994b03123ee6367c7f5519d3b40.tar.bz2 RWA.Support.DesktopApp-54249d9c37ce3994b03123ee6367c7f5519d3b40.zip |
Introduce RWAHostModel. RWAHost's are now loaded on start.
Scene_remote_{view, control} are no longer available if no host is selected.
Diffstat (limited to 'src/scenes')
-rw-r--r-- | src/scenes/add_server_wizard/add_server_wizard.cpp | 10 | ||||
-rw-r--r-- | src/scenes/add_server_wizard/add_server_wizard.h | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/scenes/add_server_wizard/add_server_wizard.cpp b/src/scenes/add_server_wizard/add_server_wizard.cpp index bd1dd3c..d06108c 100644 --- a/src/scenes/add_server_wizard/add_server_wizard.cpp +++ b/src/scenes/add_server_wizard/add_server_wizard.cpp @@ -23,16 +23,15 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include <QDebug> -#include <QtDBus> -#include <QDBusPendingCallWatcher> - #include "add_server_wizard.h" #include "../../RWADBusAdaptor.h" #include "../../RWAHost.h" -Add_Server_wizard::Add_Server_wizard(QObject *parent) : QObject(parent) { +Add_Server_wizard::Add_Server_wizard(QObject *parent, MainQMLAdaptor *main_gui) : QObject(parent) { + Q_ASSERT(main_gui != nullptr); + _dbus_api = new DBusAPI(); + _main_gui = main_gui; // _dbus_api --serviceAddWebAppHostResponse-> this.add_web_app_host_response() QObject::connect(_dbus_api, @@ -96,6 +95,7 @@ void Add_Server_wizard::add_web_app_host_response(QJsonDocument *doc) { // Now built RWAHost object. QScopedPointer<RWAHost> rwa_host (new RWAHost(host_uuid, host_alias, host_url)); + _main_gui->addRWAHost(rwa_host.data()); qInfo() << "Successfully added a new RWAHost."; emit step1Success(); diff --git a/src/scenes/add_server_wizard/add_server_wizard.h b/src/scenes/add_server_wizard/add_server_wizard.h index 554f6af..e4d62df 100644 --- a/src/scenes/add_server_wizard/add_server_wizard.h +++ b/src/scenes/add_server_wizard/add_server_wizard.h @@ -30,16 +30,19 @@ #include "../../RWADBusAdaptor.h" #include "../../DBusAPI.h" +#include "../../main_qmladaptor.h" class Add_Server_wizard : public QObject { Q_OBJECT public: - explicit Add_Server_wizard(QObject *parent = nullptr); + explicit Add_Server_wizard(QObject *parent = nullptr, + MainQMLAdaptor *main_gui = nullptr); void add_server(QString host_url); private: DBusAPI *_dbus_api; + MainQMLAdaptor *_main_gui; signals: void step1Success(); |