21 #ifndef OBJECTTREEMODEL_H 22 #define OBJECTTREEMODEL_H 24 #include <QAbstractItemModel> 32 class ObjectTreeEntity;
33 class FFarmTypesEntity;
34 class BFunctionalGroupsEntity;
35 class WFarmTypesEntity;
36 class ShipTypesEntity;
60 QModelIndex
parent(
const QModelIndex &child)
const;
61 QModelIndex
index(
int row,
int column,
const QModelIndex &
parent)
const;
62 QVariant
data(
const QModelIndex &
index,
int role)
const;
63 Qt::ItemFlags
flags (
const QModelIndex &
index )
const;
64 bool setData (
const QModelIndex &
index,
const QVariant &
value,
int role = Qt::EditRole );
101 return !level.isValid();
105 return level.isValid() &&
114 #endif // OBJECTTREEMODEL_H Definition: objecttreemodel.h:51
Definition: objecttreemodel.h:52
Definition: benthosentity.cpp:27
Definition: objecttreemodel.h:50
int rowCount(const QModelIndex &parent) const
Definition: objecttreemodel.cpp:127
Definition: objecttreemodel.h:51
QVariant data(const QModelIndex &index, int role) const
Definition: objecttreemodel.cpp:159
Definition: objecttreemodel.h:49
Definition: ffarmtypesentity.h:10
Definition: objecttreemodel.h:48
Definition: wfarmtypesentity.h:10
void refresh()
Definition: objecttreemodel.cpp:245
QModelIndex parent(const QModelIndex &child) const
Definition: objecttreemodel.cpp:140
Definition: objecttreemodel.h:50
Definition: objecttreemodel.h:53
Definition: objecttreemodel.h:46
Definition: objecttreemodel.h:47
Definition: objecttreemodel.h:51
QModelIndex createEntity(int row, int column, objecttree::ObjectTreeEntity *entity) const
Definition: objecttreemodel.cpp:225
bool isRootLevel(const QModelIndex &level) const
Definition: objecttreemodel.h:100
void setCurrentModel(int idx, DisplaceModel *model)
Definition: objecttreemodel.cpp:196
int columnCount(const QModelIndex &parent) const
Definition: objecttreemodel.cpp:120
QModelIndex createCategoryEntityFromChild(Category cat) const
Definition: objecttreemodel.cpp:220
Definition: objecttreeentity.h:32
Definition: objecttreemodel.h:50
Definition: objecttreemodel.h:45
Definition: objecttreemodel.h:52
Definition: statscontroller.h:45
bool isCategoryLevel(const QModelIndex &level) const
Definition: objecttreemodel.h:104
ObjectTreeModel(MapObjectsController *map, StatsController *stats, QObject *parent=0)
Definition: objecttreemodel.cpp:73
QModelIndex index(int row, int column, const QModelIndex &parent) const
Definition: objecttreemodel.cpp:148
Definition: objecttreemodel.h:51
Definition: objecttreemodel.h:39
static QList< objecttree::ObjectTreeEntity * > entityTemplates
Definition: objecttreemodel.h:110
Definition: displacemodel.h:71
objecttree::ObjectTreeEntity * entity(const QModelIndex &index) const
Definition: objecttreemodel.cpp:240
int getModelIdx() const
Definition: objecttreemodel.h:67
std::pair< box, unsigned > value
Definition: diffusion.cpp:30
Definition: objecttreemodel.h:51
Definition: objecttreemodel.h:50
Definition: shiptypesentity.h:10
Category
Definition: objecttreemodel.h:44
Definition: mapobjectscontroller.h:91
Definition: statsutils.h:4
bool isObject(QModelIndex index) const
Definition: objecttreemodel.cpp:230
Definition: objecttreemodel.h:50
Definition: objecttreemodel.h:52
StatsController * getStatsController() const
Definition: objecttreemodel.h:70
Definition: bfunctionalgroupsentity.h:10
QModelIndex createCategoryEntity(int row, int column, Category cat) const
Definition: objecttreemodel.cpp:215
MapObjectsController * getMapControl() const
Definition: objecttreemodel.h:69
DisplaceModel * getModel() const
Definition: objecttreemodel.h:68
Category getCategory(QModelIndex index) const
Definition: objecttreemodel.cpp:235
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: objecttreemodel.cpp:185
Definition: objecttreemodel.h:52
Definition: objecttreemodel.h:52
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: objecttreemodel.cpp:176
Definition: objecttreemodel.h:52
static QString entityNames[]
Definition: objecttreemodel.h:111