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 22:15:05 +03:00
|
|
|
#include "../serversmodel.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-03 22:15:05 +03:00
|
|
|
public:
|
|
|
|
|
Q_INVOKABLE void updateServersListPage();
|
|
|
|
|
|
|
|
|
|
Q_PROPERTY(QObject* serverListModel READ getServerListModel CONSTANT)
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
2021-09-03 22:15:05 +03:00
|
|
|
QObject* getServerListModel() const;
|
|
|
|
|
|
2021-09-03 20:17:13 +03:00
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
2021-09-03 22:15:05 +03:00
|
|
|
ServersModel* m_serverListModel;
|
2021-09-03 20:17:13 +03:00
|
|
|
|
|
|
|
|
};
|
|
|
|
|
#endif // SERVER_LIST_LOGIC_H
|