16 #ifndef QGSATTRIBUTEFORM_H 17 #define QGSATTRIBUTEFORM_H 27 #include <QDialogButtonBox> 96 void disconnectButtonBox();
131 void setMode(
Mode mode );
148 bool eventFilter( QObject *
object, QEvent *event )
override;
172 QString aggregateFilter()
const;
183 Q_DECL_DEPRECATED
void attributeChanged(
const QString &attribute,
const QVariant &value );
193 void widgetValueChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
203 void beforeSave(
bool &ok )
SIP_SKIP;
208 void featureSaved(
const QgsFeature &feature );
234 void zoomToFeatures(
const QString &filter );
240 void flashFeatures(
const QString &filter );
251 void changeAttribute(
const QString &field,
const QVariant &value,
const QString &hintText = QString() );
281 void refreshFeature();
284 void onAttributeChanged(
const QVariant &value );
285 void onAttributeAdded(
int idx );
286 void onAttributeDeleted(
int idx );
287 void onUpdatedFields();
288 void onConstraintStatusChanged(
const QString &constraint,
290 void preventFeatureRefresh();
291 void synchronizeEnabledState();
292 void layerSelectionChanged();
295 bool saveMultiEdits();
296 void resetMultiEdit(
bool promptToSave =
false );
297 void multiEditMessageClicked(
const QString &link );
299 void filterAndTriggered();
300 void filterOrTriggered();
301 void filterTriggered();
305 void searchSetSelection();
306 void searchAddToSelection();
307 void searchRemoveFromSelection();
308 void searchIntersectSelection();
319 bool fieldIsEditable(
int fieldIndex )
const;
325 QWidget *widget =
nullptr;
328 bool labelOnTop =
false;
329 bool labelAlignRight =
false;
330 bool showLabel =
true;
341 void createWrappers();
342 void afterWidgetInit();
344 void scanForEqualAttributes(
QgsFeatureIterator &fit, QSet< int > &mixedValueFields, QHash< int, QVariant > &fieldSharedValues )
const;
349 int messageTimeout();
350 void clearMultiEditMessages();
351 void pushSelectedFeaturesMessage();
354 QString createFilterExpression()
const;
357 void updateAllConstraints();
360 bool currentFormFeature(
QgsFeature &feature );
361 bool currentFormValidConstraints( QStringList &invalidFields, QStringList &descriptions );
367 bool mOwnsMessageBar;
370 QList<QgsWidgetWrapper *> mWidgets;
372 QDialogButtonBox *mButtonBox =
nullptr;
373 QWidget *mSearchButtonBox =
nullptr;
374 QList<QgsAttributeFormInterface *> mInterfaces;
375 QMap< int, QgsAttributeFormEditorWidget * > mFormEditorWidgets;
376 QList< QgsAttributeFormWidget *> mFormWidgets;
378 QMap<const QgsVectorLayerJoinInfo *, QgsFeature> mJoinedFeatures;
379 bool mValuesInitialized =
false;
381 bool mIsSettingFeature =
false;
383 struct ContainerInformation
385 ContainerInformation(
QgsTabWidget *tabWidget, QWidget *widget,
const QgsExpression &expression )
386 : tabWidget( tabWidget )
388 , expression( expression )
392 ContainerInformation( QWidget *widget,
const QgsExpression &expression )
394 , expression( expression )
399 QWidget *widget =
nullptr;
400 QgsExpression expression;
406 void registerContainerInformation( ContainerInformation *info );
410 void reloadIcon(
const QString &file,
const QString &tooltip, QSvgWidget *sw );
413 QVector<ContainerInformation *> mContainerVisibilityInformation;
414 QMap<QString, QVector<ContainerInformation *> > mContainerInformationDependency;
417 static int sFormCounter;
419 QString mPyFormVarName;
425 bool mPreventFeatureRefresh;
427 bool mIsSettingMultiEditFeatures;
430 bool mUnsavedMultiEditChanges;
432 QString mEditCommandMessage;
436 QMap<QWidget *, QSvgWidget *> mIconMap;
438 friend class TestQgsDualView;
439 friend class TestQgsAttributeForm;
442 #endif // QGSATTRIBUTEFORM_H
Wrapper for iterator of features from vector data provider or vector layer.
This is an abstract base class for any elements of a drag and drop form.
QSet< QgsFeatureId > QgsFeatureIds
This class contains context information for attribute editor widgets.
A bar for displaying non-blocking messages to the user.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
SelectBehavior
Selection behavior.
Represents a vector layer which manages a vector based data sets.