2021-09-07 21:01:56 +03:00
|
|
|
#ifndef PAGE_LOGIC_BASE_H
|
|
|
|
|
#define PAGE_LOGIC_BASE_H
|
|
|
|
|
|
|
|
|
|
#include "settings.h"
|
2021-09-07 22:11:43 +03:00
|
|
|
#include "../pages.h"
|
|
|
|
|
#include "../property_helper.h"
|
2021-09-07 21:01:56 +03:00
|
|
|
|
|
|
|
|
using namespace amnezia;
|
|
|
|
|
using namespace PageEnumNS;
|
|
|
|
|
|
|
|
|
|
class UiLogic;
|
|
|
|
|
|
|
|
|
|
class PageLogicBase : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2021-09-08 13:52:36 +03:00
|
|
|
AUTO_PROPERTY(bool, pageEnabled)
|
2021-09-07 21:01:56 +03:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit PageLogicBase(UiLogic *uiLogic, QObject *parent = nullptr);
|
|
|
|
|
~PageLogicBase() = default;
|
|
|
|
|
|
2021-09-22 14:49:08 +03:00
|
|
|
Q_INVOKABLE virtual void onUpdatePage() {}
|
2021-09-07 21:01:56 +03:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
UiLogic *uiLogic() const { return m_uiLogic; }
|
|
|
|
|
|
|
|
|
|
Settings m_settings;
|
|
|
|
|
UiLogic *m_uiLogic;
|
|
|
|
|
|
2021-09-22 14:49:08 +03:00
|
|
|
signals:
|
|
|
|
|
void updatePage();
|
2021-09-07 21:01:56 +03:00
|
|
|
};
|
|
|
|
|
#endif // PAGE_LOGIC_BASE_H
|