Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Search widget for relations using aggregates
For each child relations, the subform is visible. Each attribute of the children has a tool button option to define to which aggregate the specified value should be compared. This allows for searching things like * Each city where the highest building is more than 300 m * Each sensor where the median value is lower than 50 ppm * Each feature with a child with a missing value * ...
- Loading branch information
Showing
35 changed files
with
1,246 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
python/gui/editorwidgets/qgsrelationaggregatesearchwidgetwrapper.sip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/editorwidgets/qgsrelationaggregatesearchwidgetwrapper.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class QgsRelationAggregateSearchWidgetWrapper : QgsSearchWidgetWrapper | ||
{ | ||
%Docstring | ||
************************************************************************* | ||
qgsrelationaggregatesearchwidget.h | ||
----------------------------- | ||
Date : Nov 2017 | ||
Copyright : (C) 2017 Matthias Kuhn | ||
Email : matthias@opengis.ch | ||
************************************************************************** | ||
* | ||
This program is free software; you can redistribute it and/or modify * | ||
it under the terms of the GNU General Public License as published by * | ||
the Free Software Foundation; either version 2 of the License, or * | ||
(at your option) any later version. * | ||
* | ||
************************************************************************** | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsrelationaggregatesearchwidgetwrapper.h" | ||
%End | ||
public: | ||
explicit QgsRelationAggregateSearchWidgetWrapper( QgsVectorLayer *vl, QgsRelationWidgetWrapper *wrapper, QWidget *parent /TransferThis/ = 0 ); | ||
|
||
virtual QString expression() const; | ||
|
||
virtual bool valid() const; | ||
virtual QWidget *createWidget( QWidget *parent ); | ||
virtual bool applyDirectly(); | ||
virtual void setExpression( const QString &value ); | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/editorwidgets/qgsrelationaggregatesearchwidgetwrapper.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsaggregatetoolbutton.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsAggregateToolButton : QToolButton | ||
{ | ||
%Docstring | ||
************************************************************************* | ||
qgsaggregatetoolbutton.h | ||
-------------------------------------- | ||
Date : Nov 2017 | ||
Copyright : (C) 2017 Matthias Kuhn | ||
Email : matthias@opengis.ch | ||
************************************************************************** | ||
* | ||
This program is free software; you can redistribute it and/or modify * | ||
it under the terms of the GNU General Public License as published by * | ||
the Free Software Foundation; either version 2 of the License, or * | ||
(at your option) any later version. * | ||
* | ||
************************************************************************** | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsaggregatetoolbutton.h" | ||
%End | ||
public: | ||
QgsAggregateToolButton(); | ||
|
||
void setType( QVariant::Type type ); | ||
|
||
QVariant::Type type() const; | ||
%Docstring | ||
:rtype: QVariant.Type | ||
%End | ||
|
||
void setActive( bool active ); | ||
bool active() const; | ||
%Docstring | ||
:rtype: bool | ||
%End | ||
|
||
QString aggregate() const; | ||
%Docstring | ||
:rtype: str | ||
%End | ||
void setAggregate( const QString &aggregate ); | ||
|
||
signals: | ||
void aggregateChanged(); | ||
void activeChanged(); | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsaggregatetoolbutton.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsattributeformrelationeditorwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsAttributeFormRelationEditorWidget : QgsAttributeFormWidget | ||
{ | ||
%Docstring | ||
************************************************************************* | ||
qgsattributeformrelationeditorwidget.h | ||
-------------------------------------- | ||
Date : Nov 2017 | ||
Copyright : (C) 2017 Matthias Kuhn | ||
Email : matthias@opengis.ch | ||
************************************************************************** | ||
* | ||
This program is free software; you can redistribute it and/or modify * | ||
it under the terms of the GNU General Public License as published by * | ||
the Free Software Foundation; either version 2 of the License, or * | ||
(at your option) any later version. * | ||
* | ||
************************************************************************** | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsattributeformrelationeditorwidget.h" | ||
%End | ||
public: | ||
explicit QgsAttributeFormRelationEditorWidget( QgsRelationWidgetWrapper *wrapper, QgsAttributeForm *form ); | ||
|
||
virtual void createSearchWidgetWrappers(); | ||
virtual QString currentFilterExpression() const; | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsattributeformrelationeditorwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
Oops, something went wrong.