Skip to content

Commit

Permalink
Hide search widget tool button for aggregate search
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 20, 2017
1 parent 04101c3 commit f0a8466
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
6 changes: 6 additions & 0 deletions python/gui/qgsattributeformwidget.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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:


Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsattributeformrelationeditorwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ QgsAttributeFormRelationEditorWidget::QgsAttributeFormRelationEditorWidget( QgsR
: QgsAttributeFormWidget( wrapper, form )
, mWrapper( wrapper )
{
setSearchWidgetToolButtonVisible( false );
}

void QgsAttributeFormRelationEditorWidget::createSearchWidgetWrappers( const QgsAttributeEditorContext &context )
Expand Down
10 changes: 10 additions & 0 deletions src/gui/qgsattributeformwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/gui/qgsattributeformwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ class GUI_EXPORT QgsAttributeFormWidget : public QWidget // SIP_ABSTRACT
*/
void resetSearch();

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

protected:

/**
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f0a8466

Please sign in to comment.