16 #ifndef QGSWIDGETWRAPPER_H 17 #define QGSWIDGETWRAPPER_H 55 if ( qobject_cast<QgsEditorWidgetWrapper *>( sipCpp ) )
56 sipType = sipType_QgsEditorWidgetWrapper;
57 else if ( qobject_cast<QgsRelationWidgetWrapper *>( sipCpp ) )
58 sipType = sipType_QgsRelationWidgetWrapper;
107 T *
widget() {
return dynamic_cast<T
>( mWidget ); }
114 void setConfig(
const QVariantMap &config );
131 QVariant config(
const QString &key,
const QVariant &defaultVal = QVariant() )
const;
138 QVariantMap config()
const;
174 virtual bool valid()
const = 0;
214 virtual QWidget *createWidget( QWidget *parent ) = 0;
221 virtual void initWidget( QWidget *editor );
234 virtual void setFeature(
const QgsFeature &feature ) = 0;
242 virtual void setEnabled(
bool enabled );
247 QWidget *mWidget =
nullptr;
248 QWidget *mParent =
nullptr;
256 #endif // QGSWIDGETWRAPPER_H
This class contains context information for attribute editor widgets.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Q_DECLARE_METATYPE(QModelIndex)
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Represents a vector layer which manages a vector based data sets.