DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
harbourmapobject.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 HARBOURMAPOBJECT_H
22 #define HARBOURMAPOBJECT_H
23 
24 #include <QObject>
25 
26 #include <mapobjects/mapobject.h>
27 #include <QMapControl/GeometryPointImageScaled.h>
30 
31 #include <QPixmap>
32 
34 class DisplaceModel;
35 
36 class HarbourMapObject : public QObject, public MapObject
37 {
38  Q_OBJECT
39 public:
40  HarbourMapObject(MapObjectsController *controller, DisplaceModel *model, HarbourData *harbour);
41 
42  std::shared_ptr<qmapcontrol::Geometry> getGeometryEntity() const {
43  return mGeometry;
44  }
45 
46  virtual bool showProperties();
47  virtual void updateProperties();
48 
49 private slots:
50  void widgetClosed();
51 
52 private:
53  MapObjectsController *mController;
54  DisplaceModel *mModel;
55 
56  HarbourData *mHarbour;
57  std::shared_ptr<qmapcontrol::GeometryPointImageScaled> mGeometry;
58 
59  static QPixmap *symbol;
60  NodeDetailsWidget *mWidget;
61 
62 };
63 
64 #endif // HARBOURMAPOBJECT_H
HarbourMapObject(MapObjectsController *controller, DisplaceModel *model, HarbourData *harbour)
Definition: harbourmapobject.cpp:29
Definition: harbourdata.h:29
Definition: harbourmapobject.h:36
Definition: nodedetailswidget.h:30
Definition: mapobject.h:30
std::shared_ptr< qmapcontrol::Geometry > getGeometryEntity() const
Definition: harbourmapobject.h:42
virtual bool showProperties()
Definition: harbourmapobject.cpp:51
Definition: displacemodel.h:71
virtual void updateProperties()
Definition: harbourmapobject.cpp:64
Definition: mapobjectscontroller.h:91