QGIS API Documentation
2.8.2-Wien
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
src
plugins
qgisplugin.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgisplugin.h
3
--------------------------------------
4
Date : Sun Sep 16 12:12:31 AKDT 2007
5
Copyright : (C) 2007 by Gary E. Sherman
6
Email : sherman at mrcc 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
***************************************************************************/
34
#ifndef QGISPLUGIN_H
35
#define QGISPLUGIN_H
36
37
38
#include <QString>
39
40
class
QgisInterface
;
41
42
//#include "qgisplugingui.h"
43
48
class
QgisPlugin
49
{
50
public
:
51
53
//virtual QgisPluginGui *gui()=0;
55
#if 0
56
enum
ELEMENTS
57
{
58
MENU,
59
MENU_ITEM,
60
TOOLBAR,
61
TOOLBAR_BUTTON,
62
};
63
64
@todo XXX
this
may be a hint that there should be subclasses
65
#endif
66
67
enum
PLUGINTYPE
68
{
69
UI
= 1,
/* user interface plug-in */
70
MAPLAYER
,
/* map layer plug-in */
71
RENDERER
,
/*a plugin for a new renderer class*/
72
};
73
74
75
QgisPlugin
( QString
const
&
name
=
""
,
76
QString
const
&
description
=
""
,
77
QString
const
&
category
=
""
,
78
QString
const
&
version
=
""
,
79
PLUGINTYPE
const
&
type
=
MAPLAYER
)
80
: mName(
name
)
81
, mDescription(
description
)
82
, mCategory(
category
)
83
, mVersion(
version
)
84
, mType(
type
)
85
{}
86
87
virtual
~QgisPlugin
()
88
{}
89
91
QString
const
&
name
()
const
92
{
93
return
mName;
94
}
95
96
QString &
name
()
97
{
98
return
mName;
99
}
100
102
QString
const
&
version
()
const
103
{
104
return
mVersion;
105
}
106
108
QString &
version
()
109
{
110
return
mVersion;
111
}
112
114
QString
const
&
description
()
const
115
{
116
return
mDescription;
117
}
118
120
QString &
description
()
121
{
122
return
mDescription;
123
}
124
126
QString
const
&
category
()
const
127
{
128
return
mCategory;
129
}
130
132
QString &
category
()
133
{
134
return
mCategory;
135
}
136
138
QgisPlugin::PLUGINTYPE
const
&
type
()
const
139
{
140
return
mType;
141
}
142
143
145
QgisPlugin::PLUGINTYPE
&
type
()
146
{
147
return
mType;
148
}
149
151
virtual
void
initGui
() = 0;
152
154
virtual
void
unload
() = 0;
155
156
private
:
157
159
QString mName;
160
162
QString mDescription;
163
165
QString mCategory;
166
168
QString mVersion;
169
171
175
PLUGINTYPE
mType;
176
177
};
// class QgisPlugin
178
179
180
// Typedefs used by qgis main app
181
183
typedef
QgisPlugin
*
create_t
(
QgisInterface
* );
184
186
typedef
void
unload_t
(
QgisPlugin
* );
187
189
typedef
QString
name_t
();
190
192
typedef
QString
description_t
();
193
195
typedef
QString
category_t
();
196
198
typedef
int
type_t
();
199
201
typedef
QString
version_t
();
202
204
typedef
QString
icon_t
();
205
207
typedef
QString
experimental_t
();
208
209
#endif // QGISPLUGIN_H
Generated on Sun May 10 2015 16:33:26 for QGIS API Documentation by
1.8.1.2