DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
singleclickmousemode.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 ADDNODEMOUSEMODE_H
22 #define ADDNODEMOUSEMODE_H
23 
24 #include <mousemode.h>
25 
26 #include <QObject>
27 #include <QPointF>
28 #include <QList>
29 #include <QDialog>
30 
37 {
38  Q_OBJECT
39 public:
40  explicit SingleClickMouseMode(QString description);
41 
42  virtual ~SingleClickMouseMode();
43 
47  virtual bool releaseEvent(const QPointF &point);
48 
52  virtual bool endMode(bool success);
53 
54  QString getModeDescription() const;
55 signals:
56  void modeCompleted(QPointF);
57 
58 protected:
59  QString mDescription;
60 };
61 
62 #endif // ADDNODEMOUSEMODE_H
QString mDescription
Definition: singleclickmousemode.h:59
virtual ~SingleClickMouseMode()
Definition: singleclickmousemode.cpp:32
virtual bool releaseEvent(const QPointF &point)
signals a mouse release event.
Definition: singleclickmousemode.cpp:37
virtual bool endMode(bool success)
Completes the mouse mode.
Definition: singleclickmousemode.cpp:43
SingleClickMouseMode(QString description)
Definition: singleclickmousemode.cpp:26
The MouseMode class.
Definition: mousemode.h:61
QString getModeDescription() const
Definition: singleclickmousemode.cpp:50
The SingleClickMouseMode class implements a mouse mode that completes once a point on the map is clic...
Definition: singleclickmousemode.h:36
bg::model::point< double, 2, bg::cs::cartesian > point
Definition: diffusion.cpp:28
void modeCompleted(QPointF)
Definition: moc_singleclickmousemode.cpp:123