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;
116 T *
widget() {
return dynamic_cast<T
>( mWidget ); }
123 void setConfig(
const QVariantMap &config );
140 QVariant config(
const QString &key,
const QVariant &defaultVal = QVariant() )
const;
145 QVariantMap config()
const;
175 virtual bool valid()
const = 0;
211 void notifyAboutToSave();
220 void contextChanged();
235 virtual QWidget *createWidget( QWidget *parent ) = 0;
242 virtual void initWidget( QWidget *editor );
255 virtual void setFeature(
const QgsFeature &feature ) = 0;
263 virtual void setEnabled(
bool enabled );
273 virtual void aboutToSave();
277 QWidget *mWidget =
nullptr;
278 QWidget *mParent =
nullptr;
286 #endif // QGSWIDGETWRAPPER_H