QGIS API Documentation
2.6.0-Brighton
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
/* enum ELEMENTS {
56
MENU,
57
MENU_ITEM,
58
TOOLBAR,
59
TOOLBAR_BUTTON,
60
};
61
62
@todo XXX this may be a hint that there should be subclasses
63
*/
64
enum
PLUGINTYPE
65
{
66
UI
= 1,
/* user interface plug-in */
67
MAPLAYER
,
/* map layer plug-in */
68
RENDERER
,
/*a plugin for a new renderer class*/
69
};
70
71
72
QgisPlugin
( QString
const
&
name
=
""
,
73
QString
const
&
description
=
""
,
74
QString
const
&
category
=
""
,
75
QString
const
&
version
=
""
,
76
PLUGINTYPE
const
&
type
=
MAPLAYER
)
77
: mName(
name
),
78
mDescription(
description
),
79
mCategory(
category
),
80
mVersion(
version
),
81
mType(
type
)
82
{}
83
84
virtual
~QgisPlugin
()
85
{}
86
88
QString
const
&
name
()
const
89
{
90
return
mName;
91
}
92
93
QString &
name
()
94
{
95
return
mName;
96
}
97
99
QString
const
&
version
()
const
100
{
101
return
mVersion;
102
}
103
105
QString &
version
()
106
{
107
return
mVersion;
108
}
109
111
QString
const
&
description
()
const
112
{
113
return
mDescription;
114
}
115
117
QString &
description
()
118
{
119
return
mDescription;
120
}
121
123
QString
const
&
category
()
const
124
{
125
return
mCategory;
126
}
127
129
QString &
category
()
130
{
131
return
mCategory;
132
}
133
135
QgisPlugin::PLUGINTYPE
const
&
type
()
const
136
{
137
return
mType;
138
}
139
140
142
QgisPlugin::PLUGINTYPE
&
type
()
143
{
144
return
mType;
145
}
146
148
virtual
void
initGui
() = 0;
149
151
virtual
void
unload
() = 0;
152
153
private
:
154
156
QString mName;
157
159
QString mDescription;
160
162
QString mCategory;
163
165
QString mVersion;
166
168
172
PLUGINTYPE
mType;
173
174
};
// class QgisPlugin
175
176
177
// Typedefs used by qgis main app
178
180
typedef
QgisPlugin
*
create_t
(
QgisInterface
* );
181
183
typedef
void
unload_t
(
QgisPlugin
* );
184
186
typedef
QString
name_t
();
187
189
typedef
QString
description_t
();
190
192
typedef
QString
category_t
();
193
195
typedef
int
type_t
();
196
198
typedef
QString
version_t
();
199
201
typedef
QString
icon_t
();
202
204
typedef
QString
experimental_t
();
205
206
#endif //qgisplugin_h
Generated on Fri Oct 31 2014 15:49:46 for QGIS API Documentation by
1.8.1.2