Skip to content

Commit e2c27ac

Browse files
author
macho
committed
another ui cleanups (mainly exchanged buttons with buttonbox)
git-svn-id: http://svn.osgeo.org/qgis/trunk@12037 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2a439e4 commit e2c27ac

File tree

6 files changed

+1051
-1149
lines changed

6 files changed

+1051
-1149
lines changed

i18n/qgis_uk.ts

Lines changed: 875 additions & 886 deletions
Large diffs are not rendered by default.

src/app/qgspgsourceselect.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void QgsPgSourceSelect::on_btnEdit_clicked()
111111
// Slot for showing help
112112
void QgsPgSourceSelect::helpClicked()
113113
{
114-
showHelp();
114+
QgsContextHelp::run( context_id );
115115
}
116116
/** End Autoconnected SLOTS **/
117117

@@ -730,11 +730,6 @@ bool QgsPgSourceSelect::getTableInfo( PGconn *pg, bool searchGeometryColumnsOnly
730730
return n > 0;
731731
}
732732

733-
void QgsPgSourceSelect::showHelp()
734-
{
735-
QgsContextHelp::run( context_id );
736-
}
737-
738733
QString QgsPgSourceSelect::fullDescription( QString schema, QString table,
739734
QString column, QString type )
740735
{

src/app/qgspgsourceselect.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ class QgsPgSourceSelect : public QDialog, private Ui::QgsPgSourceSelectBase
171171
// Set the position of the database connection list to the last
172172
// used one.
173173
void setConnectionListPosition();
174-
// Show the context help for the dialog
175-
void showHelp();
176174
// Combine the schema, table and column data into a single string
177175
// useful for display to the user
178176
QString fullDescription( QString schema, QString table, QString column, QString type );

src/app/qgsquerybuilder.cpp

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ QgsQueryBuilder::QgsQueryBuilder( QgsVectorLayer *layer,
3434
: QDialog( parent, fl ), mLayer( layer )
3535
{
3636
setupUi( this );
37+
connect( buttonBox, SIGNAL( helpRequested() ), this, SLOT( helpClicked() ) );
38+
39+
QPushButton *pbn = new QPushButton( tr( "&Test" ) );
40+
buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
41+
connect( pbn, SIGNAL( clicked() ), this, SLOT( on_btnTest_clicked() ) );
42+
43+
pbn = new QPushButton( tr( "&Clear" ) );
44+
buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
45+
connect( pbn, SIGNAL( clicked() ), this, SLOT( on_btnClear_clicked() ) );
46+
3747
setupGuiViews();
3848

3949
mOrigSubsetString = layer->subsetString();
@@ -166,7 +176,13 @@ void QgsQueryBuilder::on_btnTest_clicked()
166176
}
167177
}
168178

169-
void QgsQueryBuilder::on_btnOk_clicked()
179+
// Slot for showing help
180+
void QgsQueryBuilder::helpClicked()
181+
{
182+
// QgsContextHelp::run( context_id );
183+
}
184+
185+
void QgsQueryBuilder::accept()
170186
{
171187
// if user hits Ok and there is no query, skip the validation
172188
if ( !txtSQL->toPlainText().trimmed().isEmpty() )
@@ -179,15 +195,15 @@ void QgsQueryBuilder::on_btnOk_clicked()
179195
}
180196
}
181197

182-
accept();
198+
QDialog::accept();
183199
}
184200

185-
void QgsQueryBuilder::on_btnCancel_clicked()
201+
void QgsQueryBuilder::reject()
186202
{
187203
if ( mLayer->subsetString() != mOrigSubsetString )
188204
mLayer->setSubsetString( mOrigSubsetString );
189205

190-
reject();
206+
QDialog::reject();
191207
}
192208

193209
void QgsQueryBuilder::on_btnEqual_clicked()

src/app/qgsquerybuilder.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@
2222
#include "ui_qgsquerybuilderbase.h"
2323
#include "qgisgui.h"
2424
#include "qgsfield.h"
25+
#include <QPushButton>
2526

2627
class QgsVectorLayer;
27-
28-
2928
/*!
3029
* \class QgsQueryBuilder
3130
* \brief Query Builder for PostgreSQL layers.
@@ -70,9 +69,11 @@ class QgsQueryBuilder : public QDialog, private Ui::QgsQueryBuilderBase
7069
~QgsQueryBuilder();
7170

7271
public slots:
72+
void accept();
73+
void reject();
74+
void helpClicked();
75+
void on_btnClear_clicked();
7376
void on_btnEqual_clicked();
74-
void on_btnOk_clicked();
75-
void on_btnCancel_clicked();
7677
void on_btnLessThan_clicked();
7778
void on_btnGreaterThan_clicked();
7879
void on_btnPct_clicked();
@@ -91,7 +92,7 @@ class QgsQueryBuilder : public QDialog, private Ui::QgsQueryBuilderBase
9192
void on_btnAnd_clicked();
9293
void on_btnNot_clicked();
9394
void on_btnOr_clicked();
94-
void on_btnClear_clicked();
95+
9596
/*! Test the constructed sql statement to see if the database likes it.
9697
* The number of rows that would be returned is displayed in a message box.
9798
* The test uses a "select count(*) from ..." query to test the SQL

0 commit comments

Comments
 (0)