Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef STATIONLISTMODEL_H
00027 #define STATIONLISTMODEL_H
00028
00029 #include "Event.h"
00030
00031 class StationListModel : public QAbstractTableModel
00032 {
00033 public:
00034 StationListModel(QObject * parent);
00035 ~StationListModel();
00036
00037 void setCurrentEvent(Event * e);
00038
00039 virtual int rowCount(const QModelIndex& parent=QModelIndex()) const;
00040 virtual int columnCount(const QModelIndex& parent=QModelIndex()) const;
00041 virtual QVariant data(const QModelIndex& index, int role) const;
00042 virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const;
00043 virtual void sort(int column, Qt::SortOrder order=Qt::AscendingOrder);
00044 void update(QModelIndex index);
00045
00046 Station * station(int index) {return _event->station(index);}
00047 private:
00048 Event * _event;
00049 };
00050
00051 #endif // STATIONLISTMODEL_H