Crossfire Server, Trunk
ArchetypesModel.h
Go to the documentation of this file.
1 #ifndef ARCHETYPESMODEL_H
2 #define ARCHETYPESMODEL_H
3 
4 extern "C" {
5 #include "global.h"
6 #include "object.h"
7 }
8 
9 #include <set>
10 #include <QAbstractTableModel>
11 
12 class ResourcesManager;
13 class ObjectWrapper;
14 
15 class ArchetypesModel : public QAbstractTableModel {
16  Q_OBJECT
17 public:
18  ArchetypesModel(ResourcesManager *resourcesManager);
19  virtual ~ArchetypesModel();
20 
21  int rowCount(const QModelIndex &parent = QModelIndex()) const;
22  int columnCount(const QModelIndex &parent = QModelIndex()) const;
23  QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
24  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
25  Qt::ItemFlags flags(const QModelIndex &index) const;
26  bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
27 
28 signals:
30 
31 private:
32  std::vector<ObjectWrapper *> myMonsters;
33 };
34 
35 #endif /* ARCHETYPESMODEL_H */
36 
global.h
ResourcesManager
Definition: ResourcesManager.h:66
archininventory.arch
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
Definition: archininventory.py:16
ArchetypesModel::columnCount
int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: ArchetypesModel.cpp:39
ArchetypesModel
Definition: ArchetypesModel.h:15
ArchetypesModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: ArchetypesModel.cpp:52
archt
Definition: object.h:468
ArchetypesModel::archetypeModified
void archetypeModified(archetype *arch)
ObjectWrapper
Definition: ObjectWrapper.h:15
ArchetypesModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: ArchetypesModel.cpp:44
ArchetypesModel::setData
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: ArchetypesModel.cpp:86
ArchetypesModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: ArchetypesModel.cpp:34
ArchetypesModel::ArchetypesModel
ArchetypesModel(ResourcesManager *resourcesManager)
Definition: ArchetypesModel.cpp:23
autojail.value
value
Definition: autojail.py:6
ArchetypesModel::~ArchetypesModel
virtual ~ArchetypesModel()
Definition: ArchetypesModel.cpp:31
npc_dialog.index
int index
Definition: npc_dialog.py:102
ArchetypesModel::flags
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: ArchetypesModel.cpp:68
ArchetypesModel::myMonsters
std::vector< ObjectWrapper * > myMonsters
Definition: ArchetypesModel.h:32
object.h