Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new dialog for generic expression builder; Added search to func…
…tion list; Right click to load sample 10-All values
- Loading branch information
Showing
8 changed files
with
481 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "qgsexpressionbuilderdialog.h" | ||
#include <QSettings> | ||
|
||
QgsExpressionBuilderDialog::QgsExpressionBuilderDialog( QgsVectorLayer* layer, QString startText, QWidget* parent) | ||
:QDialog( parent ) | ||
{ | ||
setupUi( this ); | ||
|
||
QPushButton* okButuon = buttonBox->button(QDialogButtonBox::Ok); | ||
connect(builder, SIGNAL(expressionParsed(bool)), okButuon, SLOT(setEnabled(bool))); | ||
|
||
builder->setLayer( layer ); | ||
builder->setExpressionString(startText); | ||
builder->loadFieldNames(); | ||
|
||
QSettings settings; | ||
restoreGeometry( settings.value( "/Windows/ExpressionBuilderDialog/geometry" ).toByteArray() ); | ||
} | ||
|
||
QgsExpressionBuilderWidget* QgsExpressionBuilderDialog::expressionBuilder() | ||
{ | ||
return builder; | ||
} | ||
|
||
void QgsExpressionBuilderDialog::setExpressionText( QString text ) | ||
{ | ||
builder->setExpressionString( text ); | ||
} | ||
|
||
void QgsExpressionBuilderDialog::closeEvent( QCloseEvent *event ) | ||
{ | ||
QDialog::closeEvent( event ); | ||
|
||
// TODO Work out why this is not working yet. | ||
QSettings settings; | ||
settings.setValue( "/Windows/ExpressionBuilderDialog/geometry", saveGeometry() ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef QGSEXPRESSIONBUILDERDIALOG_H | ||
#define QGSEXPRESSIONBUILDERDIALOG_H | ||
|
||
#include <QDialog> | ||
#include "ui_qgsexpressionbuilderdialogbase.h" | ||
|
||
class QgsExpressionBuilderDialog : public QDialog, private Ui::QgsExpressionBuilderDialogBase | ||
{ | ||
public: | ||
QgsExpressionBuilderDialog( QgsVectorLayer* layer, QString startText = "", QWidget* parent = NULL); | ||
|
||
/** The builder widget that is used by the dialog */ | ||
QgsExpressionBuilderWidget* expressionBuilder(); | ||
|
||
void setExpressionText( QString text ); | ||
protected: | ||
/** | ||
* Handle closing of the window | ||
* @param event unused | ||
*/ | ||
void closeEvent( QCloseEvent * event ); | ||
}; | ||
|
||
#endif |
Oops, something went wrong.