Skip to content
Permalink
Browse files

another ui cleanups (mainly exchanged buttons with buttonbox)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12037 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
macho
macho committed Nov 8, 2009
1 parent ae7e922 commit 5511ca73f9ee257f4b2bd5216e4399483414c749
Showing with 1,051 additions and 1,149 deletions.
  1. +875 −886 i18n/qgis_uk.ts
  2. +1 −6 src/app/qgspgsourceselect.cpp
  3. +0 −2 src/app/qgspgsourceselect.h
  4. +20 −4 src/app/qgsquerybuilder.cpp
  5. +6 −5 src/app/qgsquerybuilder.h
  6. +149 −246 src/ui/qgsquerybuilderbase.ui

Large diffs are not rendered by default.

@@ -111,7 +111,7 @@ void QgsPgSourceSelect::on_btnEdit_clicked()
// Slot for showing help
void QgsPgSourceSelect::helpClicked()
{
showHelp();
QgsContextHelp::run( context_id );
}
/** End Autoconnected SLOTS **/

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

void QgsPgSourceSelect::showHelp()
{
QgsContextHelp::run( context_id );
}

QString QgsPgSourceSelect::fullDescription( QString schema, QString table,
QString column, QString type )
{
@@ -171,8 +171,6 @@ class QgsPgSourceSelect : public QDialog, private Ui::QgsPgSourceSelectBase
// Set the position of the database connection list to the last
// used one.
void setConnectionListPosition();
// Show the context help for the dialog
void showHelp();
// Combine the schema, table and column data into a single string
// useful for display to the user
QString fullDescription( QString schema, QString table, QString column, QString type );
@@ -34,6 +34,16 @@ QgsQueryBuilder::QgsQueryBuilder( QgsVectorLayer *layer,
: QDialog( parent, fl ), mLayer( layer )
{
setupUi( this );
connect( buttonBox, SIGNAL( helpRequested() ), this, SLOT( helpClicked() ) );

QPushButton *pbn = new QPushButton( tr( "&Test" ) );
buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
connect( pbn, SIGNAL( clicked() ), this, SLOT( on_btnTest_clicked() ) );

pbn = new QPushButton( tr( "&Clear" ) );
buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
connect( pbn, SIGNAL( clicked() ), this, SLOT( on_btnClear_clicked() ) );

setupGuiViews();

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

void QgsQueryBuilder::on_btnOk_clicked()
// Slot for showing help
void QgsQueryBuilder::helpClicked()
{
// QgsContextHelp::run( context_id );
}

void QgsQueryBuilder::accept()
{
// if user hits Ok and there is no query, skip the validation
if ( !txtSQL->toPlainText().trimmed().isEmpty() )
@@ -179,15 +195,15 @@ void QgsQueryBuilder::on_btnOk_clicked()
}
}

accept();
QDialog::accept();
}

void QgsQueryBuilder::on_btnCancel_clicked()
void QgsQueryBuilder::reject()
{
if ( mLayer->subsetString() != mOrigSubsetString )
mLayer->setSubsetString( mOrigSubsetString );

reject();
QDialog::reject();
}

void QgsQueryBuilder::on_btnEqual_clicked()
@@ -22,10 +22,9 @@
#include "ui_qgsquerybuilderbase.h"
#include "qgisgui.h"
#include "qgsfield.h"
#include <QPushButton>

class QgsVectorLayer;


/*!
* \class QgsQueryBuilder
* \brief Query Builder for PostgreSQL layers.
@@ -70,9 +69,11 @@ class QgsQueryBuilder : public QDialog, private Ui::QgsQueryBuilderBase
~QgsQueryBuilder();

public slots:
void accept();
void reject();
void helpClicked();
void on_btnClear_clicked();
void on_btnEqual_clicked();
void on_btnOk_clicked();
void on_btnCancel_clicked();
void on_btnLessThan_clicked();
void on_btnGreaterThan_clicked();
void on_btnPct_clicked();
@@ -91,7 +92,7 @@ class QgsQueryBuilder : public QDialog, private Ui::QgsQueryBuilderBase
void on_btnAnd_clicked();
void on_btnNot_clicked();
void on_btnOr_clicked();
void on_btnClear_clicked();

/*! Test the constructed sql statement to see if the database likes it.
* The number of rows that would be returned is displayed in a message box.
* The test uses a "select count(*) from ..." query to test the SQL

0 comments on commit 5511ca7

Please sign in to comment.
You can’t perform that action at this time.