summaryrefslogtreecommitdiff
path: root/src/rule.h
blob: cf9abfe0b6e0bfe5e5702da996989980f5ab4257 (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
#ifndef RULE_H
#define RULE_H

#include <QDateTime>
#include <QString>

struct Rule {
	enum When { before, after };
	int id;
	int entry_id;
	When when;
	QDateTime date;
	QString color; // consider making this a QColor instead
	QString highlight; // see color comment

	Rule(
			int id,
			int entry_id,
			When when,
			QDateTime date = QDateTime::currentDateTime(),
			QString color = "",
			QString highlight = ""
		);

	static QList<Rule> rules;
};

#endif