Skip to content
Permalink
Browse files

Hide search widget tool button for aggregate search

  • Loading branch information
m-kuhn committed Nov 20, 2017
1 parent 04101c3 commit f0a84667b839c0f68753e37d52a157a7b8d2f667
@@ -120,6 +120,12 @@ class QgsAttributeFormWidget : QWidget /Abstract/
Resets the search/filter value of the widget.
%End

bool searchWidgetToolButtonVisible() const;
%Docstring
:rtype: bool
%End
void setSearchWidgetToolButtonVisible( bool searchWidgetToolButtonVisible );

protected:


@@ -23,6 +23,7 @@ QgsAttributeFormRelationEditorWidget::QgsAttributeFormRelationEditorWidget( QgsR
: QgsAttributeFormWidget( wrapper, form )
, mWrapper( wrapper )
{
setSearchWidgetToolButtonVisible( false );
}

void QgsAttributeFormRelationEditorWidget::createSearchWidgetWrappers( const QgsAttributeEditorContext &context )
@@ -173,6 +173,16 @@ void QgsAttributeFormWidget::updateWidgets()

}

bool QgsAttributeFormWidget::searchWidgetToolButtonVisible() const
{
return mSearchWidgetToolButton->isVisible();
}

void QgsAttributeFormWidget::setSearchWidgetToolButtonVisible( bool searchWidgetToolButtonVisible )
{
return mSearchWidgetToolButton->setVisible( searchWidgetToolButtonVisible );
}

QWidget *QgsAttributeFormWidget::searchPage() const
{
return mSearchPage;
@@ -120,6 +120,9 @@ class GUI_EXPORT QgsAttributeFormWidget : public QWidget // SIP_ABSTRACT
*/
void resetSearch();

bool searchWidgetToolButtonVisible() const;
void setSearchWidgetToolButtonVisible( bool searchWidgetToolButtonVisible );

protected:

/**
@@ -153,7 +156,6 @@ class GUI_EXPORT QgsAttributeFormWidget : public QWidget // SIP_ABSTRACT

private:
virtual void updateWidgets();

QgsAttributeFormWidget::Mode mMode = DefaultMode;
QgsSearchWidgetToolButton *mSearchWidgetToolButton = nullptr;
QWidget *mEditPage = nullptr;

0 comments on commit f0a8466

Please sign in to comment.
You can’t perform that action at this time.