#ifndef TASKMANAGER_H #define TASKMANAGER_H #include #include class FortManager; class FortSettings; class TaskInfo; class TaskManager : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty taskInfos READ taskInfos NOTIFY taskInfosChanged) Q_CLASSINFO("DefaultProperty", "taskInfos") public: explicit TaskManager(FortManager *fortManager, QObject *parent = nullptr); FortManager *fortManager() const { return m_fortManager; } const QList &taskInfosList() const { return m_taskInfos; } QQmlListProperty taskInfos(); signals: void taskInfosChanged(); public slots: void loadSettings(const FortSettings *fortSettings); bool saveSettings(FortSettings *fortSettings) const; private: FortManager *m_fortManager; QList m_taskInfos; }; #endif // TASKMANAGER_H