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;
136 QVariantMap config()
const;
166 virtual bool valid()
const = 0;
200 void notifyAboutToSave();
215 virtual QWidget *createWidget( QWidget *parent ) = 0;
222 virtual void initWidget( QWidget *editor );
235 virtual void setFeature(
const QgsFeature &feature ) = 0;
243 virtual void setEnabled(
bool enabled );
253 virtual void aboutToSave();
257 QWidget *mWidget =
nullptr;
258 QWidget *mParent =
nullptr;
266 #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.