DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
fishfarmentity.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 FISHFARMENTITY_H
22 #define FISHFARMENTITY_H
23 
25 
26 namespace objecttree {
27 
29 {
30  int mFishfarmId;
31 
32 public:
33  FishfarmEntity(ObjectTreeModel *_model, int id = -1);
34 
35  virtual ObjectTreeModel::Category getCategory() const override{
37  }
38 
39  virtual QModelIndex parent (const QModelIndex &parent) const override;
40  virtual QModelIndex index (int row, int column, const QModelIndex &parent) const override;
41  virtual int rowCount() const override;
42  virtual int columnCount() const override;
43  virtual QVariant data(const QModelIndex &index, int role) const override;
44 
45  // Specific access functions
46  int getFishfarmId() const { return mFishfarmId; }
47 
48  Qt::ItemFlags flags(Qt::ItemFlags defFlags, const QModelIndex &index) const override;
49  bool setData(const QModelIndex &index, const QVariant &value, int role) override;
50 
51 };
52 
53 }
54 
55 #endif // FISHFARMENTITY_H
Definition: benthosentity.cpp:27
virtual int rowCount() const override
Definition: fishfarmentity.cpp:50
virtual int columnCount() const override
Definition: fishfarmentity.cpp:58
virtual QModelIndex parent(const QModelIndex &parent) const override
Definition: fishfarmentity.cpp:35
virtual QVariant data(const QModelIndex &index, int role) const override
Definition: fishfarmentity.cpp:64
bool setData(const QModelIndex &index, const QVariant &value, int role) override
Definition: fishfarmentity.cpp:90
virtual ObjectTreeModel::Category getCategory() const override
Definition: fishfarmentity.h:35
Definition: objecttreeentity.h:32
Definition: objecttreemodel.h:39
std::pair< box, unsigned > value
Definition: diffusion.cpp:30
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const override
Definition: fishfarmentity.cpp:41
Category
Definition: objecttreemodel.h:44
Qt::ItemFlags flags(Qt::ItemFlags defFlags, const QModelIndex &index) const override
Definition: fishfarmentity.cpp:83
FishfarmEntity(ObjectTreeModel *_model, int id=-1)
Definition: fishfarmentity.cpp:29
int getFishfarmId() const
Definition: fishfarmentity.h:46
Definition: fishfarmentity.h:28
Definition: objecttreemodel.h:52