amnezia-client/client/ui/pages_logic/NetworkSettingsLogic.h
Mortie 8c20a67cfa migrated the codebase to Qt6 and fixed some compatibility issues
* used a Qt6 ported version of SortFilterProxyModel
* used an updated Qt6 compatible version of QXZing
* added a flag to windows linker to avoid WinMain problem of MSVCRTD
* renamed utils.cpp to utilities.cpp for avoiding confusion with the same file name in SortFilterProxyModel
2022-08-29 12:21:09 +04:30

33 lines
917 B
C++

#ifndef NETWORK_SETTINGS_LOGIC_H
#define NETWORK_SETTINGS_LOGIC_H
#include "PageLogicBase.h"
class UiLogic;
class NetworkSettingsLogic : public PageLogicBase
{
Q_OBJECT
AUTO_PROPERTY(bool, checkBoxUseAmneziaDnsChecked)
AUTO_PROPERTY(QString, lineEditDns1Text)
AUTO_PROPERTY(QString, lineEditDns2Text)
READONLY_PROPERTY(QRegularExpression, ipAddressRegex)
public:
Q_INVOKABLE void onUpdatePage() override;
Q_INVOKABLE void onLineEditDns1EditFinished(const QString& text);
Q_INVOKABLE void onLineEditDns2EditFinished(const QString& text);
Q_INVOKABLE void onPushButtonResetDns1Clicked();
Q_INVOKABLE void onPushButtonResetDns2Clicked();
Q_INVOKABLE void onCheckBoxUseAmneziaDnsToggled(bool checked);
public:
explicit NetworkSettingsLogic(UiLogic *uiLogic, QObject *parent = nullptr);
~NetworkSettingsLogic() = default;
};
#endif // NETWORK_SETTINGS_LOGIC_H