summaryrefslogtreecommitdiff
path: root/src/rule.h
blob: 92e3356409463e9b6556cc7de8d2e747218f433d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef RULE_H
#define RULE_H

#include <QDateTime>
#include <QHBoxLayout>
#include <QString>

// rule's widgets will always be allocated, even though they are only rendered when options are open
// TODO determine whether an alternative approach is better (same goes for group and entry)

class Rule : QHBoxLayout {
	public:
		enum When { before, after };
		int id;
		int entry_id;
		When when;
		QDateTime date;
		QString color = "";
		QString highlight = "";

		Rule(
				int id,
				int entry_id,
				When when,
				QDateTime date,
				QString color,
				QString highlight
			);
};

#endif