Crossfire Server, Trunk  R20513
CREQuestItemModel.h
Go to the documentation of this file.
1 #ifndef _CREQUESTITEMMODEL_H
2 #define _CREQUESTITEMMODEL_H
3 
4 #include <QObject>
5 #include <QAbstractItemModel>
6 
7 class Quest;
8 
9 class CREQuestItemModel : public QAbstractItemModel
10 {
11  Q_OBJECT
12 
13  public:
14  CREQuestItemModel(QObject* parent);
15  virtual ~CREQuestItemModel();
16 
17  Quest* quest() const;
18  void setQuest(Quest* quest);
19 
20  void moveUp(int step);
21  void moveDown(int step);
22 
23  virtual int columnCount(const QModelIndex& parent) const;
24  virtual QModelIndex index(int row, int column, const QModelIndex& parent) const;
25  virtual QModelIndex parent(const QModelIndex& index) const;
26  virtual int rowCount(const QModelIndex & parent) const;
27  virtual QVariant data(const QModelIndex& index, int role) const;
28  virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const;
29  virtual Qt::ItemFlags flags(const QModelIndex& index) const;
30  virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole);
31  virtual bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex());
32 
33  public slots:
34  void addStep(bool);
35 
36  protected:
38 };
39 
40 #endif /* _CREQUESTITEMMODEL_H */
virtual Qt::ItemFlags flags(const QModelIndex &index) const
virtual bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
virtual ~CREQuestItemModel()
Definition: Quest.h:32
CREQuestItemModel(QObject *parent)
virtual bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
virtual int rowCount(const QModelIndex &parent) const
virtual QModelIndex parent(const QModelIndex &index) const
Quest * quest() const
virtual int columnCount(const QModelIndex &parent) const
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
virtual QVariant data(const QModelIndex &index, int role) const
void setQuest(Quest *quest)
void moveDown(int step)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const