QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
QgsExpressionSelectionDialog Class Reference

This class offers a dialog to change feature selections. More...

#include <qgsexpressionselectiondialog.h>

Collaboration diagram for QgsExpressionSelectionDialog:
Collaboration graph
[legend]

Public Slots

void on_mActionSelect_triggered ()
void on_mActionAddToSelection_triggered ()
void on_mActionRemoveFromSelection_triggered ()
void on_mActionSelectInstersect_triggered ()
void on_mPbnClose_clicked ()

Public Member Functions

 QgsExpressionSelectionDialog (QgsVectorLayer *layer, QString startText=QString(), QWidget *parent=NULL)
 Creates a new selection dialog.
QgsExpressionBuilderWidgetexpressionBuilder ()
 The builder widget that is used by the dialog.
void setExpressionText (const QString &text)
 Sets the current expression text.
QString expressionText ()
 Returns the current expression text.
void setGeomCalculator (const QgsDistanceArea &da)
 *Sets geometry calculator used in distance/area calculations.

Protected Member Functions

virtual void closeEvent (QCloseEvent *closeEvent)
 Implementation for closeEvent Saves the window geometry.
virtual void done (int r)
 Implementation for done (default behavior when pressing esc) Calls close, so the window geometry gets saved and the object deleted.

Private Attributes

QgsVectorLayermLayer

Detailed Description

This class offers a dialog to change feature selections.

To do so, a QgsExpressionBuilderWidget is shown in a dialog. It offers the possibilities to create a new selection, add to the current selection remove from the current selection or select within the current selection.

Note
added in 2.0

Definition at line 30 of file qgsexpressionselectiondialog.h.

Constructor & Destructor Documentation

QgsExpressionSelectionDialog::QgsExpressionSelectionDialog ( QgsVectorLayer layer,
QString  startText = QString(),
QWidget *  parent = NULL 
)

Creates a new selection dialog.

Parameters
layerThe layer on which the selection is to be performed.
startTextA default expression text to be applied (Defaults to empty)
parentparent object (owner)

Definition at line 22 of file qgsexpressionselectiondialog.cpp.

References QgsApplication::getThemeIcon().

Member Function Documentation

void QgsExpressionSelectionDialog::closeEvent ( QCloseEvent *  closeEvent)
protectedvirtual

Implementation for closeEvent Saves the window geometry.

Parameters
closeEventEvent object. Unused.

Definition at line 194 of file qgsexpressionselectiondialog.cpp.

void QgsExpressionSelectionDialog::done ( int  r)
protectedvirtual

Implementation for done (default behavior when pressing esc) Calls close, so the window geometry gets saved and the object deleted.

Parameters
rResult value. Unused.

Definition at line 207 of file qgsexpressionselectiondialog.cpp.

QgsExpressionBuilderWidget * QgsExpressionSelectionDialog::expressionBuilder ( )

The builder widget that is used by the dialog.

Returns
The builder widget that is used by the dialog

Definition at line 47 of file qgsexpressionselectiondialog.cpp.

QString QgsExpressionSelectionDialog::expressionText ( )

Returns the current expression text.

Returns
The expression text

Definition at line 57 of file qgsexpressionselectiondialog.cpp.

void QgsExpressionSelectionDialog::on_mActionAddToSelection_triggered ( )
slot
void QgsExpressionSelectionDialog::on_mActionRemoveFromSelection_triggered ( )
slot
void QgsExpressionSelectionDialog::on_mActionSelect_triggered ( )
slot
void QgsExpressionSelectionDialog::on_mActionSelectInstersect_triggered ( )
slot
void QgsExpressionSelectionDialog::on_mPbnClose_clicked ( )
slot

Definition at line 202 of file qgsexpressionselectiondialog.cpp.

void QgsExpressionSelectionDialog::setExpressionText ( const QString &  text)

Sets the current expression text.

Parameters
textthe expression text to set

Definition at line 52 of file qgsexpressionselectiondialog.cpp.

void QgsExpressionSelectionDialog::setGeomCalculator ( const QgsDistanceArea da)

*Sets geometry calculator used in distance/area calculations.

Definition at line 62 of file qgsexpressionselectiondialog.cpp.

Member Data Documentation

QgsVectorLayer* QgsExpressionSelectionDialog::mLayer
private

The documentation for this class was generated from the following files: