fort/src/ui/task/taskmanager.h

37 lines
720 B
C
Raw Normal View History

2017-09-19 08:35:43 +00:00
#ifndef TASKMANAGER_H
#define TASKMANAGER_H
#include <QObject>
#include <QQmlListProperty>
class FortManager;
class Task;
class TaskManager : public QObject
{
Q_OBJECT
Q_PROPERTY(QQmlListProperty<Task> tasks READ tasks NOTIFY tasksChanged)
Q_CLASSINFO("DefaultProperty", "tasks")
public:
explicit TaskManager(FortManager *fortManager,
QObject *parent = nullptr);
FortManager *fortManager() const { return m_fortManager; }
const QList<Task *> &tasksList() const { return m_tasks; }
QQmlListProperty<Task> tasks();
signals:
void tasksChanged();
public slots:
private:
FortManager *m_fortManager;
QList<Task *> m_tasks;
};
#endif // TASKMANAGER_H