equal
deleted
inserted
replaced
40 NameColumn, |
40 NameColumn, |
41 PlayerCountColumn, |
41 PlayerCountColumn, |
42 TeamCountColumn, |
42 TeamCountColumn, |
43 OwnerColumn, |
43 OwnerColumn, |
44 MapColumn, |
44 MapColumn, |
|
45 ScriptColumn, |
45 SchemeColumn, |
46 SchemeColumn, |
46 WeaponsColumn |
47 WeaponsColumn, |
|
48 VersionColumn, |
47 }; |
49 }; |
48 |
50 |
49 explicit RoomsListModel(QObject *parent = 0); |
51 explicit RoomsListModel(QObject *parent = 0); |
50 |
52 |
51 QVariant headerData(int section, Qt::Orientation orientation, int role) const; |
53 QVariant headerData(int section, Qt::Orientation orientation, int role) const; |
52 int rowCount(const QModelIndex & parent) const; |
54 int rowCount(const QModelIndex & parent) const; |
53 int columnCount(const QModelIndex & parent) const; |
55 int columnCount(const QModelIndex & parent) const; |
|
56 int columnCountSupported() const { return c_nColumns; }; |
54 QVariant data(const QModelIndex &index, int role) const; |
57 QVariant data(const QModelIndex &index, int role) const; |
55 |
58 |
56 public slots: |
59 public slots: |
57 void setRoomsList(const QStringList & rooms); |
60 void setRoomsList(const QStringList & rooms); |
58 void addRoom(const QStringList & info); |
61 void addRoom(const QStringList & info); |
64 const int c_nColumns; |
67 const int c_nColumns; |
65 QList<QStringList> m_data; |
68 QList<QStringList> m_data; |
66 QStringList m_headerData; |
69 QStringList m_headerData; |
67 MapModel * m_staticMapModel; |
70 MapModel * m_staticMapModel; |
68 MapModel * m_missionMapModel; |
71 MapModel * m_missionMapModel; |
|
72 static QString protoToVersion(const QString & proto); |
69 }; |
73 }; |
70 |
74 |
71 #endif // HEDGEWARS_ROOMSLISTMODEL_H |
75 #endif // HEDGEWARS_ROOMSLISTMODEL_H |