Skip to content

Commit

Permalink
WFS: do not show ok/cancel when embedded in qbrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Oct 11, 2011
1 parent 318a36b commit 30e4892
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/providers/wfs/qgswfsdataitems.cpp
Expand Up @@ -149,7 +149,7 @@ QList<QAction*> QgsWFSRootItem::actions()

QWidget * QgsWFSRootItem::paramWidget()
{
QgsWFSSourceSelect *select = new QgsWFSSourceSelect( 0, 0 );
QgsWFSSourceSelect *select = new QgsWFSSourceSelect( 0, 0, true );
connect( select, SIGNAL( connectionsChanged() ), this, SLOT( connectionsChanged() ) );
return select;
}
Expand Down
13 changes: 12 additions & 1 deletion src/providers/wfs/qgswfssourceselect.cpp
Expand Up @@ -34,14 +34,25 @@
#include <QFileDialog>


QgsWFSSourceSelect::QgsWFSSourceSelect( QWidget* parent, Qt::WFlags fl )
QgsWFSSourceSelect::QgsWFSSourceSelect( QWidget* parent, Qt::WFlags fl, bool embeddedMode )
: QDialog( parent, fl )
, mConn( NULL )
{
setupUi( this );

btnAdd = buttonBox->button( QDialogButtonBox::Ok );
btnAdd->setEnabled( false );

if ( embeddedMode )
{
buttonBox->button( QDialogButtonBox::Ok )->hide();
buttonBox->button( QDialogButtonBox::Cancel )->hide();
}

// keep the "use current view extent" checkbox hidden until
// the functionality is reintroduced [MD]
mBboxCheckBox->hide();

connect( buttonBox, SIGNAL( accepted() ), this, SLOT( addLayer() ) );
connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
connect( btnNew, SIGNAL( clicked() ), this, SLOT( addEntryToServerList() ) );
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wfs/qgswfssourceselect.h
Expand Up @@ -30,7 +30,7 @@ class QgsWFSSourceSelect: public QDialog, private Ui::QgsWFSSourceSelectBase

public:

QgsWFSSourceSelect( QWidget* parent, Qt::WFlags fl );
QgsWFSSourceSelect( QWidget* parent, Qt::WFlags fl, bool embeddedMode = false );
~QgsWFSSourceSelect();

signals:
Expand Down

0 comments on commit 30e4892

Please sign in to comment.