Crossfire Server, Trunk
ArchetypesModel.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef ARCHETYPESMODEL_H
14 #define ARCHETYPESMODEL_H
15 
16 #include "global.h"
17 #include "object.h"
18 
19 #include <set>
20 #include <QAbstractTableModel>
21 
22 class ResourcesManager;
23 class ObjectWrapper;
24 
25 class ArchetypesModel : public QAbstractTableModel {
26  Q_OBJECT
27 public:
28  ArchetypesModel(ResourcesManager *resourcesManager);
29  virtual ~ArchetypesModel();
30 
31  int rowCount(const QModelIndex &parent = QModelIndex()) const;
32  int columnCount(const QModelIndex &parent = QModelIndex()) const;
33  QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
34  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
35  Qt::ItemFlags flags(const QModelIndex &index) const;
36  bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
37 
38 signals:
40 
41 private:
42  std::vector<ObjectWrapper *> myMonsters;
43 };
44 
45 #endif /* ARCHETYPESMODEL_H */
46 
global.h
ResourcesManager
Definition: ResourcesManager.h:80
archininventory.arch
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
Definition: archininventory.py:16
ArchetypesModel::columnCount
int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: ArchetypesModel.cpp:60
ArchetypesModel
Definition: ArchetypesModel.h:25
ArchetypesModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: ArchetypesModel.cpp:73
ArchetypesModel::archetypeModified
void archetypeModified(archetype *arch)
ObjectWrapper
Definition: ObjectWrapper.h:36
ArchetypesModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: ArchetypesModel.cpp:65
archetype
Definition: object.h:483
ArchetypesModel::setData
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: ArchetypesModel.cpp:107
ArchetypesModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: ArchetypesModel.cpp:55
ArchetypesModel::ArchetypesModel
ArchetypesModel(ResourcesManager *resourcesManager)
Definition: ArchetypesModel.cpp:44
autojail.value
value
Definition: autojail.py:6
ArchetypesModel::~ArchetypesModel
virtual ~ArchetypesModel()
Definition: ArchetypesModel.cpp:52
npc_dialog.index
int index
Definition: npc_dialog.py:102
ArchetypesModel::flags
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: ArchetypesModel.cpp:89
ArchetypesModel::myMonsters
std::vector< ObjectWrapper * > myMonsters
Definition: ArchetypesModel.h:42
object.h