Skip to content
Permalink
Browse files

Insert expression string on double click

  • Loading branch information
NathanW2 committed Jul 12, 2011
1 parent 7d14d0b commit 983a3ad2a5bccc4532f4d42e5d12a8ba57f8f033
Showing with 10 additions and 0 deletions.
  1. +9 −0 src/gui/qgsexpressionbuilder.cpp
  2. +1 −0 src/gui/qgsexpressionbuilder.h
@@ -16,6 +16,8 @@
#include "qgsexpressionbuilder.h"
#include "ui_qgsexpressionbuilder.h"

#include "qgslogger.h"

QgsExpressionBuilderWidget::QgsExpressionBuilderWidget(QgsVectorLayer *layer)
: QWidget(),
mLayer( layer )
@@ -37,11 +39,18 @@ QgsExpressionBuilderWidget::~QgsExpressionBuilderWidget()

}


void QgsExpressionBuilderWidget::on_mAllPushButton_clicked()
{

}

void QgsExpressionBuilderWidget::on_expressionTree_doubleClicked(const QModelIndex &index)
{
QgsExpressionItem* item = static_cast<QgsExpressionItem*>(mModel->itemFromIndex(index));
txtExpressionString->insertPlainText(item->getExpressionText());
}

void QgsExpressionBuilderWidget::loadFieldNames()
{
if ( !mLayer )
@@ -65,6 +65,7 @@ class QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExpressionBuil

public slots:
void on_mAllPushButton_clicked();
void on_expressionTree_doubleClicked(const QModelIndex &index);

private:
QgsVectorLayer *mLayer;

0 comments on commit 983a3ad

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