-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdicerolltracker.h
47 lines (30 loc) · 875 Bytes
/
dicerolltracker.h
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef DICEROLLTRACKER_H
#define DICEROLLTRACKER_H
#include <QObject>
#include <QList>
#include "diceroll.h"
class DiceRollTracker : public QObject
{
Q_OBJECT
public:
explicit DiceRollTracker(QObject *parent = nullptr);
void clear();
void append(DiceRoll& value);
void append(const QList<DiceRoll>& other);
QList<DiceRoll>::iterator begin();
QList<DiceRoll>::iterator end();
QList<DiceRoll>::const_iterator cbegin() const;
QList<DiceRoll>::const_iterator cend() const;
const DiceRoll& at(int i) const;
int size() const;
void removeAt(int i);
const DiceRoll& operator[](int i) const;
const DiceRoll& first() const;
const DiceRoll& last() const;
bool empty() const;
signals:
void changed(const QList<DiceRoll>& results);
private:
QList<DiceRoll> _results;
};
#endif // DICEROLLTRACKER_H