diff options
Diffstat (limited to 'Swift/QtUI/Roster/RosterModel.h')
-rw-r--r-- | Swift/QtUI/Roster/RosterModel.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Swift/QtUI/Roster/RosterModel.h b/Swift/QtUI/Roster/RosterModel.h new file mode 100644 index 0000000..a958f0d --- /dev/null +++ b/Swift/QtUI/Roster/RosterModel.h @@ -0,0 +1,22 @@ +#pragma once + +#include "Swift/QtUI/Roster/RosterItem.h" + +#include <QAbstractItemModel> +#include <QList> + +namespace Swift { +class RosterModel : public QAbstractItemModel { +public: + RosterModel(RosterItem* tree); + ~RosterModel(); + int columnCount(const QModelIndex& parent = QModelIndex()) const; + QVariant data(const QModelIndex& index, 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& parent = QModelIndex()) const; +private: + RosterItem* tree_; +}; + +}
\ No newline at end of file |