1 #ifndef STATIONLISTMODEL_H
2 #define STATIONLISTMODEL_H
4 #include <QStandardItemModel>
5 #include <QXmlStreamReader>
8 class StationListModel;
10 class StationListModel : public QStandardItemModel
15 enum StationListRole {
16 PositionRole = Qt::UserRole + 1, //< QGeoCoordinate - Station coordinate
17 StationIdRole, //< QString - Station Id (Precise name if the Display name is known to fail)
18 RecentIndicatorRole //<bool - If the station has been recently looked up
21 explicit StationListModel(QObject *parent = 0);
23 bool load(const QString &filename);
30 void readStationsElement();
31 void readStationElement();
32 void readPosElement(QStandardItem *item);
33 void readNameElement(QStandardItem *item);
34 void skipUnknownElement();
36 QXmlStreamReader m_reader;
39 #endif // STATIONLISTMODEL_H