This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2017-10-26 01:08:59 +02:00

30 lines
628 B
C++

#ifndef RULEACTIONS_H
#define RULEACTIONS_H
#include <QAbstractListModel>
class RuleAction;
class RuleActions : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(int count READ rowCount NOTIFY countChanged)
public:
explicit RuleActions(QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role) const override;
void addRuleAction(RuleAction* ruleAction);
Q_INVOKABLE RuleAction* get(int index) const;
signals:
void countChanged();
private:
QList<RuleAction*> m_list;
};
#endif // RULEACTIONS_H