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;
184 Q_DECL_DEPRECATED
void attributeChanged(
const QString &attribute,
const QVariant &value )
SIP_DEPRECATED;
194 void widgetValueChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
204 void beforeSave(
bool &ok )
SIP_SKIP;
209 void featureSaved(
const QgsFeature &feature );
235 void zoomToFeatures(
const QString &filter );
241 void flashFeatures(
const QString &filter );
252 void changeAttribute(
const QString &field,
const QVariant &value,
const QString &hintText = QString() );
282 void refreshFeature();
285 void onAttributeChanged(
const QVariant &value );
286 void onAttributeAdded(
int idx );
287 void onAttributeDeleted(
int idx );
288 void onUpdatedFields();
289 void onConstraintStatusChanged(
const QString &constraint,
291 void preventFeatureRefresh();
292 void synchronizeEnabledState();
293 void layerSelectionChanged();
296 bool saveMultiEdits();
297 void resetMultiEdit(
bool promptToSave =
false );
298 void multiEditMessageClicked(
const QString &link );
300 void filterAndTriggered();
301 void filterOrTriggered();
302 void filterTriggered();
306 void searchSetSelection();
307 void searchAddToSelection();
308 void searchRemoveFromSelection();
309 void searchIntersectSelection();
320 bool fieldIsEditable(
int fieldIndex )
const;
326 QWidget *widget =
nullptr;
329 bool labelOnTop =
false;
330 bool labelAlignRight =
false;
331 bool showLabel =
true;
342 void createWrappers();
343 void afterWidgetInit();
345 void scanForEqualAttributes(
QgsFeatureIterator &fit, QSet< int > &mixedValueFields, QHash< int, QVariant > &fieldSharedValues )
const;
350 int messageTimeout();
351 void clearMultiEditMessages();
352 void pushSelectedFeaturesMessage();
355 QString createFilterExpression()
const;
358 void updateAllConstraints();
361 bool currentFormFeature(
QgsFeature &feature );
362 bool currentFormValidConstraints( QStringList &invalidFields, QStringList &descriptions );
368 bool mOwnsMessageBar;
371 QList<QgsWidgetWrapper *> mWidgets;
373 QDialogButtonBox *mButtonBox =
nullptr;
374 QWidget *mSearchButtonBox =
nullptr;
375 QList<QgsAttributeFormInterface *> mInterfaces;
376 QMap< int, QgsAttributeFormEditorWidget * > mFormEditorWidgets;
377 QList< QgsAttributeFormWidget *> mFormWidgets;
379 QMap<const QgsVectorLayerJoinInfo *, QgsFeature> mJoinedFeatures;
380 bool mValuesInitialized =
false;
382 bool mIsSettingFeature =
false;
384 struct ContainerInformation
387 : tabWidget( tabWidget )
389 , expression( expression )
393 ContainerInformation( QWidget *widget,
const QgsExpression &expression )
395 , expression( expression )
400 QWidget *widget =
nullptr;
407 void registerContainerInformation( ContainerInformation *info );
411 void reloadIcon(
const QString &file,
const QString &tooltip, QSvgWidget *sw );
414 QVector<ContainerInformation *> mContainerVisibilityInformation;
415 QMap<QString, QVector<ContainerInformation *> > mContainerInformationDependency;
418 static int sFormCounter;
420 QString mPyFormVarName;
426 bool mPreventFeatureRefresh;
428 bool mIsSettingMultiEditFeatures;
431 bool mUnsavedMultiEditChanges;
433 QString mEditCommandMessage;
437 QMap<QWidget *, QSvgWidget *> mIconMap;
439 friend class TestQgsDualView;
440 friend class TestQgsAttributeForm;
443 #endif // QGSATTRIBUTEFORM_H
Class for parsing and evaluation of expressions (formerly called "search strings").
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.