DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
drawpenaltypolygon.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 DRAWPENALTYPOLYGON_H
22 #define DRAWPENALTYPOLYGON_H
23 
24 #include <mousemode.h>
25 #include <editorlayerinterface.h>
26 
27 #include <QPointF>
28 #include <QList>
29 #include <QDialog>
30 
31 class MainWindow;
32 
34 {
35 public:
37 
39 
43  virtual bool pressEvent(const QPointF &point);
44 
48  virtual bool releaseEvent(const QPointF &point);
49 
53  virtual bool moveEvent(const QPointF &point);
54 
58  virtual bool beginMode();
59 
60 
64  virtual bool endMode(bool success);
65 
66  QString getModeDescription() const;
67 private:
68  MainWindow *mMainWindow;
69  EditorLayerInterface *mLayerInterface;
70  QDialog *mActionDialog;
71 
72  bool mPressed;
73  QList<QPointF> mPoints;
74 };
75 
76 #endif // DRAWPENALTYPOLYGON_H
virtual bool pressEvent(const QPointF &point)
signals a mouse press event.
Definition: drawpenaltypolygon.cpp:62
virtual bool moveEvent(const QPointF &point)
signals a mouse move event.
Definition: drawpenaltypolygon.cpp:96
virtual bool releaseEvent(const QPointF &point)
signals a mouse release event.
Definition: drawpenaltypolygon.cpp:70
virtual bool beginMode()
Starts the mouse mode.
Definition: drawpenaltypolygon.cpp:105
The MouseMode class.
Definition: mousemode.h:61
~DrawPenaltyPolygon()
Definition: drawpenaltypolygon.cpp:57
virtual bool endMode(bool success)
Completes the mouse mode.
Definition: drawpenaltypolygon.cpp:111
Definition: editorlayerinterface.h:50
bg::model::point< double, 2, bg::cs::cartesian > point
Definition: diffusion.cpp:28
QString getModeDescription() const
Definition: drawpenaltypolygon.cpp:127
DrawPenaltyPolygon(MainWindow *win, EditorLayerInterface *ifc)
Definition: drawpenaltypolygon.cpp:34
Definition: mainwindow.h:75
Definition: drawpenaltypolygon.h:33