DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
mapobjectscontroller.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-2019 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 /* --------------------------------------------------------------------------
22  * DISPLACE: DYNAMIC INDIVIDUAL VESSEL-BASED SPATIAL PLANNING
23  * AND EFFORT DISPLACEMENT
24  * Copyright (c) 2012, 2013, 2014 Francois Bastardie <fba@aqua.dtu.dk>
25  *
26  * This program is free software; you can redistribute it and/or modify
27  * it under the terms of the GNU General Public License as published by
28  * the Free Software Foundation; either version 2 of the License, or
29  * (at your option) any later version.
30  *
31  * This program is distributed in the hope that it will be useful,
32  * but WITHOUT ANY WARRANTY; without even the implied warranty of
33  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34  * GNU General Public License for more details.
35  *
36  * You should have received a copy of the GNU General Public License along
37  * with this program; if not, write to the Free Software Foundation, Inc.,
38  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
39  * --------------------------------------------------------------------------
40  */
41 #ifndef MAPOBJECTSCONTROLLER_H
42 #define MAPOBJECTSCONTROLLER_H
43 
44 #include <modelobjects/nodedata.h>
45 
46 #include <QObject>
47 #include <QList>
48 #include <QVector>
49 
50 #include <memory>
51 #include <mainwindow.h>
52 #include <palettemanager.h>
53 #include <objecttreemodel.h>
54 #include <editorlayerinterface.h>
56 
57 #include <ogrsf_frmts.h>
58 
59 #include <QMapControl/Layer.h>
60 #include <QMapControl/Geometry.h>
61 #include <QMapControl/ESRIShapefile.h>
62 #include <QMapControl/LayerESRIShapefile.h>
63 
64 namespace qmapcontrol {
65 class QMapControl;
66 class MapAdapter;
67 class LayerMapAdapter;
68 class LayerGeometry;
69 class GeometryWidget;
70 }
71 
72 class DisplaceModel;
73 class MapObject;
74 class HarbourMapObject;
75 class NodeMapObject;
76 class VesselMapObject;
77 class ShipMapObject;
78 class FishfarmMapObject;
79 class WindmillMapObject;
80 class EdgeLayer;
81 class EdgeMapObject;
82 class HarbourData;
83 class MapsDataProvider;
84 
85 QT_BEGIN_NAMESPACE
86 class QTextEdit;
87 QT_END_NAMESPACE
88 
89 using qmapcontrol::Geometry;
90 
91 class MapObjectsController : public QObject, public EditorLayerInterface
92 {
93  Q_OBJECT
94 
95 public:
96  class LayerList {
97  public:
98  virtual ~LayerList() noexcept = default;
99 
100  virtual int getCount() const = 0;
101  virtual QString getName(int idx) const = 0;
102  };
103 
104  class WidgetUserData : public QObjectUserData {
105  private:
106  std::shared_ptr<qmapcontrol::GeometryWidget> mWidget;
107  public:
108  WidgetUserData(std::shared_ptr<qmapcontrol::GeometryWidget> w)
109  : QObjectUserData(), mWidget(w) {}
110 
111  std::shared_ptr<qmapcontrol::GeometryWidget> widget() const { return mWidget; }
112  };
113 
114  class WidgetAncillaryData : public qmapcontrol::Geometry::AncillaryData {
115  private:
116  MapObject *mObject;
117  public:
118  explicit WidgetAncillaryData(MapObject *object)
119  : mObject(object) {
120  }
121 
122  MapObject *object() const { return mObject; }
123  };
124 
125 private:
126  static const int MaxLayers = 32;
127 
128  class LayerListImpl : public LayerList {
129  public:
130  LayerListImpl()
131  : LayerListImpl(MaxLayers) {}
132 
133  explicit LayerListImpl (int sz) {
134  Q_UNUSED(sz);
135  }
136 
137  virtual int getCount() const { return layers.size(); }
138  virtual QString getName(int idx) const { return layers[idx] != 0 ? QString::fromStdString(layers[idx]->getName()) : QString(""); }
139  virtual bool isVisible(int idx) const { return layers[idx] != 0 && layers[idx]->isVisible(); }
140 
141  virtual void setVisible(int idx, bool v) { visibility[idx] = v; layers[idx]->setVisible(v); }
142 
143  virtual void setLayer (int idx, std::shared_ptr<qmapcontrol::Layer> layer, bool shown = true) {
144  while (layers.size() <= idx)
145  layers.push_back(0);
146  while (visibility.size() <= idx)
147  visibility.push_back(false);
148  layers[idx] = layer;
149  visibility[idx] = shown;
150  }
151 
152  virtual void updateVisibility(bool show) {
153  for (int i = 0; i < layers.size(); ++i) {
154  layers[i]->setVisible(show ? visibility[i] : false);
155  }
156  }
157 
158  std::shared_ptr<qmapcontrol::Layer> layer(int idx) const { return layers[idx]; }
159  protected:
160  QVector<std::shared_ptr<qmapcontrol::Layer> > layers;
161  QVector<bool> visibility;
162  };
163 
164  template <typename L>
165  class LayerVarListImpl : public LayerList {
166  public:
167  LayerVarListImpl() {}
168 
169  QList<std::shared_ptr<L> > layers;
170  QVector<bool> visibility;
171  QStringList fullpath;
172 
173  virtual int getCount() const { return layers.size(); }
174  virtual QString getName(int idx) const { return QString::fromStdString(layers[idx]->getName()); }
175  virtual QString getFullPath(int idx) const { return fullpath.at(idx); }
176  virtual bool isVisible(int idx) const { return layers[idx] != 0 && layers[idx]->isVisible(); }
177 
178  virtual void setVisible(int idx, bool v) { visibility[idx] = v; layers[idx]->setVisible(v); }
179 
180  virtual void updateVisibility(bool show) {
181  for (int i = 0; i < layers.size(); ++i) {
182  layers[i]->setVisible(show ? visibility[i] : false);
183  }
184  }
185 
186  virtual bool add(std::shared_ptr<L> layer, QString _fullpath, bool show = true) {
187  layers.push_back(layer);
188  visibility.push_back(show);
189  fullpath.push_back(_fullpath);
190 
191  return true;
192  }
193  };
194 
195 
196 public:
197  enum LayerIds {
201 
203  };
204  enum OutLayerIds {
220 
222 
223  };
224 
229 
231  };
232 
233  enum EnvLayerIds {
244 
246  };
247 
248  enum EditorModes {
251  };
252 
253  MapObjectsController(qmapcontrol::QMapControl *map);
254  virtual ~MapObjectsController() noexcept = default;
255 
256  qmapcontrol::QMapControl *mapWidget() const { return mMap; }
257 
258  void setModel(int model_n, std::shared_ptr<DisplaceModel> model);
259  DisplaceModel &getModel (int model_n);
260  void removeModel(int model_n);
261  void createMapObjectsFromModel(int model_n, DisplaceModel *model);
262  void updateMapObjectsFromModel(int model_n, DisplaceModel *model);
263 
264  void updateVesselPosition (int model, int idx);
265  void updateShipPosition (int model, int idx);
266  void updateFishfarmPosition (int model, int idx);
267  void updateWindmillPosition (int model, int idx);
268 
269  void updateNodes(int model);
270 
272  switch (type) {
273  case ObjectTreeModel::Layers: return &mLayers[model];
274  case ObjectTreeModel::ShapefileLayers: return &mShapefileLayers[model];
275  case ObjectTreeModel::EnvLayers: return &mEnvLayers[model];
276  case ObjectTreeModel::OutputLayers: return &mOutputLayers[model];
277  case ObjectTreeModel::TariffsLayers: return &mTariffsLayers[model];
278  default:
279  break;
280  }
281  return 0;
282  }
283 
289  void setModelVisibility(int model, Visibility visibility);
290  void setLayerVisibility (int model, ObjectTreeModel::Category type, int layer, bool visibility);
291  bool isLayerVisible (int model, ObjectTreeModel::Category type, int layer);
292 
293  bool isModelActive (int model) const;
294 
295  const Palette &getPalette(int model, PaletteRole n) const {
296  Q_UNUSED(model);
297  return PaletteManager::instance()->palette(n);
298  }
299  void setPalette (int model, PaletteRole n, const Palette &palette);
300 
301  void forceRedraw();
302 
303  void showDetailsWidget(const PointWorldCoord &point, QWidget *widget);
304 
305  /* Editor functions */
306 
307  bool importShapefile(int model_idx, QString path, QString layername);
308  QStringList getShapefilesList(int model_idx) const;
309  std::shared_ptr<qmapcontrol::ESRIShapefile> getShapefile(int model_idx, int idx);
310  std::shared_ptr<GDALDataset> cloneShapefileDatasource(int model_idx, const QString &name);
311 
312  void setEditorMode (EditorModes mode);
313  EditorModes getEditorMode() const { return mEditorMode; }
314 
315  void clearNodeSelection(int model);
316  void selectNodes(int model, QList<types::NodeId> nodes);
317  void delSelected(int model);
318 
319  QSet<EdgeMapObject *> edgeSelection(int model) const { return mEdgeSelection[model]; }
320 
321 
322  void clearAllNodes(int model_n);
323  void addNode(int model_n, std::shared_ptr<NodeData> nd, bool disable_redraw = false);
324  void addHarbour(int model_n, std::shared_ptr<HarbourData> nd, bool disable_redraw = false);
325  void addEdge (int model_n, std::shared_ptr<NodeData::Edge> edge, bool disable_redraw);
326 
327  void clearEditorLayer();
328  void addEditorLayerGeometry (std::shared_ptr<qmapcontrol::Geometry> geometry);
329 
331 
332  void delSelectedNodes(int model);
333 
334 protected:
335  void addStandardLayer(int model, LayerIds id, std::shared_ptr<Layer> layer, bool visibility);
336  void addOutputLayer(int model, OutLayerIds id, std::shared_ptr<Layer> layer, bool visibility);
337  void addTariffLayer(int model, int id, std::shared_ptr<Layer> layer, bool visibility);
338  void addEnvLayer(int model, int id, std::shared_ptr<Layer> layer, bool visibility);
339  void addShapefileLayer(int model, QString name, std::shared_ptr<GDALDataset> datasource, std::shared_ptr<LayerESRIShapefile> layer, bool show = true);
340 
341  void delSelectedEdges(int model);
342 
343 protected slots:
344  void geometryClicked(const Geometry *);
345  void widgetClosed(QObject *);
346 
347 public slots:
348  void signalAppIsClosing();
349  void removeAllWidgets();
350 
351  /* Selection slots */
352  void edgeSelectionHasChanged (EdgeMapObject *object);
354 
355  void redraw();
356 
357 signals:
358  int edgeSelectionChanged (int num);
359  int nodeSelectionChanged (int num);
360 
361 private:
362  qmapcontrol::QMapControl *mMap;
363  std::shared_ptr<DisplaceModel> mModels[MainWindow::MAX_MODELS];
364 
372 
373 // std::shared_ptr<PaletteManager> mPaletteManager[MainWindow::MAX_MODELS];
374 
375  /* Layers and adapters commons to all models */
376  std::shared_ptr<qmapcontrol::MapAdapter> mMainMapAdapter;
377  std::shared_ptr<qmapcontrol::MapAdapter> mSeamarkAdapter;
378  std::shared_ptr<qmapcontrol::LayerMapAdapter> mMainLayer;
379  std::shared_ptr<qmapcontrol::LayerMapAdapter> mSeamarkLayer;
380  std::shared_ptr<qmapcontrol::LayerGeometry> mWidgetLayer;
381  std::shared_ptr<qmapcontrol::LayerGeometry> mEditorLayer; /* Layer to show temporary geometries */
382 
383  /* Layers specific to every model */
384  std::shared_ptr<qmapcontrol::LayerGeometry> mEntityLayer[MainWindow::MAX_MODELS];
385  std::shared_ptr<EdgeLayer> mEdgesLayer[MainWindow::MAX_MODELS];
386  std::shared_ptr<qmapcontrol::LayerGeometry> mGraphLayer[MainWindow::MAX_MODELS];
387  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerPop[MainWindow::MAX_MODELS];
388  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerBiomass[MainWindow::MAX_MODELS];
389  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerImpact [MainWindow::MAX_MODELS];
390  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerCumcatchesPerPop [MainWindow::MAX_MODELS];
391  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerBenthosBiomass [MainWindow::MAX_MODELS];
392  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerBenthosNumber [MainWindow::MAX_MODELS];
393  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerBenthosMeanweight [MainWindow::MAX_MODELS];
394  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerTariffs [MainWindow::MAX_MODELS];
395  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerEnv [MainWindow::MAX_MODELS];
396  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerCumftime[MainWindow::MAX_MODELS];
397  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerCumsweptarea[MainWindow::MAX_MODELS];
398  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerCumsubsurfacesweptarea[MainWindow::MAX_MODELS];
399  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerCumcatches[MainWindow::MAX_MODELS];
400  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerCumcatchesWithThreshold[MainWindow::MAX_MODELS];
401  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerCumdiscards[MainWindow::MAX_MODELS];
402  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerCumdiscardsratio[MainWindow::MAX_MODELS];
403  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerNbchoked[MainWindow::MAX_MODELS];
404  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerTariffAll[MainWindow::MAX_MODELS];
405  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerTariffPop[MainWindow::MAX_MODELS];
406  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerTariffBenthos[MainWindow::MAX_MODELS];
407  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerWind[MainWindow::MAX_MODELS];
408  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerSST[MainWindow::MAX_MODELS];
409  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerSalinity[MainWindow::MAX_MODELS];
410  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerNitrogen[MainWindow::MAX_MODELS];
411  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerPhosphorus[MainWindow::MAX_MODELS];
412  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerOxygen[MainWindow::MAX_MODELS];
413  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerDissolvedCarbon[MainWindow::MAX_MODELS];
414  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerBathymetry[MainWindow::MAX_MODELS];
415  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerShippingdensity[MainWindow::MAX_MODELS];
416  std::shared_ptr<qmapcontrol::LayerGeometry> mStatsLayerSiltfraction[MainWindow::MAX_MODELS];
417 
418  QVector<bool> mModelVisibility;
419 
420  QVector<LayerListImpl> mLayers;
421  QVector<LayerListImpl> mEnvLayers;
422  QVector<LayerListImpl> mOutputLayers;
423  QVector<LayerListImpl> mTariffsLayers;
424  QVector<QList<std::shared_ptr<GDALDataset> > > mShapefiles;
425  QVector<LayerVarListImpl<qmapcontrol::LayerESRIShapefile> > mShapefileLayers;
426 
427  EditorModes mEditorMode;
428  bool mClosing;
429 
430  /* Selection handling */
431 
432  QSet<EdgeMapObject *> mEdgeSelection[MainWindow::MAX_MODELS];
433  QSet<NodeMapObject *> mNodeSelection[MainWindow::MAX_MODELS];
434 };
435 
436 #endif // MAPOBJECTSCONTROLLER_H
void clearAllNodes(int model_n)
Definition: mapobjectscontroller.cpp:496
static constexpr int MAX_MODELS
Definition: mainwindow.h:80
Definition: vesselmapobject.h:40
void signalAppIsClosing()
Definition: mapobjectscontroller.cpp:844
void widgetClosed(QObject *)
Definition: mapobjectscontroller.cpp:834
bool isModelActive(int model) const
Definition: mapobjectscontroller.cpp:361
Definition: mapobjectscontroller.h:96
Definition: mapobjectscontroller.h:199
Definition: mapobjectscontroller.h:211
PaletteRole
Definition: palettemanager.h:54
Definition: mapobjectscontroller.h:200
void forceRedraw()
Definition: mapobjectscontroller.cpp:372
void setPalette(int model, PaletteRole n, const Palette &palette)
Definition: mapobjectscontroller.cpp:366
void addEditorLayerGeometry(std::shared_ptr< qmapcontrol::Geometry > geometry)
Definition: mapobjectscontroller.cpp:725
Definition: mapobjectscontroller.h:199
Definition: mapobjectscontroller.h:236
void addTariffLayer(int model, int id, std::shared_ptr< Layer > layer, bool visibility)
Definition: mapobjectscontroller.cpp:553
Definition: nodemapobject.h:37
void removeAllWidgets()
Definition: mapobjectscontroller.cpp:849
Definition: myutils.h:206
WidgetAncillaryData(MapObject *object)
Definition: mapobjectscontroller.h:118
void updateShipPosition(int model, int idx)
Definition: mapobjectscontroller.cpp:266
Definition: objecttreemodel.h:49
Definition: mapobjectscontroller.h:241
Definition: mapobjectscontroller.h:215
Definition: harbourdata.h:29
WidgetUserData(std::shared_ptr< qmapcontrol::GeometryWidget > w)
Definition: mapobjectscontroller.h:108
Definition: mapobjectscontroller.h:206
Definition: mapobjectscontroller.h:210
Definition: objecttreemodel.h:48
Definition: mapobjectscontroller.h:235
void addShapefileLayer(int model, QString name, std::shared_ptr< GDALDataset > datasource, std::shared_ptr< LayerESRIShapefile > layer, bool show=true)
Definition: mapobjectscontroller.cpp:560
virtual ~LayerList() noexcept=default
void delSelectedEdges(int model)
Definition: mapobjectscontroller.cpp:735
Definition: mapobjectscontroller.h:228
std::shared_ptr< GDALDataset > cloneShapefileDatasource(int model_idx, const QString &name)
Definition: mapobjectscontroller.cpp:441
vector< Node * > nodes
Definition: main.cpp:270
DisplaceModel & getModel(int model_n)
Definition: mapobjectscontroller.cpp:95
void createMapObjectsFromModel(int model_n, DisplaceModel *model)
Definition: mapobjectscontroller.cpp:106
Definition: objecttreemodel.h:46
Definition: mapobjectscontroller.h:245
Definition: mapobjectscontroller.h:218
void redraw()
Definition: mapobjectscontroller.cpp:881
Definition: objecttreemodel.h:47
OutLayerIds
Definition: mapobjectscontroller.h:204
Definition: mapobjectscontroller.h:227
Definition: mapobjectscontroller.h:216
void addEnvLayer(int model, int id, std::shared_ptr< Layer > layer, bool visibility)
Definition: mapobjectscontroller.cpp:547
Definition: mapobjectscontroller.h:212
Definition: mapobjectscontroller.h:226
Definition: mapobjectscontroller.h:284
LayerList * getLayerList(int model, ObjectTreeModel::Category type)
Definition: mapobjectscontroller.h:271
void addHarbour(int model_n, std::shared_ptr< HarbourData > nd, bool disable_redraw=false)
Definition: mapobjectscontroller.cpp:707
Definition: mapobjectscontroller.h:205
void updateVesselPosition(int model, int idx)
Definition: mapobjectscontroller.cpp:261
Definition: harbourmapobject.h:36
Definition: windmillobject.h:40
LayerIds
Definition: mapobjectscontroller.h:197
void addOutputLayer(int model, OutLayerIds id, std::shared_ptr< Layer > layer, bool visibility)
Definition: mapobjectscontroller.cpp:541
QStringList getShapefilesList(int model_idx) const
Definition: mapobjectscontroller.cpp:426
Definition: mapsdataprovider.h:9
Definition: mapobjectscontroller.h:217
Definition: mapobjectscontroller.h:238
const Palette & getPalette(int model, PaletteRole n) const
Definition: mapobjectscontroller.h:295
Definition: mapobjectscontroller.h:202
void edgeSelectionHasChanged(EdgeMapObject *object)
Definition: mapobjectscontroller.cpp:857
TariffLayerIds
Definition: mapobjectscontroller.h:225
void selectNodes(int model, QList< types::NodeId > nodes)
Definition: mapobjectscontroller.cpp:469
Definition: objecttreemodel.h:45
Definition: mapobjectscontroller.h:250
Definition: mapobject.h:30
void geometryClicked(const Geometry *)
Definition: mapobjectscontroller.cpp:799
void removeModel(int model_n)
Definition: mapobjectscontroller.cpp:100
bool importShapefile(int model_idx, QString path, QString layername)
Definition: mapobjectscontroller.cpp:397
Definition: mapobjectscontroller.h:213
void updateWindmillPosition(int model, int idx)
Definition: mapobjectscontroller.cpp:277
bool isLayerVisible(int model, ObjectTreeModel::Category type, int layer)
Definition: mapobjectscontroller.cpp:338
Definition: mapobjectscontroller.h:243
Definition: shipmapobject.h:40
EditorModes
Definition: mapobjectscontroller.h:248
EnvLayerIds
Definition: mapobjectscontroller.h:233
void setModel(int model_n, std::shared_ptr< DisplaceModel > model)
Definition: mapobjectscontroller.cpp:90
Definition: displacemodel.h:71
void setModelVisibility(int model, Visibility visibility)
Sets the visibility of the model objects.
Definition: mapobjectscontroller.cpp:294
void addNode(int model_n, std::shared_ptr< NodeData > nd, bool disable_redraw=false)
Definition: mapobjectscontroller.cpp:567
void clearNodeSelection(int model)
Definition: mapobjectscontroller.cpp:458
void addEdge(int model_n, std::shared_ptr< NodeData::Edge > edge, bool disable_redraw)
Definition: mapobjectscontroller.cpp:697
Definition: mapobjectscontroller.h:230
virtual ~MapObjectsController() noexcept=default
MapObjectsController(qmapcontrol::QMapControl *map)
Definition: mapobjectscontroller.cpp:54
Definition: mapobjectscontroller.h:239
const Palette & palette(PaletteRole) const
Definition: palettemanager.cpp:194
static PaletteManager * instance()
Definition: palettemanager.h:146
MapObject * object() const
Definition: mapobjectscontroller.h:122
Definition: mapobjectscontroller.h:214
virtual int getCount() const =0
qmapcontrol::QMapControl * mapWidget() const
Definition: mapobjectscontroller.h:256
Definition: mapobjectscontroller.h:104
Definition: editorlayerinterface.h:50
Definition: edgelayer.h:31
bg::model::point< double, 2, bg::cs::cartesian > point
Definition: diffusion.cpp:28
Category
Definition: objecttreemodel.h:44
void showDetailsWidget(const PointWorldCoord &point, QWidget *widget)
Definition: mapobjectscontroller.cpp:377
std::shared_ptr< qmapcontrol::ESRIShapefile > getShapefile(int model_idx, int idx)
Definition: mapobjectscontroller.cpp:436
Definition: mapobjectscontroller.h:240
Definition: mapobjectscontroller.h:91
virtual QString getName(int idx) const =0
void delSelected(int model)
Definition: mapobjectscontroller.cpp:479
Definition: mapobjectscontroller.h:250
Definition: mapobjectscontroller.h:284
void updateNodes(int model)
Definition: mapobjectscontroller.cpp:282
Definition: mapobjectscontroller.h:198
Definition: mapobjectscontroller.h:219
int nodeSelectionChanged(int num)
Definition: moc_mapobjectscontroller.cpp:191
void nodeSelectionHasChanged(NodeMapObject *node)
Definition: mapobjectscontroller.cpp:869
Definition: edgemapobject.h:56
Definition: mapobjectscontroller.h:114
void updateMapObjectsFromModel(int model_n, DisplaceModel *model)
Definition: mapobjectscontroller.cpp:252
void setEditorMode(EditorModes mode)
Definition: mapobjectscontroller.cpp:453
void delSelectedNodes(int model)
Definition: mapobjectscontroller.cpp:761
QSet< EdgeMapObject * > edgeSelection(int model) const
Definition: mapobjectscontroller.h:319
Definition: mapobjectscontroller.h:242
void updateFishfarmPosition(int model, int idx)
Definition: mapobjectscontroller.cpp:272
void addStandardLayer(int model, LayerIds id, std::shared_ptr< Layer > layer, bool visibility)
Definition: mapobjectscontroller.cpp:534
void setLayerVisibility(int model, ObjectTreeModel::Category type, int layer, bool visibility)
Definition: mapobjectscontroller.cpp:305
int edgeSelectionChanged(int num)
Definition: moc_mapobjectscontroller.cpp:182
std::shared_ptr< qmapcontrol::GeometryWidget > widget() const
Definition: mapobjectscontroller.h:111
Definition: mapobjectscontroller.h:207
Definition: fishfarmobject.h:40
EditorModes getEditorMode() const
Definition: mapobjectscontroller.h:313
Definition: mapobjectscontroller.h:209
Definition: mapobjectscontroller.h:249
Definition: mapobjectscontroller.h:234
Definition: mapobjectscontroller.h:198
Visibility
Definition: mapobjectscontroller.h:284
Definition: mapobjectscontroller.h:208
void clearEditorLayer()
Definition: mapobjectscontroller.cpp:720
Definition: mapobjectscontroller.h:237
Definition: mapobjectscontroller.h:221
Definition: csvspecspage.h:20
MapsDataProvider & getMapDataProvider(int model)
Definition: mapobjectscontroller.cpp:730
Definition: palettemanager.h:62