Skip to content
Permalink
Browse files

Rename QgsExpressionBuilder to QgsExpressionBuilderWidget

  • Loading branch information
NathanW2 committed Jul 3, 2011
1 parent 14a8924 commit 4b84959729b2a07e2ca81b872fdd6bde7479f400
Showing with 13 additions and 13 deletions.
  1. +2 −2 src/app/qgslabelinggui.cpp
  2. +8 −8 src/gui/qgsexpressionbuilder.cpp
  3. +3 −3 src/gui/qgsexpressionbuilder.h
@@ -461,8 +461,8 @@ void QgsLabelingGui::showExpressionDialog()
QDialog* dlg = new QDialog();
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
| QDialogButtonBox::Cancel);
QgsExpressionBuilder* builder = new QgsExpressionBuilder();
QGridLayout* layout = new QGridLayout();
QgsExpressionBuilderWidget* builder = new QgsExpressionBuilderWidget(mLayer);
dlg->setLayout(layout);
layout->addWidget(builder);
layout->addWidget(buttonBox);
@@ -471,7 +471,7 @@ void QgsLabelingGui::showExpressionDialog()

// Set the current expression using the selected text in the combo box.
builder->setExpressionString(this->cboFieldName->currentText());
builder->loadFieldNames(mLayer);
builder->loadFieldNames();

if ( dlg->exec() == QDialog::Accepted )
{
@@ -16,25 +16,25 @@
#include "qgsexpressionbuilder.h"
#include "ui_qgsexpressionbuilder.h"

QgsExpressionBuilder::QgsExpressionBuilder(QWidget *parent, QgsVectorLayer *layer)
: QWidget(parent),
QgsExpressionBuilderWidget::QgsExpressionBuilderWidget(QgsVectorLayer *layer)
: QWidget(),
mLayer( layer )
{
setupUi(this);
if (!layer) return;
}

QgsExpressionBuilder::~QgsExpressionBuilder()
QgsExpressionBuilderWidget::~QgsExpressionBuilderWidget()
{

}

void QgsExpressionBuilder::on_mAllPushButton_clicked()
void QgsExpressionBuilderWidget::on_mAllPushButton_clicked()
{

}

void QgsExpressionBuilder::loadFieldNames()
void QgsExpressionBuilderWidget::loadFieldNames()
{
if ( !mLayer )
{
@@ -53,7 +53,7 @@ void QgsExpressionBuilder::loadFieldNames()
}
}

void QgsExpressionBuilder::fillFieldValues(int fieldIndex, int countLimit)
void QgsExpressionBuilderWidget::fillFieldValues(int fieldIndex, int countLimit)
{
// determine the field type
QList<QVariant> values;
@@ -65,12 +65,12 @@ void QgsExpressionBuilder::fillFieldValues(int fieldIndex, int countLimit)
}
}

QString QgsExpressionBuilder::getExpressionString()
QString QgsExpressionBuilderWidget::getExpressionString()
{
return this->txtExpressionString->toPlainText();
}

void QgsExpressionBuilder::setExpressionString(const QString expressionString)
void QgsExpressionBuilderWidget::setExpressionString(const QString expressionString)
{
this->txtExpressionString->setPlainText(expressionString);
}
@@ -20,11 +20,11 @@
#include "ui_qgsexpressionbuilder.h"
#include "qgsvectorlayer.h"

class QgsExpressionBuilder : public QWidget, private Ui::QgsExpressionBuilder {
class QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExpressionBuilder {
Q_OBJECT
public:
QgsExpressionBuilder(QWidget *parent = 0, QgsVectorLayer * layer=0);
~QgsExpressionBuilder();
QgsExpressionBuilderWidget(QgsVectorLayer * layer);
~QgsExpressionBuilderWidget();

void loadFieldNames();
void fillFieldValues(int fieldIndex, int countLimit);

0 comments on commit 4b84959

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