QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Public Member Functions | Protected Member Functions | Private 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=0)
 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 Member Functions

void saveRecent ()

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 = 0 
)

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 200 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 213 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 48 of file qgsexpressionselectiondialog.cpp.

QString QgsExpressionSelectionDialog::expressionText ( )

Returns the current expression text.

Returns
The expression text

Definition at line 58 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 208 of file qgsexpressionselectiondialog.cpp.

void QgsExpressionSelectionDialog::saveRecent ( )
private
void QgsExpressionSelectionDialog::setExpressionText ( const QString &  text)

Sets the current expression text.

Parameters
textthe expression text to set

Definition at line 53 of file qgsexpressionselectiondialog.cpp.

void QgsExpressionSelectionDialog::setGeomCalculator ( const QgsDistanceArea da)

*Sets geometry calculator used in distance/area calculations.

Definition at line 63 of file qgsexpressionselectiondialog.cpp.

Member Data Documentation

QgsVectorLayer* QgsExpressionSelectionDialog::mLayer
private

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