Quantum GIS API Documentation
1.7.5-Wroclaw
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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
/* $Id$ */
19
20
#ifndef QGSPLUGINLAYERREGSITRY_H
21
#define QGSPLUGINLAYERREGSITRY_H
22
23
#include <QMap>
24
#include <QDomNode>
25
26
class
QgsPluginLayer
;
27
33
class
CORE_EXPORT
QgsPluginLayerType
34
{
35
public
:
36
37
QgsPluginLayerType
( QString name );
38
virtual
~
QgsPluginLayerType
();
39
40
QString name();
41
43
virtual
QgsPluginLayer
* createLayer();
44
46
virtual
bool
showLayerProperties(
QgsPluginLayer
* layer );
47
48
protected
:
49
QString
mName
;
50
};
51
52
//=============================================================================
53
59
class
CORE_EXPORT
QgsPluginLayerRegistry
60
{
61
public
:
62
64
static
QgsPluginLayerRegistry
* instance();
65
66
~
QgsPluginLayerRegistry
();
67
69
bool
addPluginLayerType(
QgsPluginLayerType
* pluginLayerType );
70
72
bool
removePluginLayerType( QString typeName );
73
75
QgsPluginLayerType
* pluginLayerType( QString typeName );
76
78
QgsPluginLayer
* createLayer( QString typeName );
79
80
private
:
81
82
typedef
QMap<QString, QgsPluginLayerType*>
PluginLayerTypes
;
83
85
QgsPluginLayerRegistry
();
86
88
static
QgsPluginLayerRegistry
*
_instance
;
89
90
PluginLayerTypes
mPluginLayerTypes
;
91
};
92
93
#endif // QGSPLUGINLAYERREGSITRY_H
Generated on Wed Jun 13 2012 13:54:10 for Quantum GIS API Documentation by
1.8.1