QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
Keeps track of the registered relations widgets. More...
#include <qgsrelationwidgetregistry.h>
Public Member Functions | |
QgsRelationWidgetRegistry () | |
Constructor. More... | |
~QgsRelationWidgetRegistry () | |
void | addRelationWidget (QgsAbstractRelationEditorWidgetFactory *widgetFactory) |
Adds a new registered relation widgetFactory. More... | |
QgsAbstractRelationEditorWidget * | create (const QString &widgetType, const QVariantMap &config, QWidget *parent=nullptr) const |
Create a relation widget of a given type for a given field. More... | |
QgsAbstractRelationEditorConfigWidget * | createConfigWidget (const QString &widgetType, const QgsRelation &relation, QWidget *parent=nullptr) const |
Creates a configuration widget. More... | |
QString | defaultWidgetType () const |
Returns the default editor widget type. More... | |
QMap< QString, QgsAbstractRelationEditorWidgetFactory * > | factories () const |
Gets access to all registered factories. More... | |
QStringList | relationWidgetNames () |
Returns a list of names of registered relation widgets. More... | |
void | removeRelationWidget (const QString &widgetType) |
Removes a registered relation widget with given widgetType. More... | |
void | setDefaultWidgetType (const QString &widgetType) |
Sets the default editor widget type. More... | |
Keeps track of the registered relations widgets.
New widgets can be registered, old ones deleted. The default {
Definition at line 33 of file qgsrelationwidgetregistry.h.
QgsRelationWidgetRegistry::QgsRelationWidgetRegistry | ( | ) |
Constructor.
Definition at line 21 of file qgsrelationwidgetregistry.cpp.
QgsRelationWidgetRegistry::~QgsRelationWidgetRegistry | ( | ) |
Definition at line 28 of file qgsrelationwidgetregistry.cpp.
void QgsRelationWidgetRegistry::addRelationWidget | ( | QgsAbstractRelationEditorWidgetFactory * | widgetFactory | ) |
Adds a new registered relation widgetFactory.
Definition at line 34 of file qgsrelationwidgetregistry.cpp.
QgsAbstractRelationEditorWidget * QgsRelationWidgetRegistry::create | ( | const QString & | widgetType, |
const QVariantMap & | config, | ||
QWidget * | parent = nullptr |
||
) | const |
Create a relation widget of a given type for a given field.
widgetType | The widget type to create a relation editor for |
config | The configuration of the widget |
parent |
Definition at line 77 of file qgsrelationwidgetregistry.cpp.
QgsAbstractRelationEditorConfigWidget * QgsRelationWidgetRegistry::createConfigWidget | ( | const QString & | widgetType, |
const QgsRelation & | relation, | ||
QWidget * | parent = nullptr |
||
) | const |
Creates a configuration widget.
widgetType | The widget type to create a configuration widget for |
relation | The relation for which this widget will be created |
parent | The parent widget for the created widget |
Definition at line 85 of file qgsrelationwidgetregistry.cpp.
QString QgsRelationWidgetRegistry::defaultWidgetType | ( | ) | const |
Returns the default editor widget type.
Definition at line 67 of file qgsrelationwidgetregistry.cpp.
QMap< QString, QgsAbstractRelationEditorWidgetFactory * > QgsRelationWidgetRegistry::factories | ( | ) | const |
Gets access to all registered factories.
Definition at line 72 of file qgsrelationwidgetregistry.cpp.
QStringList QgsRelationWidgetRegistry::relationWidgetNames | ( | ) |
Returns a list of names of registered relation widgets.
Definition at line 54 of file qgsrelationwidgetregistry.cpp.
void QgsRelationWidgetRegistry::removeRelationWidget | ( | const QString & | widgetType | ) |
Removes a registered relation widget with given widgetType.
Definition at line 45 of file qgsrelationwidgetregistry.cpp.
void QgsRelationWidgetRegistry::setDefaultWidgetType | ( | const QString & | widgetType | ) |
Sets the default editor widget type.
Does nothing if the provided widget type is not present.
widgetType | The widget type to be used by default. |
Definition at line 59 of file qgsrelationwidgetregistry.cpp.