File tree Expand file tree Collapse file tree 6 files changed +75
-4
lines changed Expand file tree Collapse file tree 6 files changed +75
-4
lines changed Original file line number Diff line number Diff line change
1
+ /************************************************************************
2
+ * This file has been generated automatically from *
3
+ * *
4
+ * src/core/qgsmapcanvasinterface.h *
5
+ * *
6
+ * Do not edit manually ! Edit header and run scripts/sipify.pl again *
7
+ ************************************************************************/
8
+
9
+
10
+
11
+ class QgsMapCanvasInterface
12
+ {
13
+ %Docstring
14
+ The QgsMapCanvasInterface class provides a simple interface to access
15
+ core components of a map canvas.
16
+
17
+ .. versionadded:: 3.6
18
+ %End
19
+
20
+ %TypeHeaderCode
21
+ #include "qgsmapcanvasinterface.h"
22
+ %End
23
+ public:
24
+ explicit QgsMapCanvasInterface();
25
+ %Docstring
26
+ Constructor of QgsMapCanvasInterface
27
+ %End
28
+ virtual ~QgsMapCanvasInterface();
29
+
30
+ virtual const QgsMapSettings &mapSettings() const = 0 /KeepReference/;
31
+ %Docstring
32
+ Returns the map settings
33
+ %End
34
+ };
35
+
36
+ /************************************************************************
37
+ * This file has been generated automatically from *
38
+ * *
39
+ * src/core/qgsmapcanvasinterface.h *
40
+ * *
41
+ * Do not edit manually ! Edit header and run scripts/sipify.pl again *
42
+ ************************************************************************/
Original file line number Diff line number Diff line change 67
67
%Include auto_generated/qgslegendsettings.sip
68
68
%Include auto_generated/qgslegendstyle.sip
69
69
%Include auto_generated/qgslogger.sip
70
+ %Include auto_generated/qgsmapcanvasinterface.sip
70
71
%Include auto_generated/qgsmapdecoration.sip
71
72
%Include auto_generated/qgsmaphittest.sip
72
73
%Include auto_generated/qgsmaplayerdependency.sip
Original file line number Diff line number Diff line change 18
18
19
19
20
20
21
- class QgsMapCanvas : QGraphicsView
21
+ class QgsMapCanvas : QGraphicsView, QgsMapCanvasInterface
22
22
{
23
23
%Docstring
24
24
Map canvas is a class for displaying all GIS data types on a canvas.
@@ -65,7 +65,8 @@ empty string before setLayers() calls can be made.
65
65
66
66
void setCurrentLayer( QgsMapLayer *layer );
67
67
68
- const QgsMapSettings &mapSettings() const /KeepReference/;
68
+ virtual const QgsMapSettings &mapSettings() const ${SIP_FINAL} /KeepReference/;
69
+
69
70
%Docstring
70
71
Gets access to properties used for map rendering
71
72
Original file line number Diff line number Diff line change @@ -888,6 +888,7 @@ SET(QGIS_CORE_HDRS
888
888
qgslegendsettings.h
889
889
qgslegendstyle.h
890
890
qgslogger.h
891
+ qgsmapcanvasinterface.h
891
892
qgsmapdecoration.h
892
893
qgsmaplayerref.h
893
894
qgsmaphittest.h
Original file line number Diff line number Diff line change
1
+ #ifndef QGSMAPCANVASINTERFACE_H
2
+ #define QGSMAPCANVASINTERFACE_H
3
+
4
+ #include " qgis_core.h"
5
+ #include " qgis_sip.h"
6
+
7
+ class QgsMapSettings ;
8
+
9
+ /* *
10
+ * The QgsMapCanvasInterface class provides a simple interface to access
11
+ * core components of a map canvas.
12
+ * \since QGIS 3.6
13
+ */
14
+ class CORE_EXPORT QgsMapCanvasInterface
15
+ {
16
+ public:
17
+ // ! Constructor of QgsMapCanvasInterface
18
+ explicit QgsMapCanvasInterface () = default;
19
+ virtual ~QgsMapCanvasInterface () = default ;
20
+
21
+ // ! Returns the map settings
22
+ virtual const QgsMapSettings &mapSettings () const = 0 SIP_KEEPREFERENCE;
23
+ };
24
+
25
+ #endif // QGSMAPCANVASINTERFACE_H
Original file line number Diff line number Diff line change 26
26
#include " qgsfeatureid.h"
27
27
#include " qgsgeometry.h"
28
28
#include " qgis.h"
29
+ #include " qgsmapcanvasinterface.h"
29
30
30
31
#include < QDomDocument>
31
32
#include < QGraphicsView>
@@ -71,7 +72,7 @@ class QgsMapCanvasAnnotationItem;
71
72
* Map canvas is a class for displaying all GIS data types on a canvas.
72
73
*/
73
74
74
- class GUI_EXPORT QgsMapCanvas : public QGraphicsView
75
+ class GUI_EXPORT QgsMapCanvas : public QGraphicsView, public QgsMapCanvasInterface
75
76
{
76
77
77
78
#ifdef SIP_RUN
@@ -119,7 +120,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
119
120
* Gets access to properties used for map rendering
120
121
* \since QGIS 2.4
121
122
*/
122
- const QgsMapSettings &mapSettings () const SIP_KEEPREFERENCE;
123
+ const QgsMapSettings &mapSettings () const FINAL SIP_KEEPREFERENCE;
123
124
124
125
/* *
125
126
* sets destination coordinate reference system
You can’t perform that action at this time.
0 commit comments