16 #ifndef QGSATTRIBUTEFORM_H 17 #define QGSATTRIBUTEFORM_H 27 #include <QDialogButtonBox> 97 void disconnectButtonBox();
149 bool eventFilter( QObject *
object, QEvent *event )
override;
173 QString aggregateFilter()
const;
185 Q_DECL_DEPRECATED
void attributeChanged(
const QString &attribute,
const QVariant &value )
SIP_DEPRECATED;
195 void widgetValueChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
205 void beforeSave(
bool &ok )
SIP_SKIP;
210 void featureSaved(
const QgsFeature &feature );
236 void zoomToFeatures(
const QString &filter );
242 void flashFeatures(
const QString &filter );
253 void changeAttribute(
const QString &field,
const QVariant &value,
const QString &hintText = QString() );
283 void refreshFeature();
286 void onAttributeChanged(
const QVariant &value );
287 void onAttributeAdded(
int idx );
288 void onAttributeDeleted(
int idx );
289 void onUpdatedFields();
290 void onConstraintStatusChanged(
const QString &constraint,
292 void preventFeatureRefresh();
293 void synchronizeEnabledState();
294 void layerSelectionChanged();
297 bool saveMultiEdits();
298 void resetMultiEdit(
bool promptToSave =
false );
299 void multiEditMessageClicked(
const QString &link );
301 void filterAndTriggered();
302 void filterOrTriggered();
303 void filterTriggered();
307 void searchSetSelection();
308 void searchAddToSelection();
309 void searchRemoveFromSelection();
310 void searchIntersectSelection();
321 bool fieldIsEditable(
int fieldIndex )
const;
327 QWidget *widget =
nullptr;
331 bool labelOnTop =
false;
332 bool labelAlignRight =
false;
333 bool showLabel =
true;
344 void createWrappers();
345 void afterWidgetInit();
347 void scanForEqualAttributes(
QgsFeatureIterator &fit, QSet< int > &mixedValueFields, QHash< int, QVariant > &fieldSharedValues )
const;
352 int messageTimeout();
353 void clearMultiEditMessages();
354 void pushSelectedFeaturesMessage();
357 QString createFilterExpression()
const;
360 void updateAllConstraints();
362 void updateContainersVisibility();
364 bool currentFormFeature(
QgsFeature &feature );
365 bool currentFormValidConstraints( QStringList &invalidFields, QStringList &descriptions );
373 bool mOwnsMessageBar;
376 QList<QgsWidgetWrapper *> mWidgets;
378 QDialogButtonBox *mButtonBox =
nullptr;
379 QWidget *mSearchButtonBox =
nullptr;
380 QList<QgsAttributeFormInterface *> mInterfaces;
381 QMap< int, QgsAttributeFormEditorWidget * > mFormEditorWidgets;
382 QList< QgsAttributeFormWidget *> mFormWidgets;
384 QMap<const QgsVectorLayerJoinInfo *, QgsFeature> mJoinedFeatures;
385 bool mValuesInitialized =
false;
387 bool mIsSettingFeature =
false;
389 struct ContainerInformation
392 : tabWidget( tabWidget )
394 , expression( expression )
398 ContainerInformation( QWidget *widget,
const QgsExpression &expression )
400 , expression( expression )
405 QWidget *widget =
nullptr;
412 void registerContainerInformation( ContainerInformation *info );
416 void reloadIcon(
const QString &file,
const QString &tooltip, QSvgWidget *sw );
419 QVector<ContainerInformation *> mContainerVisibilityInformation;
420 QMap<QString, QVector<ContainerInformation *> > mContainerInformationDependency;
423 static int sFormCounter;
425 QString mPyFormVarName;
431 bool mPreventFeatureRefresh;
433 bool mIsSettingMultiEditFeatures;
436 bool mUnsavedMultiEditChanges;
438 QString mEditCommandMessage;
442 QMap<QWidget *, QSvgWidget *> mIconMap;
444 friend class TestQgsDualView;
445 friend class TestQgsAttributeForm;
448 #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.