16 #ifndef QGSATTRIBUTEFORM_H 17 #define QGSATTRIBUTEFORM_H 27 #include <QDialogButtonBox> 99 void disconnectButtonBox();
151 bool eventFilter( QObject *
object, QEvent *event )
override;
175 QString aggregateFilter()
const;
187 Q_DECL_DEPRECATED
void attributeChanged(
const QString &attribute,
const QVariant &value )
SIP_DEPRECATED;
197 void widgetValueChanged(
const QString &attribute,
const QVariant &value,
bool attributeChanged );
207 void beforeSave(
bool &ok )
SIP_SKIP;
212 void featureSaved(
const QgsFeature &feature );
238 void zoomToFeatures(
const QString &filter );
244 void flashFeatures(
const QString &filter );
255 void changeAttribute(
const QString &field,
const QVariant &value,
const QString &hintText = QString() );
285 void refreshFeature();
288 void onAttributeChanged(
const QVariant &value );
289 void onAttributeAdded(
int idx );
290 void onAttributeDeleted(
int idx );
291 void onUpdatedFields();
292 void onConstraintStatusChanged(
const QString &constraint,
294 void preventFeatureRefresh();
295 void synchronizeEnabledState();
296 void layerSelectionChanged();
299 bool saveMultiEdits();
300 void resetMultiEdit(
bool promptToSave =
false );
301 void multiEditMessageClicked(
const QString &link );
303 void filterAndTriggered();
304 void filterOrTriggered();
305 void filterTriggered();
309 void searchSetSelection();
310 void searchAddToSelection();
311 void searchRemoveFromSelection();
312 void searchIntersectSelection();
323 bool fieldIsEditable(
int fieldIndex )
const;
329 QWidget *widget =
nullptr;
333 bool labelOnTop =
false;
334 bool labelAlignRight =
false;
335 bool showLabel =
true;
346 void createWrappers();
347 void afterWidgetInit();
349 void scanForEqualAttributes(
QgsFeatureIterator &fit, QSet< int > &mixedValueFields, QHash< int, QVariant > &fieldSharedValues )
const;
354 int messageTimeout();
355 void clearMultiEditMessages();
356 void pushSelectedFeaturesMessage();
359 QString createFilterExpression()
const;
362 void updateAllConstraints();
364 void updateContainersVisibility();
366 bool currentFormFeature(
QgsFeature &feature );
367 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.