QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsattributeformrelationeditorwidget.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsattributeformrelationeditorwidget.cpp
3 --------------------------------------
4 Date : Nov 2017
5 Copyright : (C) 2017 Matthias Kuhn
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
17
18#include "qgsattributeform.h"
21
22#include "moc_qgsattributeformrelationeditorwidget.cpp"
23
30
32{
33 if ( !context.parentContext() )
34 {
35 mSearchWidget = new QgsRelationAggregateSearchWidgetWrapper( layer(), mWrapper, form() );
36 mSearchWidget->setContext( context );
37
38 setSearchWidgetWrapper( mSearchWidget );
39 }
40}
41
43{
44 QString filterExpression;
45 if ( mSearchWidget )
46 filterExpression = mSearchWidget->expression();
47
48 return filterExpression;
49}
50
52{
53 mWrapper->setMultiEditFeatureIds( fids );
54}
Contains context information for attribute editor widgets.
const QgsAttributeEditorContext * parentContext() const
void setMultiEditFeatureIds(const QgsFeatureIds &fids)
Set multiple feature to edit simultaneously.
QString currentFilterExpression() const override
Creates an expression matching the current search filter value and search properties represented in t...
void createSearchWidgetWrappers(const QgsAttributeEditorContext &context=QgsAttributeEditorContext()) override
Creates the search widget wrappers for the widget used when the form is in search mode.
QgsAttributeFormRelationEditorWidget(QgsRelationWidgetWrapper *wrapper, QgsAttributeForm *form)
Constructor.
void setSearchWidgetWrapper(QgsSearchWidgetWrapper *wrapper)
Sets the search widget wrapper for the widget used when the form is in search mode.
QgsAttributeForm * form() const
The form on which this widget is shown.
QgsVectorLayer * layer()
The layer for which this widget and its form is shown.
QgsAttributeFormWidget(QgsWidgetWrapper *widget, QgsAttributeForm *form)
A new form widget for the wrapper widget on form.
void setSearchWidgetToolButtonVisible(bool searchWidgetToolButtonVisible)
The visibility of the search widget tool button, that allows (de)activating this search widgte or def...
The attribute form widget for vector layer features.
Search widget for the children of a relation.
A widget wrapper for relation widgets.
QSet< QgsFeatureId > QgsFeatureIds