-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheventsmodel.h
More file actions
39 lines (31 loc) · 1.12 KB
/
eventsmodel.h
File metadata and controls
39 lines (31 loc) · 1.12 KB
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
#ifndef EVENTSMODEL_H
#define EVENTSMODEL_H
#include <QAbstractItemModel>
#include "driveevent.h"
class EventsModel
:public QAbstractItemModel
{
Q_OBJECT
public:
explicit EventsModel(QObject *parent = 0);
~EventsModel();
QVariant data(const QModelIndex &index, int role) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const;
QModelIndex index(int row, int column,
const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &index) const;
int rowCount(const QModelIndex &index = QModelIndex()) const;
int columnCount(const QModelIndex &index = QModelIndex()) const;
const DriveEvent* eventByIndex(const QModelIndex& index) const;
public slots:
/**
* @brief Устанавливает список событий модели.
* @param events Список событий.
*/
void setEvents(QList<DriveEvent> events);
private:
QList<DriveEvent>* events_list;
};
#endif // EVENTSMODEL_H