QGIS API Documentation
3.0.2-Girona (307d082)
src
gui
qgsattributeformrelationeditorwidget.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsattributeformrelationeditorwidget.cpp
3
--------------------------------------
4
Date : Nov 2017
5
Copyright : (C) 2017 Matthias Kuhn
6
Email :
[email protected]
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
16
#include "
qgsattributeformrelationeditorwidget.h
"
17
#include "
qgsrelationaggregatesearchwidgetwrapper.h
"
18
#include "
qgsattributeform.h
"
19
20
#include "
qgsrelationwidgetwrapper.h
"
21
22
QgsAttributeFormRelationEditorWidget::QgsAttributeFormRelationEditorWidget
(
QgsRelationWidgetWrapper
*wrapper,
QgsAttributeForm
*form )
23
:
QgsAttributeFormWidget
( wrapper, form )
24
, mWrapper( wrapper )
25
{
26
setSearchWidgetToolButtonVisible
(
false
);
27
}
28
29
void
QgsAttributeFormRelationEditorWidget::createSearchWidgetWrappers
(
const
QgsAttributeEditorContext
&context )
30
{
31
Q_UNUSED( context )
32
mSearchWidget =
new
QgsRelationAggregateSearchWidgetWrapper
(
layer
(), mWrapper,
form
() );
33
34
setSearchWidgetWrapper
( mSearchWidget );
35
}
36
37
QString
QgsAttributeFormRelationEditorWidget::currentFilterExpression
()
const
38
{
39
return
mSearchWidget->
expression
();
40
}
QgsRelationAggregateSearchWidgetWrapper::expression
QString expression() const override
Will be used to access the widget's value.
Definition:
qgsrelationaggregatesearchwidgetwrapper.cpp:33
QgsAttributeFormRelationEditorWidget::currentFilterExpression
QString currentFilterExpression() const override
Creates an expression matching the current search filter value and search properties represented in t...
Definition:
qgsattributeformrelationeditorwidget.cpp:37
QgsRelationAggregateSearchWidgetWrapper
Search widget for the children of a relation.
Definition:
qgsrelationaggregatesearchwidgetwrapper.h:35
QgsAttributeFormWidget
Base class for all widgets shown on a QgsAttributeForm.
Definition:
qgsattributeformwidget.h:38
QgsAttributeEditorContext
This class contains context information for attribute editor widgets.
Definition:
qgsattributeeditorcontext.h:35
qgsrelationwidgetwrapper.h
QgsAttributeFormRelationEditorWidget::createSearchWidgetWrappers
void createSearchWidgetWrappers(const QgsAttributeEditorContext &context=QgsAttributeEditorContext()) override
Creates the search widget wrappers for the widget used when the form is in search mode...
Definition:
qgsattributeformrelationeditorwidget.cpp:29
QgsAttributeFormWidget::setSearchWidgetWrapper
void setSearchWidgetWrapper(QgsSearchWidgetWrapper *wrapper)
Sets the search widget wrapper for the widget used when the form is in search mode.
Definition:
qgsattributeformwidget.cpp:87
QgsRelationWidgetWrapper
Definition:
qgsrelationwidgetwrapper.h:31
QgsAttributeForm
Definition:
qgsattributeform.h:43
QgsAttributeFormWidget::setSearchWidgetToolButtonVisible
void setSearchWidgetToolButtonVisible(bool searchWidgetToolButtonVisible)
The visibility of the search widget tool button, that allows (de)activating this search widgte or def...
Definition:
qgsattributeformwidget.cpp:195
QgsAttributeFormWidget::layer
QgsVectorLayer * layer()
The layer for which this widget and its form is shown.
Definition:
qgsattributeformwidget.cpp:147
qgsattributeform.h
qgsrelationaggregatesearchwidgetwrapper.h
QgsAttributeFormRelationEditorWidget::QgsAttributeFormRelationEditorWidget
QgsAttributeFormRelationEditorWidget(QgsRelationWidgetWrapper *wrapper, QgsAttributeForm *form)
Constructor.
Definition:
qgsattributeformrelationeditorwidget.cpp:22
qgsattributeformrelationeditorwidget.h
QgsAttributeFormWidget::form
QgsAttributeForm * form() const
The form on which this widget is shown.
Definition:
qgsattributeformwidget.cpp:77
Generated on Sat Apr 21 2018 11:45:00 for QGIS API Documentation by
1.8.13