amnezia-client/client/ui/pages_logic/StartPageLogic.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

44 lines
1.3 KiB
C++

#ifndef START_PAGE_LOGIC_H
#define START_PAGE_LOGIC_H
#include "PageLogicBase.h"
#include <QRegExp>
class UiLogic;
class StartPageLogic : public PageLogicBase
{
Q_OBJECT
AUTO_PROPERTY(bool, pushButtonConnectEnabled)
AUTO_PROPERTY(bool, pushButtonConnectKeyChecked)
AUTO_PROPERTY(QString, pushButtonConnectText)
AUTO_PROPERTY(QString, lineEditStartExistingCodeText)
AUTO_PROPERTY(QString, textEditSshKeyText)
AUTO_PROPERTY(QString, lineEditIpText)
AUTO_PROPERTY(QString, lineEditPasswordText)
AUTO_PROPERTY(QString, lineEditLoginText)
AUTO_PROPERTY(bool, labelWaitInfoVisible)
AUTO_PROPERTY(QString, labelWaitInfoText)
AUTO_PROPERTY(bool, pushButtonBackFromStartVisible)
AUTO_PROPERTY(bool, pushButtonConnectVisible)
READONLY_PROPERTY(QRegularExpression, ipAddressPortRegex)
public:
Q_INVOKABLE void onUpdatePage() override;
Q_INVOKABLE void onPushButtonConnect();
Q_INVOKABLE void onPushButtonImport();
Q_INVOKABLE void onPushButtonImportOpenFile();
bool importConnection(const QJsonObject &profile);
bool importConnectionFromCode(QString code);
bool importConnectionFromQr(const QByteArray &data);
public:
explicit StartPageLogic(UiLogic *uiLogic, QObject *parent = nullptr);
~StartPageLogic() = default;
};
#endif // START_PAGE_LOGIC_H