16 #ifndef QGSATTRIBUTEFORM_H 17 #define QGSATTRIBUTEFORM_H 27 #include <QDialogButtonBox> 100 void disconnectButtonBox();
152 bool eventFilter( QObject *
object, QEvent *event )
override;
176 QString aggregateFilter()
const;
188 Q_DECL_DEPRECATED
void attributeChanged(
const QString &attribute,
const QVariant &value )
SIP_DEPRECATED;
198 void widgetValueChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
208 void beforeSave(
bool &ok )
SIP_SKIP;
213 void featureSaved(
const QgsFeature &feature );
239 void zoomToFeatures(
const QString &filter );
245 void flashFeatures(
const QString &filter );
256 void changeAttribute(
const QString &field,
const QVariant &value,
const QString &hintText = QString() );
286 void refreshFeature();
289 void onAttributeChanged(
const QVariant &value );
290 void onAttributeAdded(
int idx );
291 void onAttributeDeleted(
int idx );
292 void onUpdatedFields();
293 void onConstraintStatusChanged(
const QString &constraint,
295 void preventFeatureRefresh();
296 void synchronizeEnabledState();
297 void layerSelectionChanged();
300 bool saveMultiEdits();
301 void resetMultiEdit(
bool promptToSave =
false );
302 void multiEditMessageClicked(
const QString &link );
304 void filterAndTriggered();
305 void filterOrTriggered();
306 void filterTriggered();
310 void searchSetSelection();
311 void searchAddToSelection();
312 void searchRemoveFromSelection();
313 void searchIntersectSelection();
324 bool fieldIsEditable(
int fieldIndex )
const;
330 QWidget *widget =
nullptr;
334 bool labelOnTop =
false;
335 bool labelAlignRight =
false;
336 bool showLabel =
true;
347 void createWrappers();
348 void afterWidgetInit();
350 void scanForEqualAttributes(
QgsFeatureIterator &fit, QSet< int > &mixedValueFields, QHash< int, QVariant > &fieldSharedValues )
const;
355 int messageTimeout();
356 void clearMultiEditMessages();
357 void pushSelectedFeaturesMessage();
360 QString createFilterExpression()
const;
363 void updateAllConstraints();
365 void updateContainersVisibility();
367 bool currentFormFeature(
QgsFeature &feature );
368 bool currentFormValidConstraints( QStringList &invalidFields, QStringList &descriptions );
376 bool mOwnsMessageBar;
379 QList<QgsWidgetWrapper *> mWidgets;
381 QDialogButtonBox *mButtonBox =
nullptr;
382 QWidget *mSearchButtonBox =
nullptr;
383 QList<QgsAttributeFormInterface *> mInterfaces;
384 QMap< int, QgsAttributeFormEditorWidget * > mFormEditorWidgets;
385 QList< QgsAttributeFormWidget *> mFormWidgets;
387 QMap<const QgsVectorLayerJoinInfo *, QgsFeature> mJoinedFeatures;
388 bool mValuesInitialized =
false;
390 bool mIsSettingFeature =
false;
392 struct ContainerInformation
395 : tabWidget( tabWidget )
397 , expression( expression )
401 ContainerInformation( QWidget *widget,
const QgsExpression &expression )
403 , expression( expression )
408 QWidget *widget =
nullptr;
415 void registerContainerInformation( ContainerInformation *info );
419 void reloadIcon(
const QString &file,
const QString &tooltip, QSvgWidget *sw );
422 QVector<ContainerInformation *> mContainerVisibilityInformation;
423 QMap<QString, QVector<ContainerInformation *> > mContainerInformationDependency;
426 static int sFormCounter;
428 QString mPyFormVarName;
434 bool mPreventFeatureRefresh;
436 bool mIsSettingMultiEditFeatures;
439 bool mUnsavedMultiEditChanges;
441 QString mEditCommandMessage;
445 QMap<QWidget *, QSvgWidget *> mIconMap;
447 friend class TestQgsDualView;
448 friend class TestQgsAttributeForm;
451 #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.
QSet< QgsFeatureId > QgsFeatureIds
This is an abstract base class for any elements of a drag and drop form.
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.