QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
QgsEditorConfigWidget Class Referenceabstract

This class should be subclassed for every configurable editor widget type. More...

#include <qgseditorconfigwidget.h>

Inheritance diagram for QgsEditorConfigWidget:
Inheritance graph
[legend]

Public Member Functions

 QgsEditorConfigWidget (QgsVectorLayer *vl, int fieldIdx, QWidget *parent)
 Create a new configuration widget. More...
 
virtual ~QgsEditorConfigWidget ()
 Destructor. More...
 
virtual QgsEditorWidgetConfig config ()=0
 Create a configuration from the current GUI state. More...
 
int field ()
 Returns the field for which this configuration widget applies. More...
 
QgsVectorLayerlayer ()
 Returns the layer for which this configuration widget applies. More...
 
virtual void setConfig (const QgsEditorWidgetConfig &config)=0
 Update the configuration widget to represent the given configuration. More...
 

Detailed Description

This class should be subclassed for every configurable editor widget type.

It implements the GUI configuration widget and transforms this to/from a configuration.

It will only be instantiated by {

See also
QgsEditorWidgetFactory}

Definition at line 33 of file qgseditorconfigwidget.h.

Constructor & Destructor Documentation

QgsEditorConfigWidget::QgsEditorConfigWidget ( QgsVectorLayer vl,
int  fieldIdx,
QWidget *  parent 
)
explicit

Create a new configuration widget.

Parameters
vlThe layer for which the configuration dialog will be created
fieldIdxThe index of the field on the layer for which this dialog will be created
parentA parent widget

Definition at line 19 of file qgseditorconfigwidget.cpp.

virtual QgsEditorConfigWidget::~QgsEditorConfigWidget ( )
inlinevirtual

Destructor.

Definition at line 77 of file qgseditorconfigwidget.h.

Member Function Documentation

virtual QgsEditorWidgetConfig QgsEditorConfigWidget::config ( )
pure virtual
int QgsEditorConfigWidget::field ( )

Returns the field for which this configuration widget applies.

Returns
The field index

Definition at line 27 of file qgseditorconfigwidget.cpp.

QgsVectorLayer * QgsEditorConfigWidget::layer ( )

Returns the layer for which this configuration widget applies.

Returns
The layer

Definition at line 32 of file qgseditorconfigwidget.cpp.

virtual void QgsEditorConfigWidget::setConfig ( const QgsEditorWidgetConfig config)
pure virtual

Update the configuration widget to represent the given configuration.

Parameters
configThe configuration which should be represented by this widget

Implemented in QgsDateTimeEditConfig, QgsValueRelationConfigDlg, QgsCheckBoxConfigDlg, QgsPhotoConfigDlg, QgsTextEditConfigDlg, QgsUniqueValuesConfigDlg, QgsWebViewWidgetConfigDlg, QgsDummyConfigDlg, QgsValueMapConfigDlg, QgsRangeConfigDlg, and QgsRelationReferenceConfigDlg.


The documentation for this class was generated from the following files: