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,
const QVariantList &additionalFieldValues );
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;
356 void createDefaultValueDependencies();
359 bool updateDefaultValues(
const int originIdx );
361 int messageTimeout();
362 void clearMultiEditMessages();
363 void pushSelectedFeaturesMessage();
366 QString createFilterExpression()
const;
369 void updateAllConstraints();
371 void updateContainersVisibility();
373 bool currentFormFeature(
QgsFeature &feature );
374 bool currentFormValidConstraints( QStringList &invalidFields, QStringList &descriptions );
382 bool mOwnsMessageBar;
385 QList<QgsWidgetWrapper *> mWidgets;
387 QDialogButtonBox *mButtonBox =
nullptr;
388 QWidget *mSearchButtonBox =
nullptr;
389 QList<QgsAttributeFormInterface *> mInterfaces;
390 QMap< int, QgsAttributeFormEditorWidget * > mFormEditorWidgets;
391 QList< QgsAttributeFormWidget *> mFormWidgets;
393 QMap<const QgsVectorLayerJoinInfo *, QgsFeature> mJoinedFeatures;
394 bool mValuesInitialized =
false;
396 bool mIsSettingFeature =
false;
398 struct ContainerInformation
401 : tabWidget( tabWidget )
403 , expression( expression )
407 ContainerInformation( QWidget *widget,
const QgsExpression &expression )
409 , expression( expression )
414 QWidget *widget =
nullptr;
421 void registerContainerInformation( ContainerInformation *info );
425 void reloadIcon(
const QString &file,
const QString &tooltip, QSvgWidget *sw );
428 QVector<ContainerInformation *> mContainerVisibilityInformation;
429 QMap<QString, QVector<ContainerInformation *> > mContainerInformationDependency;
432 static int sFormCounter;
434 QString mPyFormVarName;
440 bool mPreventFeatureRefresh;
442 bool mIsSettingMultiEditFeatures;
445 bool mUnsavedMultiEditChanges;
447 QString mEditCommandMessage;
451 QMap<QWidget *, QSvgWidget *> mIconMap;
457 QMap<int, QgsWidgetWrapper *> mDefaultValueDependencies;
460 QList<int> mAlreadyUpdatedFields;
462 friend class TestQgsDualView;
463 friend class TestQgsAttributeForm;
466 #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.