Skip to content

Commit

Permalink
Applied patch #2341 (loading and saving of WMS and PostGIS connection…
Browse files Browse the repository at this point in the history
…s) from alexbruy

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12855 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 1, 2010
1 parent d66c641 commit ab9c0e9
Show file tree
Hide file tree
Showing 10 changed files with 696 additions and 38 deletions.
4 changes: 4 additions & 0 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ SET(QGIS_APP_SRCS
qgsvectorlayerproperties.cpp
qgsquerybuilder.cpp

qgsmanageconnectionsdialog.cpp

composer/qgsattributeselectiondialog.cpp
composer/qgscomposer.cpp
composer/qgscomposerarrowwidget.cpp
Expand Down Expand Up @@ -138,6 +140,8 @@ SET (QGIS_APP_MOC_HDRS
qgsidentifyresults.h
qgslabeldialog.h

qgsmanageconnectionsdialog.h

qgsmaptoolidentify.h
qgsmaptoolsplitfeatures.h
qgsmaptoolvertexedit.h
Expand Down
14 changes: 14 additions & 0 deletions src/app/postgres/qgspgsourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ email : sherman at mrcc.com
#include "qgsapplication.h"
#include "qgscontexthelp.h"
#include "qgspgnewconnection.h"
#include "qgsmanageconnectionsdialog.h"
#include "qgsquerybuilder.h"
#include "qgsdatasourceuri.h"
#include "qgsvectorlayer.h"
Expand Down Expand Up @@ -126,6 +127,19 @@ void QgsPgSourceSelect::on_btnDelete_clicked()
populateConnectionList();
}

void QgsPgSourceSelect::on_btnSave_clicked()
{
QgsManageConnectionsDialog dlg( this, QgsManageConnectionsDialog::Save, QgsManageConnectionsDialog::PostGIS );
dlg.exec();
}

void QgsPgSourceSelect::on_btnLoad_clicked()
{
QgsManageConnectionsDialog dlg( this, QgsManageConnectionsDialog::Load, QgsManageConnectionsDialog::PostGIS );
dlg.exec();
populateConnectionList();
}

// Slot for editing a connection
void QgsPgSourceSelect::on_btnEdit_clicked()
{
Expand Down
4 changes: 4 additions & 0 deletions src/app/postgres/qgspgsourceselect.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ class QgsPgSourceSelect : public QDialog, private Ui::QgsPgSourceSelectBase
void on_btnBuildQuery_clicked();
//! Deletes the selected connection
void on_btnDelete_clicked();
//! Saves the selected connections to the file
void on_btnSave_clicked();
//! Loads the selected connections from the file
void on_btnLoad_clicked();
void on_mSearchOptionsButton_clicked();
void on_mSearchTableEdit_textChanged( const QString & text );
void on_mSearchColumnComboBox_currentIndexChanged( const QString & text );
Expand Down
Loading

0 comments on commit ab9c0e9

Please sign in to comment.