Skip to content
Permalink
Browse files

WFS: do not show ok/cancel when embedded in qbrowser

  • Loading branch information
wonder-sk committed Oct 11, 2011
1 parent 318a36b commit 30e489288655e1b273f24c7e1603f2403e9bc784
@@ -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;
}
@@ -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() ) );
@@ -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:

0 comments on commit 30e4892

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