16 #ifndef QGSWIDGETWRAPPER_H 17 #define QGSWIDGETWRAPPER_H 57 if ( qobject_cast<QgsEditorWidgetWrapper *>( sipCpp ) )
58 sipType = sipType_QgsEditorWidgetWrapper;
59 else if ( qobject_cast<QgsRelationWidgetWrapper *>( sipCpp ) )
60 sipType = sipType_QgsRelationWidgetWrapper;
61 else if ( qobject_cast<QgsQmlWidgetWrapper *>( sipCpp ) )
62 sipType = sipType_QgsQmlWidgetWrapper;
63 else if ( qobject_cast<QgsHtmlWidgetWrapper *>( sipCpp ) )
64 sipType = sipType_QgsHtmlWidgetWrapper;
113 T *
widget() {
return dynamic_cast<T
>( mWidget ); }
120 void setConfig(
const QVariantMap &config );
137 QVariant config(
const QString &key,
const QVariant &defaultVal = QVariant() )
const;
142 QVariantMap config()
const;
172 virtual bool valid()
const = 0;
208 void notifyAboutToSave();
217 void contextChanged();
232 virtual QWidget *createWidget( QWidget *parent ) = 0;
239 virtual void initWidget( QWidget *editor );
252 virtual void setFeature(
const QgsFeature &feature ) = 0;
260 virtual void setEnabled(
bool enabled );
270 virtual void aboutToSave();
274 QWidget *mWidget =
nullptr;
275 QWidget *mParent =
nullptr;
283 #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(QgsMeshTimeSettings)
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.