App refactoring finished
This commit is contained in:
parent
510a564797
commit
3ce1ec708d
46 changed files with 362 additions and 247 deletions
|
@ -16,7 +16,10 @@
|
|||
#include "models/protocols_model.h"
|
||||
|
||||
#include "notificationhandler.h"
|
||||
#include "settings.h"
|
||||
|
||||
class Settings;
|
||||
class VpnConfigurator;
|
||||
class ServerController;
|
||||
|
||||
class AppSettingsLogic;
|
||||
class GeneralSettingsLogic;
|
||||
|
@ -50,15 +53,14 @@ class UiLogic : public QObject
|
|||
AUTO_PROPERTY(bool, pageEnabled)
|
||||
AUTO_PROPERTY(int, pagesStackDepth)
|
||||
AUTO_PROPERTY(int, currentPageValue)
|
||||
AUTO_PROPERTY(QString, dialogConnectErrorText)
|
||||
|
||||
READONLY_PROPERTY(QObject *, containersModel)
|
||||
READONLY_PROPERTY(QObject *, protocolsModel)
|
||||
|
||||
// TODO: review
|
||||
Q_PROPERTY(QString dialogConnectErrorText READ getDialogConnectErrorText WRITE setDialogConnectErrorText NOTIFY dialogConnectErrorTextChanged)
|
||||
|
||||
public:
|
||||
explicit UiLogic(std::shared_ptr<Settings> settings, QObject *parent = nullptr);
|
||||
explicit UiLogic(std::shared_ptr<Settings> settings, std::shared_ptr<VpnConfigurator> configurator,
|
||||
std::shared_ptr<ServerController> serverController, QObject *parent = nullptr);
|
||||
~UiLogic();
|
||||
void showOnStartup();
|
||||
|
||||
|
@ -108,9 +110,6 @@ public:
|
|||
|
||||
void shareTempFile(const QString &suggestedName, QString ext, const QString& data);
|
||||
|
||||
QString getDialogConnectErrorText() const;
|
||||
void setDialogConnectErrorText(const QString &dialogConnectErrorText);
|
||||
|
||||
signals:
|
||||
void dialogConnectErrorTextChanged();
|
||||
|
||||
|
@ -127,9 +126,6 @@ signals:
|
|||
void raise();
|
||||
void toggleLogPanel();
|
||||
|
||||
private:
|
||||
QString m_dialogConnectErrorText;
|
||||
|
||||
private slots:
|
||||
// containers - INOUT arg
|
||||
void installServer(QMap<DockerContainer, QJsonObject> &containers);
|
||||
|
@ -214,7 +210,10 @@ private:
|
|||
|
||||
VpnConnection* m_vpnConnection;
|
||||
QThread m_vpnConnectionThread;
|
||||
|
||||
std::shared_ptr<Settings> m_settings;
|
||||
std::shared_ptr<VpnConfigurator> m_configurator;
|
||||
std::shared_ptr<ServerController> m_serverController;
|
||||
|
||||
NotificationHandler* m_notificationHandler;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue