From 11787ea278bc6ff6d5bc797b597df3f26e2ec9b4 Mon Sep 17 00:00:00 2001 From: Daniel Teichmann Date: Tue, 6 Jul 2021 19:55:13 +0200 Subject: Introduce DBusAPI and RWAHost classes --- src/scenes/add_server_wizard/add_server_wizard.h | 44 ++++++++++++++++++------ 1 file changed, 33 insertions(+), 11 deletions(-) (limited to 'src/scenes/add_server_wizard/add_server_wizard.h') diff --git a/src/scenes/add_server_wizard/add_server_wizard.h b/src/scenes/add_server_wizard/add_server_wizard.h index 1feec9b..554f6af 100644 --- a/src/scenes/add_server_wizard/add_server_wizard.h +++ b/src/scenes/add_server_wizard/add_server_wizard.h @@ -1,21 +1,45 @@ +/* + * This file is part of Remote Support Desktop + * https://gitlab.das-netzwerkteam.de/RemoteWebApp/rwa.support.desktopapp + * Copyright 2021 Daniel Teichmann + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef ADD_SERVER_WIZARD_H #define ADD_SERVER_WIZARD_H -#include "../../RWADBusAdaptor.h" #include +#include "../../RWADBusAdaptor.h" +#include "../../DBusAPI.h" + class Add_Server_wizard : public QObject { Q_OBJECT public: explicit Add_Server_wizard(QObject *parent = nullptr); + void add_server(QString host_url); private: - bool _add_server(QString host_url); - bool _add_web_app_host(QString host_url); - - OrgArcticaProjectRWASupportSessionServiceInterface *_dbus_rwa; - void _initDBus(); + DBusAPI *_dbus_api; signals: void step1Success(); @@ -24,12 +48,10 @@ signals: void step2Failed(QString reason); public slots: - bool processStep1(QString host_url); - bool processStep2(); + void processStep1(QString host_url); + void processStep2(); - void _add_web_app_host_dbus_replied(QDBusPendingCallWatcher *call); - //void _get_web_app_hosts_dbus_replied(QDBusPendingCallWatcher *call); - //void _remove_web_app_host_dbus_replied(QDBusPendingCallWatcher *call); + void add_web_app_host_response(QJsonDocument *doc); }; #endif // ADD_SERVER_WIZARD_H -- cgit v1.2.3 From 54249d9c37ce3994b03123ee6367c7f5519d3b40 Mon Sep 17 00:00:00 2001 From: Daniel Teichmann Date: Wed, 7 Jul 2021 15:03:13 +0200 Subject: Introduce RWAHostModel. RWAHost's are now loaded on start. Scene_remote_{view, control} are no longer available if no host is selected. --- src/scenes/add_server_wizard/add_server_wizard.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/scenes/add_server_wizard/add_server_wizard.h') 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(); -- cgit v1.2.3 From 0f73c7ff3f8a84bcacf077644d6a199301f58945 Mon Sep 17 00:00:00 2001 From: Daniel Teichmann Date: Thu, 8 Jul 2021 15:54:20 +0200 Subject: User can decide on host_alias now. --- src/scenes/add_server_wizard/add_server_wizard.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/scenes/add_server_wizard/add_server_wizard.h') diff --git a/src/scenes/add_server_wizard/add_server_wizard.h b/src/scenes/add_server_wizard/add_server_wizard.h index e4d62df..03af824 100644 --- a/src/scenes/add_server_wizard/add_server_wizard.h +++ b/src/scenes/add_server_wizard/add_server_wizard.h @@ -37,8 +37,9 @@ class Add_Server_wizard : public QObject Q_OBJECT public: explicit Add_Server_wizard(QObject *parent = nullptr, - MainQMLAdaptor *main_gui = nullptr); - void add_server(QString host_url); + MainQMLAdaptor *main_gui = nullptr, + DBusAPI *dbus_api = nullptr); + void add_server(QString host_url, QString host_alias); private: DBusAPI *_dbus_api; @@ -51,7 +52,7 @@ signals: void step2Failed(QString reason); public slots: - void processStep1(QString host_url); + void processStep1(QString host_url, QString host_alias); void processStep2(); void add_web_app_host_response(QJsonDocument *doc); -- cgit v1.2.3 From 35343e5158ca441f8001c0a91685f4e93b53cb03 Mon Sep 17 00:00:00 2001 From: Daniel Teichmann Date: Sun, 1 Aug 2021 02:22:57 +0200 Subject: Toast: Add a variety of new toast colors; Session complete rewrite; A lot of bugfixing; New available toast colors/types: ToastType.Standard, ToastType.Info, ToastType.Warning ToastType.Success, ToastType.Error --- src/scenes/add_server_wizard/add_server_wizard.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/scenes/add_server_wizard/add_server_wizard.h') diff --git a/src/scenes/add_server_wizard/add_server_wizard.h b/src/scenes/add_server_wizard/add_server_wizard.h index 03af824..dc205d1 100644 --- a/src/scenes/add_server_wizard/add_server_wizard.h +++ b/src/scenes/add_server_wizard/add_server_wizard.h @@ -47,9 +47,9 @@ private: signals: void step1Success(); - void step1Failed(QString reason); + void step1Failed(QString reason, uint toast_type); void step2Success(); - void step2Failed(QString reason); + void step2Failed(QString reason, uint toast_type); public slots: void processStep1(QString host_url, QString host_alias); -- cgit v1.2.3 From 0e8f295868e826b89114b55a0aa360cb30d7494f Mon Sep 17 00:00:00 2001 From: Daniel Teichmann Date: Sun, 1 Aug 2021 02:36:42 +0200 Subject: add_server_wizard/add_server_wizard -> add_rwahost_wizard/add_rwahost_wizard --- src/scenes/add_server_wizard/add_server_wizard.h | 61 ------------------------ 1 file changed, 61 deletions(-) delete mode 100644 src/scenes/add_server_wizard/add_server_wizard.h (limited to 'src/scenes/add_server_wizard/add_server_wizard.h') diff --git a/src/scenes/add_server_wizard/add_server_wizard.h b/src/scenes/add_server_wizard/add_server_wizard.h deleted file mode 100644 index dc205d1..0000000 --- a/src/scenes/add_server_wizard/add_server_wizard.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file is part of Remote Support Desktop - * https://gitlab.das-netzwerkteam.de/RemoteWebApp/rwa.support.desktopapp - * Copyright 2021 Daniel Teichmann - * SPDX-License-Identifier: GPL-2.0-or-later - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef ADD_SERVER_WIZARD_H -#define ADD_SERVER_WIZARD_H - -#include - -#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, - MainQMLAdaptor *main_gui = nullptr, - DBusAPI *dbus_api = nullptr); - void add_server(QString host_url, QString host_alias); - -private: - DBusAPI *_dbus_api; - MainQMLAdaptor *_main_gui; - -signals: - void step1Success(); - void step1Failed(QString reason, uint toast_type); - void step2Success(); - void step2Failed(QString reason, uint toast_type); - -public slots: - void processStep1(QString host_url, QString host_alias); - void processStep2(); - - void add_web_app_host_response(QJsonDocument *doc); -}; - -#endif // ADD_SERVER_WIZARD_H -- cgit v1.2.3