Skip to content

Commit ab9c0e9

Browse files
author
mhugent
committed
Applied patch #2341 (loading and saving of WMS and PostGIS connections) from alexbruy
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12855 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent d66c641 commit ab9c0e9

10 files changed

+696
-38
lines changed

src/app/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ SET(QGIS_APP_SRCS
7272
qgsvectorlayerproperties.cpp
7373
qgsquerybuilder.cpp
7474

75+
qgsmanageconnectionsdialog.cpp
76+
7577
composer/qgsattributeselectiondialog.cpp
7678
composer/qgscomposer.cpp
7779
composer/qgscomposerarrowwidget.cpp
@@ -138,6 +140,8 @@ SET (QGIS_APP_MOC_HDRS
138140
qgsidentifyresults.h
139141
qgslabeldialog.h
140142

143+
qgsmanageconnectionsdialog.h
144+
141145
qgsmaptoolidentify.h
142146
qgsmaptoolsplitfeatures.h
143147
qgsmaptoolvertexedit.h

src/app/postgres/qgspgsourceselect.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ email : sherman at mrcc.com
2424
#include "qgsapplication.h"
2525
#include "qgscontexthelp.h"
2626
#include "qgspgnewconnection.h"
27+
#include "qgsmanageconnectionsdialog.h"
2728
#include "qgsquerybuilder.h"
2829
#include "qgsdatasourceuri.h"
2930
#include "qgsvectorlayer.h"
@@ -126,6 +127,19 @@ void QgsPgSourceSelect::on_btnDelete_clicked()
126127
populateConnectionList();
127128
}
128129

130+
void QgsPgSourceSelect::on_btnSave_clicked()
131+
{
132+
QgsManageConnectionsDialog dlg( this, QgsManageConnectionsDialog::Save, QgsManageConnectionsDialog::PostGIS );
133+
dlg.exec();
134+
}
135+
136+
void QgsPgSourceSelect::on_btnLoad_clicked()
137+
{
138+
QgsManageConnectionsDialog dlg( this, QgsManageConnectionsDialog::Load, QgsManageConnectionsDialog::PostGIS );
139+
dlg.exec();
140+
populateConnectionList();
141+
}
142+
129143
// Slot for editing a connection
130144
void QgsPgSourceSelect::on_btnEdit_clicked()
131145
{

src/app/postgres/qgspgsourceselect.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ class QgsPgSourceSelect : public QDialog, private Ui::QgsPgSourceSelectBase
131131
void on_btnBuildQuery_clicked();
132132
//! Deletes the selected connection
133133
void on_btnDelete_clicked();
134+
//! Saves the selected connections to the file
135+
void on_btnSave_clicked();
136+
//! Loads the selected connections from the file
137+
void on_btnLoad_clicked();
134138
void on_mSearchOptionsButton_clicked();
135139
void on_mSearchTableEdit_textChanged( const QString & text );
136140
void on_mSearchColumnComboBox_currentIndexChanged( const QString & text );

0 commit comments

Comments
 (0)