QGIS API Documentation
2.10.1-Pisa
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
gui
editorwidgets
core
qgseditorwidgetregistry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgseditorwidgetregistry.h
3
--------------------------------------
4
Date : 24.4.2013
5
Copyright : (C) 2013 Matthias Kuhn
6
Email : matthias dot kuhn at gmx dot ch
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
***************************************************************************/
15
16
#ifndef QGSEDITORWIDGETREGISTRY_H
17
#define QGSEDITORWIDGETREGISTRY_H
18
19
#include <QObject>
20
#include <QMap>
21
22
#include "
qgseditorwidgetfactory.h
"
23
24
class
QgsMapLayer
;
25
class
QDomNode
;
26
class
QgsMapCanvas
;
27
class
QgsMessageBar
;
28
32
class
GUI_EXPORT
QgsEditorWidgetRegistry
:
public
QObject
33
{
34
Q_OBJECT
35
36
public
:
43
static
QgsEditorWidgetRegistry
* instance();
44
55
static
void
initEditors(
QgsMapCanvas
* mapCanvas = 0,
QgsMessageBar
* messageBar = 0 );
56
62
~
QgsEditorWidgetRegistry
();
63
78
QgsEditorWidgetWrapper
* create(
const
QString
& widgetId,
79
QgsVectorLayer
* vl,
80
int
fieldIdx,
81
const
QgsEditorWidgetConfig
& config,
82
QWidget
* editor,
83
QWidget
* parent,
84
const
QgsAttributeEditorContext
& context =
QgsAttributeEditorContext
() );
85
86
QgsEditorWidgetWrapper
* createSearchWidget(
const
QString
& widgetId,
87
QgsVectorLayer
* vl,
88
int
fieldIdx,
89
const
QgsEditorWidgetConfig
& config,
90
QWidget
* parent,
91
const
QgsAttributeEditorContext
& context =
QgsAttributeEditorContext
() );
92
103
QgsEditorConfigWidget
* createConfigWidget(
const
QString
& widgetId,
QgsVectorLayer
* vl,
int
fieldIdx,
QWidget
* parent );
104
112
QString
name
(
const
QString
& widgetId );
113
119
const
QMap<QString, QgsEditorWidgetFactory*>
& factories();
120
126
QgsEditorWidgetFactory
* factory(
const
QString
& widgetId );
127
136
bool
registerWidget(
const
QString
& widgetId,
QgsEditorWidgetFactory
* widgetFactory );
137
138
protected
:
139
QgsEditorWidgetRegistry
();
140
141
private
slots:
147
void
readMapLayer(
QgsMapLayer
* mapLayer,
const
QDomElement
& layerElem );
148
158
Q_DECL_DEPRECATED
const
QString
readLegacyConfig(
QgsVectorLayer
* vl,
const
QDomElement
& layerElem,
QgsEditorWidgetConfig
& cfg );
159
167
void
writeMapLayer(
QgsMapLayer
* mapLayer,
QDomElement
& layerElem,
QDomDocument
& doc )
const
;
168
174
void
mapLayerAdded(
QgsMapLayer
* mapLayer );
175
183
void
readSymbology(
const
QDomElement
& element,
QString
& errorMessage );
184
193
void
writeSymbology(
QDomElement
& element,
QDomDocument
& doc,
QString
& errorMessage );
194
195
private
:
196
QMap<QString, QgsEditorWidgetFactory*>
mWidgetFactories;
197
};
198
199
#endif // QGSEDITORWIDGETREGISTRY_H
QWidget
QgsMapLayer
Base class for all map layer types.
Definition:
qgsmaplayer.h:49
QgsEditorConfigWidget
This class should be subclassed for every configurable editor widget type.
Definition:
qgseditorconfigwidget.h:33
QgsEditorWidgetRegistry
This class manages all known edit widget factories.
Definition:
qgseditorwidgetregistry.h:32
QgsAttributeEditorContext
This class contains context information for attribute editor widgets.
Definition:
qgsattributeeditorcontext.h:33
QgsEditorWidgetWrapper
Manages an editor widget Widget and wrapper share the same parent.
Definition:
qgseditorwidgetwrapper.h:41
QMap
QgsMessageBar
A bar for displaying non-blocking messages to the user.
Definition:
qgsmessagebar.h:42
QDomNode
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition:
qgsmapcanvas.h:105
QObject::name
const char * name() const
qgseditorwidgetfactory.h
QObject
QgsEditorWidgetFactory
Every attribute editor widget needs a factory, which inherits this class.
Definition:
qgseditorwidgetfactory.h:38
QString
QDomDocument
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition:
qgsvectorlayer.h:620
QDomElement
Generated on Sat Aug 22 2015 02:53:41 for QGIS API Documentation by
1.8.6