|
QGIS API Documentation
2.12.0-Lyon
|
This class manages all known edit widget factories. More...
#include <qgseditorwidgetregistry.h>

Public Member Functions | |
| ~QgsEditorWidgetRegistry () | |
| Destructor. More... | |
| QgsEditorWidgetWrapper * | create (const QString &widgetId, QgsVectorLayer *vl, int fieldIdx, const QgsEditorWidgetConfig &config, QWidget *editor, QWidget *parent, const QgsAttributeEditorContext &context=QgsAttributeEditorContext()) |
| Create an attribute editor widget wrapper of a given type for a given field. More... | |
| QgsEditorConfigWidget * | createConfigWidget (const QString &widgetId, QgsVectorLayer *vl, int fieldIdx, QWidget *parent) |
| Creates a configuration widget. More... | |
| QgsSearchWidgetWrapper * | createSearchWidget (const QString &widgetId, QgsVectorLayer *vl, int fieldIdx, const QgsEditorWidgetConfig &config, QWidget *parent, const QgsAttributeEditorContext &context=QgsAttributeEditorContext()) |
| const QMap< QString, QgsEditorWidgetFactory * > & | factories () |
| Get access to all registered factories. More... | |
| QgsEditorWidgetFactory * | factory (const QString &widgetId) |
| Get a factory for the given widget type id. More... | |
| QString | name (const QString &widgetId) |
| Get the human readable name for a widget type. More... | |
| bool | registerWidget (const QString &widgetId, QgsEditorWidgetFactory *widgetFactory) |
| Register a new widget factory with the given id. More... | |
Public Member Functions inherited from QObject | |
| QObject (QObject *parent) | |
| QObject (QObject *parent, const char *name) | |
| virtual | ~QObject () |
| bool | blockSignals (bool block) |
| QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
| const QObjectList & | children () const |
| const char * | className () const |
| bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
| void | deleteLater () |
| void | destroyed (QObject *obj) |
| bool | disconnect (const QObject *receiver, const char *method) |
| bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
| void | dumpObjectInfo () |
| void | dumpObjectTree () |
| QList< QByteArray > | dynamicPropertyNames () const |
| virtual bool | event (QEvent *e) |
| virtual bool | eventFilter (QObject *watched, QEvent *event) |
| T | findChild (const QString &name) const |
| QList< T > | findChildren (const QRegExp ®Exp) const |
| QList< T > | findChildren (const QString &name) const |
| bool | inherits (const char *className) const |
| void | insertChild (QObject *object) |
| void | installEventFilter (QObject *filterObj) |
| bool | isA (const char *className) const |
| bool | isWidgetType () const |
| void | killTimer (int id) |
| virtual const QMetaObject * | metaObject () const |
| void | moveToThread (QThread *targetThread) |
| const char * | name () const |
| const char * | name (const char *defaultName) const |
| QString | objectName () const |
| QObject * | parent () const |
| QVariant | property (const char *name) const |
| void | removeChild (QObject *object) |
| void | removeEventFilter (QObject *obj) |
| void | setName (const char *name) |
| void | setObjectName (const QString &name) |
| void | setParent (QObject *parent) |
| bool | setProperty (const char *name, const QVariant &value) |
| bool | signalsBlocked () const |
| int | startTimer (int interval) |
| QThread * | thread () const |
Static Public Member Functions | |
| static void | initEditors (QgsMapCanvas *mapCanvas=0, QgsMessageBar *messageBar=0) |
| Registers all the default widgets. More... | |
| static QgsEditorWidgetRegistry * | instance () |
| This class is a singleton and has therefore to be accessed with this method instead of a constructor. More... | |
Static Public Member Functions inherited from QObject | |
| bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
| bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
| bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
| bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
| QString | tr (const char *sourceText, const char *disambiguation, int n) |
| QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions | |
| QgsEditorWidgetRegistry () | |
Protected Member Functions inherited from QObject | |
| bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
| virtual void | childEvent (QChildEvent *event) |
| virtual void | connectNotify (const char *signal) |
| virtual void | customEvent (QEvent *event) |
| virtual void | disconnectNotify (const char *signal) |
| int | receivers (const char *signal) const |
| QObject * | sender () const |
| int | senderSignalIndex () const |
| virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Static Protected Member Functions inherited from QObject | |
| QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
| objectName | |
This class manages all known edit widget factories.
Definition at line 32 of file qgseditorwidgetregistry.h.
| QgsEditorWidgetRegistry::~QgsEditorWidgetRegistry | ( | ) |
Destructor.
Deletes all the registered widgets
Definition at line 82 of file qgseditorwidgetregistry.cpp.
|
protected |
Definition at line 74 of file qgseditorwidgetregistry.cpp.
| QgsEditorWidgetWrapper * QgsEditorWidgetRegistry::create | ( | const QString & | widgetId, |
| QgsVectorLayer * | vl, | ||
| int | fieldIdx, | ||
| const QgsEditorWidgetConfig & | config, | ||
| QWidget * | editor, | ||
| QWidget * | parent, | ||
| const QgsAttributeEditorContext & | context = QgsAttributeEditorContext() |
||
| ) |
Create an attribute editor widget wrapper of a given type for a given field.
The editor may be NULL if you want the widget wrapper to create a default widget.
| widgetId | The id of the widget type to create an attribute editor for |
| vl | The vector layer for which this widget will be created |
| fieldIdx | The field index on the specified layer for which this widget will be created |
| config | A configuration which should be used for the widget creation |
| editor | An editor widget which will be used instead of an autocreated widget |
| parent | The parent which will be used for the created wrapper and the created widget |
| context | The editor context (not available in python bindings) |
Definition at line 87 of file qgseditorwidgetregistry.cpp.
| QgsEditorConfigWidget * QgsEditorWidgetRegistry::createConfigWidget | ( | const QString & | widgetId, |
| QgsVectorLayer * | vl, | ||
| int | fieldIdx, | ||
| QWidget * | parent | ||
| ) |
Creates a configuration widget.
| widgetId | The id of the widget type to create a configuration widget for |
| vl | The vector layer for which this widget will be created |
| fieldIdx | The field index on the specified layer for which this widget will be created |
| parent | The parent widget for the created widget |
Definition at line 137 of file qgseditorwidgetregistry.cpp.
| QgsSearchWidgetWrapper * QgsEditorWidgetRegistry::createSearchWidget | ( | const QString & | widgetId, |
| QgsVectorLayer * | vl, | ||
| int | fieldIdx, | ||
| const QgsEditorWidgetConfig & | config, | ||
| QWidget * | parent, | ||
| const QgsAttributeEditorContext & | context = QgsAttributeEditorContext() |
||
| ) |
Definition at line 118 of file qgseditorwidgetregistry.cpp.
| const QMap< QString, QgsEditorWidgetFactory * > & QgsEditorWidgetRegistry::factories | ( | ) |
Get access to all registered factories.
Definition at line 156 of file qgseditorwidgetregistry.cpp.
| QgsEditorWidgetFactory * QgsEditorWidgetRegistry::factory | ( | const QString & | widgetId | ) |
Get a factory for the given widget type id.
Definition at line 161 of file qgseditorwidgetregistry.cpp.
|
static |
Registers all the default widgets.
Only call this once on startup of an application.
| mapCanvas | Specify a map canvas with which the widgets (relation reference) work |
| messageBar | Specify a message bar on which messages by widgets will be shown while working with the map canvas |
Definition at line 51 of file qgseditorwidgetregistry.cpp.
|
static |
This class is a singleton and has therefore to be accessed with this method instead of a constructor.
Definition at line 45 of file qgseditorwidgetregistry.cpp.
Get the human readable name for a widget type.
| widgetId | The widget type to get the name for |
Definition at line 146 of file qgseditorwidgetregistry.cpp.
| bool QgsEditorWidgetRegistry::registerWidget | ( | const QString & | widgetId, |
| QgsEditorWidgetFactory * | widgetFactory | ||
| ) |
Register a new widget factory with the given id.
| widgetId | The id which will be used later to refer to this widget type |
| widgetFactory | The factory which will create this widget type |
Definition at line 166 of file qgseditorwidgetregistry.cpp.
1.8.9.1