18 #ifndef QGSEDITFORMCONFIG_H
19 #define QGSEDITFORMCONFIG_H
21 #include "qgis_core.h"
24 #include <QDomElement>
25 #include <QDomDocument>
31 class QgsEditFormConfigPrivate;
51 Q_ENUM( EditorLayout )
57 GroupData(
const QString &name,
const QList<QString> &fields )
69 TabData(
const QString &name,
const QList<QString> &fields,
const QList<QgsEditFormConfig::GroupData> &groups )
76 QList<QgsEditFormConfig::GroupData>
mGroups;
88 Q_ENUM( FeatureFormSuppress )
98 CodeSourceEnvironment = 3
100 Q_ENUM( PythonInitCodeSource )
138 QList< QgsAttributeEditorElement * > tabs()
const;
153 EditorLayout layout()
const;
156 void setLayout( EditorLayout editorLayout );
161 QString uiForm()
const;
171 void setUiForm(
const QString &ui );
191 bool setWidgetConfig(
const QString &widgetName,
const QVariantMap &config );
200 QVariantMap widgetConfig(
const QString &widgetName )
const;
209 bool removeWidgetConfig(
const QString &widgetName );
215 bool readOnly(
int idx )
const;
220 void setReadOnly(
int idx,
bool readOnly =
true );
227 bool labelOnTop(
int idx )
const;
235 void setLabelOnTop(
int idx,
bool onTop );
246 QString initFunction()
const;
254 void setInitFunction(
const QString &
function );
259 QString initCode()
const;
266 void setInitCode(
const QString &code );
271 QString initFilePath()
const;
278 void setInitFilePath(
const QString &filePath );
285 PythonInitCodeSource initCodeSource()
const;
288 void setInitCodeSource( PythonInitCodeSource initCodeSource );
291 FeatureFormSuppress suppress()
const;
293 void setSuppress( FeatureFormSuppress s );
323 void setDataDefinedFieldProperties(
const QString &fieldName,
const QgsPropertyCollection &properties );
344 void setFields(
const QgsFields &fields );
349 void onRelationsLoaded();
352 QExplicitlySharedDataPointer<QgsEditFormConfigPrivate> d;
357 #endif // QGSEDITFORMCONFIG_H