Skip to content

Commit

Permalink
ui cleanup in newogrconnection to buttonbox
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@11995 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
macho committed Nov 8, 2009
1 parent 81c2fe0 commit f2f3565
Show file tree
Hide file tree
Showing 3 changed files with 495 additions and 498 deletions.
17 changes: 7 additions & 10 deletions src/app/ogr/qgsnewogrconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ QgsNewOgrConnection::QgsNewOgrConnection( QWidget *parent, const QString& connTy
: QDialog( parent, fl )
{
setupUi( this );
connect( buttonBox, SIGNAL( helpRequested() ),this,SLOT( help() ) );
//add database drivers
QStringList dbDrivers = QgsProviderRegistry::instance()->databaseDrivers().split( ";" );
for ( int i = 0;i < dbDrivers.count();i++ )
Expand Down Expand Up @@ -105,21 +106,16 @@ void QgsNewOgrConnection::saveConnection()
settings.setValue( baseKey + "/username", txtUsername->text() );
settings.setValue( baseKey + "/password", chkStorePassword->isChecked() ? txtPassword->text() : "" );
settings.setValue( baseKey + "/save", chkStorePassword->isChecked() ? "true" : "false" );
accept();
}

void QgsNewOgrConnection::helpInfo()
{
QgsContextHelp::run( context_id );
}

/** Autoconnected SLOTS **/
void QgsNewOgrConnection::on_btnOk_clicked()
void QgsNewOgrConnection::accept()
{
saveConnection();
QDialog::accept();
}

void QgsNewOgrConnection::on_btnHelp_clicked()
void QgsNewOgrConnection::help()
{
helpInfo();
}
Expand All @@ -129,10 +125,11 @@ void QgsNewOgrConnection::on_btnConnect_clicked()
testConnection();
}

void QgsNewOgrConnection::on_btnCancel_clicked()
void QgsNewOgrConnection::helpInfo()
{
reject();
QgsContextHelp::run( context_id );
}

/** end Autoconnected SLOTS **/


Expand Down
5 changes: 2 additions & 3 deletions src/app/ogr/qgsnewogrconnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ class QgsNewOgrConnection : public QDialog, private Ui::QgsNewOgrConnectionBase
//! Display the context help
void helpInfo();
public slots:
void on_btnOk_clicked();
void on_btnCancel_clicked();
void on_btnHelp_clicked();
void accept();
void help();
void on_btnConnect_clicked();
private:
static const int context_id = 63428984;
Expand Down
Loading

0 comments on commit f2f3565

Please sign in to comment.