DISPLACE
1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
|
#include <objecttreemodel.h>
Public Types | |
enum | Category { Layers = 0, ShapefileLayers, EnvLayers, OutputLayers, TariffsLayers, Nodes, Populations, SizeGroups, Benthos, BenthosFunctionalGroups, Nations, Firms, Metiers, Harbours, Vessels, Ships, ShipsTypes, Fishfarms, FishfarmsTypes, Windmills, WindfarmsTypes, LastCategory } |
Public Member Functions | |
ObjectTreeModel (MapObjectsController *map, StatsController *stats, QObject *parent=0) | |
int | columnCount (const QModelIndex &parent) const |
int | rowCount (const QModelIndex &parent) const |
QModelIndex | parent (const QModelIndex &child) const |
QModelIndex | index (int row, int column, const QModelIndex &parent) const |
QVariant | data (const QModelIndex &index, int role) const |
Qt::ItemFlags | flags (const QModelIndex &index) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
void | setCurrentModel (int idx, DisplaceModel *model) |
int | getModelIdx () const |
DisplaceModel * | getModel () const |
MapObjectsController * | getMapControl () const |
StatsController * | getStatsController () const |
QModelIndex | createCategoryEntity (int row, int column, Category cat) const |
QModelIndex | createCategoryEntityFromChild (Category cat) const |
QModelIndex | createEntity (int row, int column, objecttree::ObjectTreeEntity *entity) const |
bool | isObject (QModelIndex index) const |
Category | getCategory (QModelIndex index) const |
objecttree::ObjectTreeEntity * | entity (const QModelIndex &index) const |
void | refresh () |
Protected Member Functions | |
bool | isRootLevel (const QModelIndex &level) const |
bool | isCategoryLevel (const QModelIndex &level) const |
Static Protected Attributes | |
static QList< objecttree::ObjectTreeEntity * > | entityTemplates |
static QString | entityNames [] |
|
explicit |
int ObjectTreeModel::columnCount | ( | const QModelIndex & | parent | ) | const |
QModelIndex ObjectTreeModel::createCategoryEntity | ( | int | row, |
int | column, | ||
Category | cat | ||
) | const |
QModelIndex ObjectTreeModel::createCategoryEntityFromChild | ( | ObjectTreeModel::Category | cat | ) | const |
QModelIndex ObjectTreeModel::createEntity | ( | int | row, |
int | column, | ||
objecttree::ObjectTreeEntity * | entity | ||
) | const |
QVariant ObjectTreeModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
objecttree::ObjectTreeEntity * ObjectTreeModel::entity | ( | const QModelIndex & | index | ) | const |
Qt::ItemFlags ObjectTreeModel::flags | ( | const QModelIndex & | index | ) | const |
ObjectTreeModel::Category ObjectTreeModel::getCategory | ( | QModelIndex | index | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
QModelIndex ObjectTreeModel::index | ( | int | row, |
int | column, | ||
const QModelIndex & | parent | ||
) | const |
|
inlineprotected |
bool ObjectTreeModel::isObject | ( | QModelIndex | index | ) | const |
|
inlineprotected |
QModelIndex ObjectTreeModel::parent | ( | const QModelIndex & | child | ) | const |
void ObjectTreeModel::refresh | ( | ) |
int ObjectTreeModel::rowCount | ( | const QModelIndex & | parent | ) | const |
void ObjectTreeModel::setCurrentModel | ( | int | idx, |
DisplaceModel * | model | ||
) |
bool ObjectTreeModel::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role = Qt::EditRole |
||
) |
|
staticprotected |
|
staticprotected |