16 #ifndef QGSATTRIBUTEFORM_H 17 #define QGSATTRIBUTEFORM_H 27 #include <QDialogButtonBox> 84 void displayWarning(
const QString &message );
100 void showButtonBox();
108 void disconnectButtonBox();
160 bool eventFilter( QObject *
object, QEvent *event )
override;
184 QString aggregateFilter()
const;
196 Q_DECL_DEPRECATED
void attributeChanged(
const QString &attribute,
const QVariant &value )
SIP_DEPRECATED;
206 void widgetValueChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
216 void beforeSave(
bool &ok )
SIP_SKIP;
221 void featureSaved(
const QgsFeature &feature );
247 void zoomToFeatures(
const QString &filter );
253 void flashFeatures(
const QString &filter );
264 void changeAttribute(
const QString &field,
const QVariant &value,
const QString &hintText = QString() );
294 void refreshFeature();
297 void onAttributeChanged(
const QVariant &value,
const QVariantList &additionalFieldValues );
298 void onAttributeAdded(
int idx );
299 void onAttributeDeleted(
int idx );
300 void onUpdatedFields();
301 void onConstraintStatusChanged(
const QString &constraint,
303 void preventFeatureRefresh();
304 void synchronizeEnabledState();
305 void layerSelectionChanged();
308 bool saveMultiEdits();
309 void resetMultiEdit(
bool promptToSave =
false );
310 void multiEditMessageClicked(
const QString &link );
312 void filterAndTriggered();
313 void filterOrTriggered();
314 void filterTriggered();
318 void searchSetSelection();
319 void searchAddToSelection();
320 void searchRemoveFromSelection();
321 void searchIntersectSelection();
332 bool fieldIsEditable(
int fieldIndex )
const;
336 void updateDefaultValueDependencies();
340 QWidget *widget =
nullptr;
344 bool labelOnTop =
false;
345 bool labelAlignRight =
false;
346 bool showLabel =
true;
357 void createWrappers();
358 void afterWidgetInit();
360 void scanForEqualAttributes(
QgsFeatureIterator &fit, QSet< int > &mixedValueFields, QHash< int, QVariant > &fieldSharedValues )
const;
366 void createDefaultValueDependencies();
369 bool updateDefaultValues(
const int originIdx );
371 int messageTimeout();
372 void clearMultiEditMessages();
373 void pushSelectedFeaturesMessage();
376 QString createFilterExpression()
const;
379 void updateAllConstraints();
381 void updateContainersVisibility();
383 bool currentFormFeature(
QgsFeature &feature );
384 bool currentFormValidConstraints( QStringList &invalidFields, QStringList &descriptions );
392 bool mOwnsMessageBar;
395 QList<QgsWidgetWrapper *> mWidgets;
397 QDialogButtonBox *mButtonBox =
nullptr;
398 QWidget *mSearchButtonBox =
nullptr;
399 QList<QgsAttributeFormInterface *> mInterfaces;
400 QMap< int, QgsAttributeFormEditorWidget * > mFormEditorWidgets;
401 QList< QgsAttributeFormWidget *> mFormWidgets;
403 QMap<const QgsVectorLayerJoinInfo *, QgsFeature> mJoinedFeatures;
404 bool mValuesInitialized =
false;
406 bool mIsSettingFeature =
false;
408 struct ContainerInformation
411 : tabWidget( tabWidget )
413 , expression( expression )
417 ContainerInformation( QWidget *widget,
const QgsExpression &expression )
419 , expression( expression )
424 QWidget *widget =
nullptr;
431 void registerContainerInformation( ContainerInformation *info );
435 void reloadIcon(
const QString &file,
const QString &tooltip, QSvgWidget *sw );
438 QVector<ContainerInformation *> mContainerVisibilityInformation;
439 QMap<QString, QVector<ContainerInformation *> > mContainerInformationDependency;
442 static int sFormCounter;
444 QString mPyFormVarName;
450 bool mPreventFeatureRefresh;
452 bool mIsSettingMultiEditFeatures;
455 bool mUnsavedMultiEditChanges;
457 QString mEditCommandMessage;
461 QMap<QWidget *, QSvgWidget *> mIconMap;
467 QMap<int, QgsWidgetWrapper *> mDefaultValueDependencies;
470 QList<int> mAlreadyUpdatedFields;
472 friend class TestQgsDualView;
473 friend class TestQgsAttributeForm;
476 #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.