Skip to content
Permalink
Browse files

Update comments

  • Loading branch information
NathanW2 committed Oct 16, 2011
1 parent 17d326e commit 7f5e1c819187e224f2bbed38f094e09a1ecdb3f1
Showing with 12 additions and 4 deletions.
  1. +1 −0 src/app/qgslabelinggui.cpp
  2. +10 −4 src/gui/qgsexpressionbuilder.h
  3. +1 −0 src/gui/qgsexpressionbuilderdialog.h
@@ -495,6 +495,7 @@ void QgsLabelingGui::showExpressionDialog()
{
//TODO extract this out to a dialog.
QgsExpressionBuilderDialog dlg( mLayer, cboFieldName->currentText() , this );
dlg.setWindowTitle( tr("Expression based label") );
if ( dlg.exec() == QDialog::Accepted )
{
QString expression = dlg.expressionBuilder()->getExpressionString();
@@ -24,12 +24,14 @@
#include "QStandardItem"
#include "QSortFilterProxyModel"

/** Search proxy used to filter the QgsExpressionBuilderWidget tree.
* The default search for a tree model only searches top level this will handle one
* level down
*/
class QgsExpressionItemSearhProxy : public QSortFilterProxyModel
{
public:
QgsExpressionItemSearhProxy()
{
}
QgsExpressionItemSearhProxy() { }

bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
{
@@ -40,6 +42,8 @@ class QgsExpressionItemSearhProxy : public QSortFilterProxyModel
}
};

/** An expression item that can be used in the QgsExpressionBuilderWidget tree.
*/
class QgsExpressionItem : public QStandardItem
{
public:
@@ -95,7 +99,9 @@ class QgsExpressionItem : public QStandardItem
QgsExpressionItem::ItemType mType;
};

/** A reusable widget that can be used to build a expression string. */
/** A reusable widget that can be used to build a expression string.
* See QgsExpressionBuilderDialog for exmaple of usage.
*/
class QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExpressionBuilder {
Q_OBJECT
public:
@@ -13,6 +13,7 @@ class QgsExpressionBuilderDialog : public QDialog, private Ui::QgsExpressionBuil
QgsExpressionBuilderWidget* expressionBuilder();

void setExpressionText( QString text );

protected:
/**
* Handle closing of the window

0 comments on commit 7f5e1c8

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