mirror of https://github.com/nymea/nymea.git
37 lines
639 B
C++
37 lines
639 B
C++
#ifndef RULE_H
|
|
#define RULE_H
|
|
|
|
#include "state.h"
|
|
#include "action.h"
|
|
#include "event.h"
|
|
|
|
#include <QUuid>
|
|
|
|
class Rule
|
|
{
|
|
public:
|
|
enum RuleType {
|
|
RuleTypeAll,
|
|
RuleTypeAny
|
|
};
|
|
|
|
Rule(const QUuid &id, const Event &event, const QList<State> &states, const QList<Action> &actions);
|
|
|
|
QUuid id() const;
|
|
Event event() const;
|
|
QList<State> states() const;
|
|
QList<Action> actions() const;
|
|
|
|
RuleType ruleType() const;
|
|
void setRuleType(RuleType ruleType);
|
|
|
|
private:
|
|
QUuid m_id;
|
|
Event m_event;
|
|
QList<State> m_states;
|
|
QList<Action> m_actions;
|
|
RuleType m_ruleType;
|
|
};
|
|
|
|
#endif // RULE_H
|