From b346d11cd3bad4c7fb51b54b4e9c8586a7c5043a Mon Sep 17 00:00:00 2001 From: signedav Date: Thu, 4 Jul 2024 14:30:39 +0200 Subject: [PATCH] prototyping for mockups for default filter --- .../gui/linking_child_manager_dialog.py | 4 +++- .../ui/linking_child_manager_dialog_config_widget.ui | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/linking_relation_editor/gui/linking_child_manager_dialog.py b/linking_relation_editor/gui/linking_child_manager_dialog.py index d521d43..611eddb 100644 --- a/linking_relation_editor/gui/linking_child_manager_dialog.py +++ b/linking_relation_editor/gui/linking_child_manager_dialog.py @@ -23,6 +23,7 @@ QgsHighlight, QgsIdentifyMenu, QgsMessageBar, + QgsAttributeForm, ) from qgis.PyQt.QtCore import QModelIndex, Qt, QTimer from qgis.PyQt.QtWidgets import QAction, QDialog, QMessageBox @@ -30,7 +31,7 @@ from qgis.utils import iface from linking_relation_editor.core.model.attribute_form_delegate import ( - AttributeFormDelegate, + AttributeFormDelegate ) from linking_relation_editor.core.model.features_model import FeaturesModel from linking_relation_editor.core.model.features_model_filter import FeaturesModelFilter @@ -187,6 +188,7 @@ def __init__( ) self._feature_filter_widget.filterShowAll() + self._feature_filter_widget.setFilterExpression("relevant_progrtyp_alr = True AND relevant_subregion_1_2 = True",QgsAttributeForm.ReplaceFilter, True) # Signal slots self.accepted.connect(self._accepting) self.rejected.connect(self._rejecting) diff --git a/linking_relation_editor/ui/linking_child_manager_dialog_config_widget.ui b/linking_relation_editor/ui/linking_child_manager_dialog_config_widget.ui index 4a82685..1429682 100644 --- a/linking_relation_editor/ui/linking_child_manager_dialog_config_widget.ui +++ b/linking_relation_editor/ui/linking_child_manager_dialog_config_widget.ui @@ -49,6 +49,10 @@ + + + + @@ -61,6 +65,12 @@
qgscollapsiblegroupbox.h
1 + + QgsFieldExpressionWidget + +
qgsfieldexpressionwidget.h
+ 1 +