DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
populationentity.h
Go to the documentation of this file.
1 /* --------------------------------------------------------------------------
2  * DISPLACE: DYNAMIC INDIVIDUAL VESSEL-BASED SPATIAL PLANNING
3  * AND EFFORT DISPLACEMENT
4  * Copyright (c) 2012, 2013, 2014 Francois Bastardie <fba@aqua.dtu.dk>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  * --------------------------------------------------------------------------
20  */
21 #ifndef POPULATIONENTITY_H
22 #define POPULATIONENTITY_H
23 
25 
26 namespace objecttree {
27 
29 {
30  int mPopulationIndex;
31 
32 public:
33  PopulationEntity(ObjectTreeModel *_model, int idx = -1);
34  virtual ~PopulationEntity();
35 
38  }
39 
40  virtual QModelIndex parent (const QModelIndex &parent) const;
41  virtual QModelIndex index (int row, int column, const QModelIndex &parent) const;
42  virtual int rowCount() const;
43  virtual int columnCount() const;
44  virtual QVariant data(const QModelIndex &index, int role) const;
45  virtual Qt::ItemFlags flags(Qt::ItemFlags defflags, const QModelIndex &index) const;
46  virtual bool setData(const QModelIndex &index, const QVariant &value, int role);
47 
48  QModelIndex makeIndex();
49 };
50 
52 
53  PopulationEntity *mParent;
54  int mGroupIndex;
55 
56 public:
59 
62  }
63 
64  virtual QModelIndex parent (const QModelIndex &parent) const;
65  virtual QModelIndex index (int row, int column, const QModelIndex &parent) const;
66  virtual int rowCount() const;
67  virtual int columnCount() const;
68  virtual QVariant data(const QModelIndex &index, int role) const;
69  virtual Qt::ItemFlags flags(Qt::ItemFlags defflags, const QModelIndex &index) const;
70  virtual bool setData(const QModelIndex &index, const QVariant &value, int role);
71 };
72 
73 }
74 
75 #endif // POPULATIONENTITY_H
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
Definition: populationentity.cpp:178
virtual int rowCount() const
Definition: populationentity.cpp:148
virtual ObjectTreeModel::Category getCategory() const
Definition: populationentity.h:60
Definition: benthosentity.cpp:27
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
Definition: populationentity.cpp:140
virtual int columnCount() const
Definition: populationentity.cpp:153
PopulationEntityWithGroup(ObjectTreeModel *_model, const PopulationEntity *parent, int idx=-1)
Definition: populationentity.cpp:123
virtual QVariant data(const QModelIndex &index, int role) const
Definition: populationentity.cpp:88
Definition: populationentity.h:28
QModelIndex makeIndex()
Definition: populationentity.cpp:118
Definition: objecttreeentity.h:32
virtual QModelIndex parent(const QModelIndex &parent) const
Definition: populationentity.cpp:44
virtual int columnCount() const
Definition: populationentity.cpp:83
virtual QVariant data(const QModelIndex &index, int role) const
Definition: populationentity.cpp:158
Definition: objecttreemodel.h:39
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
Definition: populationentity.cpp:50
virtual QModelIndex parent(const QModelIndex &parent) const
Definition: populationentity.cpp:134
virtual ~PopulationEntityWithGroup()
Definition: populationentity.cpp:130
std::pair< box, unsigned > value
Definition: diffusion.cpp:30
virtual int rowCount() const
Definition: populationentity.cpp:68
virtual ObjectTreeModel::Category getCategory() const
Definition: populationentity.h:36
Category
Definition: objecttreemodel.h:44
Definition: objecttreemodel.h:50
Definition: populationentity.h:51
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
Definition: populationentity.cpp:103
virtual ~PopulationEntity()
Definition: populationentity.cpp:39
virtual Qt::ItemFlags flags(Qt::ItemFlags defflags, const QModelIndex &index) const
Definition: populationentity.cpp:97
virtual Qt::ItemFlags flags(Qt::ItemFlags defflags, const QModelIndex &index) const
Definition: populationentity.cpp:172
PopulationEntity(ObjectTreeModel *_model, int idx=-1)
Definition: populationentity.cpp:33