QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
src
core
qgspluginlayerregistry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgspluginlayerregistry.cpp - class for
3
registering plugin layer creators
4
-------------------
5
begin : Mon Nov 30 2009
6
copyright : (C) 2009 by Mathias Walker, Sourcepole
7
email : mwa at sourcepole.ch
8
***************************************************************************/
9
10
/***************************************************************************
11
* *
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
16
* *
17
***************************************************************************/
18
19
#ifndef QGSPLUGINLAYERREGSITRY_H
20
#define QGSPLUGINLAYERREGSITRY_H
21
22
#include <QMap>
23
#include "
qgis_sip.h
"
24
#include <QDomNode>
25
26
#include "qgis_core.h"
27
28
class
QgsPluginLayer
;
29
34
class
CORE_EXPORT
QgsPluginLayerType
35
{
36
public
:
37
38
QgsPluginLayerType
(
const
QString &name );
39
virtual
~
QgsPluginLayerType
() =
default
;
40
41
QString name()
const
;
42
44
virtual
QgsPluginLayer
*createLayer()
SIP_FACTORY
;
45
50
virtual
QgsPluginLayer
*createLayer(
const
QString &uri )
SIP_FACTORY
;
51
53
virtual
bool
showLayerProperties(
QgsPluginLayer
*layer );
54
55
protected
:
56
QString
mName
;
57
};
58
59
//=============================================================================
60
68
class
CORE_EXPORT
QgsPluginLayerRegistry
69
{
70
public
:
71
75
QgsPluginLayerRegistry
() =
default
;
76
~
QgsPluginLayerRegistry
();
77
79
QgsPluginLayerRegistry
(
const
QgsPluginLayerRegistry
&rh ) =
delete
;
81
QgsPluginLayerRegistry
&operator=(
const
QgsPluginLayerRegistry
&rh ) =
delete
;
82
86
QStringList pluginLayerTypes();
87
89
bool
addPluginLayerType(
QgsPluginLayerType
*pluginLayerType
SIP_TRANSFER
);
90
92
bool
removePluginLayerType(
const
QString &
typeName
);
93
95
QgsPluginLayerType
*pluginLayerType(
const
QString &
typeName
);
96
101
QgsPluginLayer
*createLayer(
const
QString &
typeName
,
const
QString &uri = QString() )
SIP_FACTORY
;
102
103
private
:
104
#ifdef SIP_RUN
105
QgsPluginLayerRegistry
(
const
QgsPluginLayerRegistry
&rh );
106
#endif
107
108
typedef
QMap<QString, QgsPluginLayerType *> PluginLayerTypes;
109
110
PluginLayerTypes mPluginLayerTypes;
111
};
112
113
#endif // QGSPLUGINLAYERREGSITRY_H
QgsPluginLayerType::mName
QString mName
Definition:
qgspluginlayerregistry.h:56
SIP_FACTORY
#define SIP_FACTORY
Definition:
qgis_sip.h:76
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition:
qgis_sip.h:36
typeName
const QString & typeName
Definition:
qgswfsgetfeature.cpp:109
QgsPluginLayer
Base class for plugin layers. These can be implemented by plugins and registered in QgsPluginLayerReg...
Definition:
qgspluginlayer.h:31
QgsPluginLayerType
Class for creating plugin specific layers.
Definition:
qgspluginlayerregistry.h:34
QgsPluginLayerRegistry
A registry of plugin layers types.
Definition:
qgspluginlayerregistry.h:68
Generated on Sun Sep 11 2022 00:03:17 for QGIS API Documentation by
1.8.17