Skip to content

Commit 6cd290d

Browse files
author
macho
committed
ui cleanup in newogrconnection to buttonbox
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11995 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 9d252c8 commit 6cd290d

File tree

3 files changed

+495
-498
lines changed

3 files changed

+495
-498
lines changed

src/app/ogr/qgsnewogrconnection.cpp

+7-10
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ QgsNewOgrConnection::QgsNewOgrConnection( QWidget *parent, const QString& connTy
3434
: QDialog( parent, fl )
3535
{
3636
setupUi( this );
37+
connect( buttonBox, SIGNAL( helpRequested() ),this,SLOT( help() ) );
3738
//add database drivers
3839
QStringList dbDrivers = QgsProviderRegistry::instance()->databaseDrivers().split( ";" );
3940
for ( int i = 0;i < dbDrivers.count();i++ )
@@ -105,21 +106,16 @@ void QgsNewOgrConnection::saveConnection()
105106
settings.setValue( baseKey + "/username", txtUsername->text() );
106107
settings.setValue( baseKey + "/password", chkStorePassword->isChecked() ? txtPassword->text() : "" );
107108
settings.setValue( baseKey + "/save", chkStorePassword->isChecked() ? "true" : "false" );
108-
accept();
109-
}
110-
111-
void QgsNewOgrConnection::helpInfo()
112-
{
113-
QgsContextHelp::run( context_id );
114109
}
115110

116111
/** Autoconnected SLOTS **/
117-
void QgsNewOgrConnection::on_btnOk_clicked()
112+
void QgsNewOgrConnection::accept()
118113
{
119114
saveConnection();
115+
QDialog::accept();
120116
}
121117

122-
void QgsNewOgrConnection::on_btnHelp_clicked()
118+
void QgsNewOgrConnection::help()
123119
{
124120
helpInfo();
125121
}
@@ -129,10 +125,11 @@ void QgsNewOgrConnection::on_btnConnect_clicked()
129125
testConnection();
130126
}
131127

132-
void QgsNewOgrConnection::on_btnCancel_clicked()
128+
void QgsNewOgrConnection::helpInfo()
133129
{
134-
reject();
130+
QgsContextHelp::run( context_id );
135131
}
132+
136133
/** end Autoconnected SLOTS **/
137134

138135

src/app/ogr/qgsnewogrconnection.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ class QgsNewOgrConnection : public QDialog, private Ui::QgsNewOgrConnectionBase
4040
//! Display the context help
4141
void helpInfo();
4242
public slots:
43-
void on_btnOk_clicked();
44-
void on_btnCancel_clicked();
45-
void on_btnHelp_clicked();
43+
void accept();
44+
void help();
4645
void on_btnConnect_clicked();
4746
private:
4847
static const int context_id = 63428984;

0 commit comments

Comments
 (0)