Skip to content
Permalink
Browse files

[addlayerbutton] Add embedded option to spatialite dlg

  • Loading branch information
elpaso committed Jun 2, 2017
1 parent 129e00d commit 220d12564b9974721f9cae56c487b91deca22c20
@@ -39,11 +39,13 @@ email : a.furieri@lqt.it
#define strcasecmp(a,b) stricmp(a,b)
#endif

QgsSpatiaLiteSourceSelect::QgsSpatiaLiteSourceSelect( QWidget *parent, Qt::WindowFlags fl, bool embedded ):
QDialog( parent, fl )
QgsSpatiaLiteSourceSelect::QgsSpatiaLiteSourceSelect( QWidget *parent, Qt::WindowFlags fl, bool embeddedMode ):
QDialog( parent, fl ),
mEmbeddedMode( embeddedMode )
{
setupUi( this );


QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "Windows/SpatiaLiteSourceSelect/geometry" ) ).toByteArray() );
mHoldDialogOpen->setChecked( settings.value( QStringLiteral( "Windows/SpatiaLiteSourceSelect/HoldDialogOpen" ), false ).toBool() );
@@ -65,7 +67,7 @@ QgsSpatiaLiteSourceSelect::QgsSpatiaLiteSourceSelect( QWidget *parent, Qt::Windo
connect( mBuildQueryButton, &QAbstractButton::clicked, this, &QgsSpatiaLiteSourceSelect::buildQuery );
mBuildQueryButton->setEnabled( false );

if ( embedded )
if ( mEmbeddedMode )
{
buttonBox->button( QDialogButtonBox::Close )->hide();
}
@@ -50,7 +50,7 @@ class QgsSpatiaLiteSourceSelect: public QDialog, private Ui::QgsDbSourceSelectBa
static bool newConnection( QWidget *parent );

//! Constructor
QgsSpatiaLiteSourceSelect( QWidget *parent, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, bool embedded = false );
QgsSpatiaLiteSourceSelect( QWidget *parent, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, bool embeddedMode = false );

~QgsSpatiaLiteSourceSelect();
//! Populate the connection list combo box
@@ -129,6 +129,7 @@ class QgsSpatiaLiteSourceSelect: public QDialog, private Ui::QgsDbSourceSelectBa
QPushButton *mBuildQueryButton = nullptr;
QPushButton *mAddButton = nullptr;
QPushButton *mStatsButton = nullptr;
bool mEmbeddedMode;
};

#endif // QGSSPATIALITESOURCESELECT_H

0 comments on commit 220d125

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