Merge branch 'dev' into ios-wireguard
This commit is contained in:
commit
bf8b3c3b2f
45 changed files with 1063 additions and 522 deletions
|
@ -6,7 +6,6 @@
|
|||
#include <functional>
|
||||
#include <QKeyEvent>
|
||||
#include <QThread>
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
#include "property_helper.h"
|
||||
#include "pages.h"
|
||||
|
@ -16,6 +15,7 @@
|
|||
#include "models/containers_model.h"
|
||||
#include "models/protocols_model.h"
|
||||
|
||||
#include "notificationhandler.h"
|
||||
#include "settings.h"
|
||||
|
||||
class AppSettingsLogic;
|
||||
|
@ -107,12 +107,8 @@ public:
|
|||
void setDialogConnectErrorText(const QString &dialogConnectErrorText);
|
||||
|
||||
signals:
|
||||
void trayIconUrlChanged();
|
||||
void trayActionDisconnectEnabledChanged();
|
||||
void trayActionConnectEnabledChanged();
|
||||
void dialogConnectErrorTextChanged();
|
||||
|
||||
|
||||
void goToPage(PageEnumNS::Page page, bool reset = true, bool slide = true);
|
||||
void goToProtocolPage(Proto protocol, bool reset = true, bool slide = true);
|
||||
void goToShareProtocolPage(Proto protocol, bool reset = true, bool slide = true);
|
||||
|
@ -126,17 +122,12 @@ signals:
|
|||
void raise();
|
||||
|
||||
private:
|
||||
QSystemTrayIcon *m_tray;
|
||||
|
||||
QString m_dialogConnectErrorText;
|
||||
|
||||
private slots:
|
||||
// containers - INOUT arg
|
||||
void installServer(QMap<DockerContainer, QJsonObject> &containers);
|
||||
|
||||
void setTrayState(VpnProtocol::VpnConnectionState state);
|
||||
void onTrayActivated(QSystemTrayIcon::ActivationReason reason);
|
||||
|
||||
private:
|
||||
PageEnumNS::Page currentPage();
|
||||
struct ProgressFunc {
|
||||
|
@ -171,9 +162,6 @@ private:
|
|||
const ButtonFunc& button,
|
||||
const LabelFunc& info);
|
||||
|
||||
void setupTray();
|
||||
void setTrayIcon(const QString &iconPath);
|
||||
|
||||
|
||||
public:
|
||||
AppSettingsLogic *appSettingsLogic() { return m_appSettingsLogic; }
|
||||
|
@ -195,6 +183,8 @@ public:
|
|||
QObject *qmlRoot() const;
|
||||
void setQmlRoot(QObject *newQmlRoot);
|
||||
|
||||
NotificationHandler *notificationHandler() const;
|
||||
|
||||
private:
|
||||
QObject *m_qmlRoot{nullptr};
|
||||
|
||||
|
@ -218,6 +208,8 @@ private:
|
|||
QThread m_vpnConnectionThread;
|
||||
Settings m_settings;
|
||||
|
||||
NotificationHandler* m_notificationHandler;
|
||||
|
||||
|
||||
// QRegExpValidator m_ipAddressValidator;
|
||||
// QRegExpValidator m_ipAddressPortValidator;
|
||||
|
@ -230,10 +222,6 @@ private:
|
|||
// void showEvent(QShowEvent *event) override;
|
||||
// void hideEvent(QHideEvent *event) override;
|
||||
|
||||
const QString ConnectedTrayIconName = "active.png";
|
||||
const QString DisconnectedTrayIconName = "default.png";
|
||||
const QString ErrorTrayIconName = "error.png";
|
||||
|
||||
|
||||
// QStack<Page> pagesStack;
|
||||
int selectedServerIndex = -1; // server index to use when proto settings page opened
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue