Skip to content

Commit

Permalink
manage connections dialog cleanup and usability improvement. Also add…
Browse files Browse the repository at this point in the history
… support for service parameter in PostgreSQL connection introduced in r15258

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15264 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
alexbruy committed Feb 25, 2011
1 parent 599d159 commit d6fc8d5
Show file tree
Hide file tree
Showing 7 changed files with 164 additions and 109 deletions.
12 changes: 10 additions & 2 deletions src/app/postgres/qgspgsourceselect.cpp
Expand Up @@ -30,6 +30,7 @@ email : sherman at mrcc.com
#include "qgsvectorlayer.h"
#include "qgscredentials.h"

#include <QFileDialog>
#include <QInputDialog>
#include <QMessageBox>
#include <QSettings>
Expand Down Expand Up @@ -157,13 +158,20 @@ void QgsPgSourceSelect::on_btnDelete_clicked()

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

void QgsPgSourceSelect::loadClicked()
{
QgsManageConnectionsDialog dlg( this, QgsManageConnectionsDialog::Load, QgsManageConnectionsDialog::PostGIS );
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections )" ), ".",
tr( "XML files (*.xml *XML)" ) );
if ( fileName.isEmpty() )
{
return;
}

QgsManageConnectionsDialog dlg( this, QgsManageConnectionsDialog::Import, QgsManageConnectionsDialog::PostGIS, fileName );
dlg.exec();
populateConnectionList();
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/postgres/qgspgsourceselect.h
Expand Up @@ -131,9 +131,9 @@ class QgsPgSourceSelect : public QDialog, private Ui::QgsDbSourceSelectBase
void on_btnBuildQuery_clicked();
//! Deletes the selected connection
void on_btnDelete_clicked();
//! Saves the selected connections to the file
//! Saves the selected connections to file
void saveClicked();
//! Loads the selected connections from the file
//! Loads the selected connections from file
void loadClicked();
void on_mSearchTableEdit_textChanged( const QString & text );
void on_mSearchColumnComboBox_currentIndexChanged( const QString & text );
Expand Down

0 comments on commit d6fc8d5

Please sign in to comment.