2021-09-03 20:17:13 +03:00
|
|
|
#ifndef SERVER_LIST_LOGIC_H
|
|
|
|
|
#define SERVER_LIST_LOGIC_H
|
|
|
|
|
|
2021-09-07 21:01:56 +03:00
|
|
|
#include "PageLogicBase.h"
|
2021-09-03 20:17:13 +03:00
|
|
|
|
|
|
|
|
class UiLogic;
|
|
|
|
|
|
2021-09-07 21:01:56 +03:00
|
|
|
class ServerListLogic : public PageLogicBase
|
2021-09-03 20:17:13 +03:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
2021-09-08 13:52:36 +03:00
|
|
|
READONLY_PROPERTY(QObject *, serverListModel)
|
2022-12-12 13:28:03 +01:00
|
|
|
Q_PROPERTY(int currServerIdx READ currServerIdx NOTIFY currServerIdxChanged)
|
2021-09-08 13:52:36 +03:00
|
|
|
|
2021-09-03 22:15:05 +03:00
|
|
|
public:
|
2022-12-12 13:28:03 +01:00
|
|
|
int currServerIdx() const;
|
|
|
|
|
|
2021-09-22 14:49:08 +03:00
|
|
|
Q_INVOKABLE void onUpdatePage() override;
|
2021-09-03 22:15:05 +03:00
|
|
|
Q_INVOKABLE void onServerListPushbuttonDefaultClicked(int index);
|
|
|
|
|
Q_INVOKABLE void onServerListPushbuttonSettingsClicked(int index);
|
|
|
|
|
|
2021-09-03 20:17:13 +03:00
|
|
|
public:
|
|
|
|
|
explicit ServerListLogic(UiLogic *uiLogic, QObject *parent = nullptr);
|
|
|
|
|
~ServerListLogic() = default;
|
|
|
|
|
|
2022-12-12 13:28:03 +01:00
|
|
|
signals:
|
|
|
|
|
void currServerIdxChanged();
|
|
|
|
|
|
2021-09-03 20:17:13 +03:00
|
|
|
};
|
|
|
|
|
#endif // SERVER_LIST_LOGIC_H
|