QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgssnapindicator.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgssnapindicator.h
3
--------------------------------------
4
Date : October 2017
5
Copyright : (C) 2017 by Martin Dobias
6
Email : wonder dot sk at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSSNAPINDICATOR_H
17
#define QGSSNAPINDICATOR_H
18
19
#include "qgis_gui.h"
20
#include "
qgspointlocator.h
"
21
#include "
qobjectuniqueptr.h
"
22
23
class
QgsMapCanvas
;
24
class
QgsVertexMarker
;
25
26
31
class
GUI_EXPORT
QgsSnapIndicator
32
{
33
public
:
35
QgsSnapIndicator
(
QgsMapCanvas
*canvas );
36
~QgsSnapIndicator
();
37
39
void
setMatch
(
const
QgsPointLocator::Match
&
match
);
41
QgsPointLocator::Match
match
()
const
{
return
mMatch; }
42
44
void
setVisible(
bool
visible =
true
);
46
bool
isVisible()
const
;
47
48
private
:
49
Q_DISABLE_COPY(
QgsSnapIndicator
)
50
51
#ifdef SIP_RUN
52
QgsSnapIndicator
(
const
QgsSnapIndicator
&rh );
53
QgsSnapIndicator
&operator=(
const
QgsSnapIndicator
& );
54
#endif
55
56
QgsMapCanvas
*mCanvas =
nullptr
;
57
QgsPointLocator::Match
mMatch;
58
QObjectParentUniquePtr<QgsVertexMarker>
mSnappingMarker;
59
};
60
61
#endif
// QGSSNAPINDICATOR_H
QObjectParentUniquePtr
Keeps a pointer to an object owned by a QObject parent, and deletes it whenever this parent object is...
Definition
qobjectuniqueptr.h:243
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition
qgsmapcanvas.h:96
QgsSnapIndicator
Shows a snapping marker on map canvas for the current snapping match.
Definition
qgssnapindicator.h:32
QgsSnapIndicator::~QgsSnapIndicator
~QgsSnapIndicator()
QgsSnapIndicator::match
QgsPointLocator::Match match() const
Returns currently displayed snapping match.
Definition
qgssnapindicator.h:41
QgsSnapIndicator::setMatch
void setMatch(const QgsPointLocator::Match &match)
Sets snapping match that should be displayed in map canvas. Invalid match hides the indicator.
Definition
qgssnapindicator.cpp:35
QgsSnapIndicator::QgsSnapIndicator
QgsSnapIndicator(QgsMapCanvas *canvas)
Constructs an indicator for the given map canvas.
Definition
qgssnapindicator.cpp:27
QgsVertexMarker
A map canvas item for marking vertices of features using e.g.
Definition
qgsvertexmarker.h:37
qgspointlocator.h
qobjectuniqueptr.h
QgsPointLocator::Match
Definition
qgspointlocator.h:191
Generated on
for QGIS API Documentation by
1.17.0