Skip to content

Commit

Permalink
Show group box 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 f0a8466 commit c72739b
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -18,8 +18,10 @@
#include "qgsattributeform.h"
#include "qgsrelationwidgetwrapper.h"
#include "qgslogger.h"
#include "qgscollapsiblegroupbox.h"

#include <QLabel>
#include <QGridLayout>

QgsRelationAggregateSearchWidgetWrapper::QgsRelationAggregateSearchWidgetWrapper( QgsVectorLayer *vl, QgsRelationWidgetWrapper *wrapper, QWidget *parent )
: QgsSearchWidgetWrapper( vl, -1, parent )
Expand Down Expand Up @@ -51,6 +53,8 @@ QWidget *QgsRelationAggregateSearchWidgetWrapper::createWidget( QWidget *parent
QWidget *widget;
QgsRelation relation = mWrapper->relation();

QgsCollapsibleGroupBox *groupBox = new QgsCollapsibleGroupBox( relation.name() );

if ( !relation.isValid() )
{
widget = new QLabel( tr( "Relation not valid" ) );
Expand All @@ -63,7 +67,10 @@ QWidget *QgsRelationAggregateSearchWidgetWrapper::createWidget( QWidget *parent
widget = mAttributeForm;
}

return widget;
groupBox->setLayout( new QGridLayout() );
groupBox->layout()->addWidget( widget );

return groupBox;
}

bool QgsRelationAggregateSearchWidgetWrapper::applyDirectly()
Expand Down

0 comments on commit c72739b

Please sign in to comment.