4 #include <QAbstractItemModel>
8 class EventModel : public QAbstractItemModel
12 QVariant data(const QModelIndex& index, int role) const;
13 QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const;
14 QModelIndex parent ( const QModelIndex & index ) const;
15 int columnCount ( const QModelIndex & parent = QModelIndex() ) const;
16 int rowCount ( const QModelIndex & parent = QModelIndex() ) const;
17 void loadEvents(const QDate &aDate, int aConferenceId); // loads Events from the DB
18 void loadFavEvents(const QDate &aDate, int aConferenceId); // loads Favourite events from the DB
20 // a method to force 'EventModel' emit signal 'dataChanged()'
21 // a 'view', eg. 'TreeView' listens for this signal and redraws changed items(indexes)
22 void emitDataChangedSignal(const QModelIndex &aTopLeft, const QModelIndex &aBottomRight);
27 Group(const QString & title,
28 int firstEventIndex) :
31 mFirstEventIndex(firstEventIndex),
41 void createTimeGroups();
46 QHash<int, int> mParents;
49 #endif // EVENTMODEL_H