18 #ifndef QGSEDITFORMCONFIG_H
19 #define QGSEDITFORMCONFIG_H
21 #include "qgis_core.h"
24 #include <QDomElement>
25 #include <QDomDocument>
31 class QgsEditFormConfigPrivate;
53 Q_ENUM( EditorLayout )
59 GroupData(
const QString &name,
const QList<QString> &fields )
71 TabData(
const QString &name,
const QList<QString> &fields,
const QList<QgsEditFormConfig::GroupData> &groups )
78 QList<QgsEditFormConfig::GroupData>
mGroups;
90 Q_ENUM( FeatureFormSuppress )
100 CodeSourceEnvironment = 3
102 Q_ENUM( PythonInitCodeSource )
140 QList< QgsAttributeEditorElement * > tabs()
const;
155 EditorLayout layout()
const;
158 void setLayout( EditorLayout editorLayout );
163 QString uiForm()
const;
173 void setUiForm(
const QString &ui );
193 bool setWidgetConfig(
const QString &widgetName,
const QVariantMap &config );
202 QVariantMap widgetConfig(
const QString &widgetName )
const;
211 bool removeWidgetConfig(
const QString &widgetName );
217 bool readOnly(
int idx )
const;
222 void setReadOnly(
int idx,
bool readOnly =
true );
229 bool labelOnTop(
int idx )
const;
237 void setLabelOnTop(
int idx,
bool onTop );
246 bool reuseLastValue(
int index )
const;
255 void setReuseLastValue(
int index,
bool reuse );
265 QString initFunction()
const;
273 void setInitFunction(
const QString &
function );
278 QString initCode()
const;
285 void setInitCode(
const QString &code );
290 QString initFilePath()
const;
297 void setInitFilePath(
const QString &filePath );
304 PythonInitCodeSource initCodeSource()
const;
307 void setInitCodeSource( PythonInitCodeSource initCodeSource );
310 FeatureFormSuppress suppress()
const;
312 void setSuppress( FeatureFormSuppress s );
343 void setDataDefinedFieldProperties( const QString &fieldName, const
QgsPropertyCollection &properties );
364 void setFields( const
QgsFields &fields );
369 void onRelationsLoaded();
375 bool legacyUpdateRelationWidgetInTabs(
QgsAttributeEditorContainer *container, const QString &widgetName, const QVariantMap &config );
378 void fixLegacyConfig( QDomElement &el );
380 QExplicitlySharedDataPointer<QgsEditFormConfigPrivate> d;
385 #endif // QGSEDITFORMCONFIG_H