amnezia-client/client/ui/pages_logic/ServerListLogic.h
Pokamest Nikak 84ca7e8879 refact 2
2021-09-03 22:15:05 +03:00

46 lines
805 B
C++

#ifndef SERVER_LIST_LOGIC_H
#define SERVER_LIST_LOGIC_H
#include "../pages.h"
#include "settings.h"
#include "../serversmodel.h"
class UiLogic;
class ServerListLogic : public QObject
{
Q_OBJECT
public:
Q_INVOKABLE void updateServersListPage();
Q_PROPERTY(QObject* serverListModel READ getServerListModel CONSTANT)
Q_INVOKABLE void onServerListPushbuttonDefaultClicked(int index);
Q_INVOKABLE void onServerListPushbuttonSettingsClicked(int index);
public:
explicit ServerListLogic(UiLogic *uiLogic, QObject *parent = nullptr);
~ServerListLogic() = default;
QObject* getServerListModel() const;
signals:
private:
private slots:
private:
Settings m_settings;
UiLogic *m_uiLogic;
ServersModel* m_serverListModel;
};
#endif // SERVER_LIST_LOGIC_H