2021-09-03 20:17:13 +03:00
|
|
|
#ifndef SITES_LOGIC_H
|
|
|
|
|
#define SITES_LOGIC_H
|
|
|
|
|
|
2021-09-07 21:01:56 +03:00
|
|
|
#include "PageLogicBase.h"
|
2022-08-25 17:35:28 +03:00
|
|
|
#include "settings.h"
|
2021-09-03 20:17:13 +03:00
|
|
|
|
|
|
|
|
class UiLogic;
|
|
|
|
|
class SitesModel;
|
|
|
|
|
|
2021-09-07 21:01:56 +03:00
|
|
|
class SitesLogic : public PageLogicBase
|
2021-09-03 20:17:13 +03:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
2021-09-08 13:52:36 +03:00
|
|
|
AUTO_PROPERTY(QString, labelSitesAddCustomText)
|
|
|
|
|
AUTO_PROPERTY(QObject*, tableViewSitesModel)
|
|
|
|
|
AUTO_PROPERTY(QString, lineEditSitesAddCustomText)
|
|
|
|
|
|
2021-09-03 20:17:13 +03:00
|
|
|
public:
|
2021-11-06 13:47:52 +03:00
|
|
|
Q_INVOKABLE void onUpdatePage() override;
|
2021-09-03 20:17:13 +03:00
|
|
|
|
|
|
|
|
Q_INVOKABLE void onPushButtonAddCustomSitesClicked();
|
2022-01-22 18:19:38 +03:00
|
|
|
Q_INVOKABLE void onPushButtonSitesDeleteClicked(QStringList items);
|
2021-09-03 20:17:13 +03:00
|
|
|
Q_INVOKABLE void onPushButtonSitesImportClicked(const QString &fileName);
|
2022-01-22 18:19:38 +03:00
|
|
|
Q_INVOKABLE void onPushButtonSitesExportClicked();
|
|
|
|
|
|
2021-09-03 20:17:13 +03:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit SitesLogic(UiLogic *uiLogic, QObject *parent = nullptr);
|
|
|
|
|
~SitesLogic() = default;
|
|
|
|
|
|
|
|
|
|
QMap<Settings::RouteMode, SitesModel *> sitesModels;
|
|
|
|
|
};
|
|
|
|
|
#endif // SITES_LOGIC_H
|