QGIS API Documentation  2.5.0-Master
 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>

Inheritance diagram for QgsExpressionSelectionDialog:
Inheritance graph
[legend]
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. More...
 
QgsExpressionBuilderWidgetexpressionBuilder ()
 The builder widget that is used by the dialog. More...
 
void setExpressionText (const QString &text)
 Sets the current expression text. More...
 
QString expressionText ()
 Returns the current expression text. More...
 
void setGeomCalculator (const QgsDistanceArea &da)
 Sets geometry calculator used in distance/area calculations. More...
 

Protected Member Functions

virtual void closeEvent (QCloseEvent *closeEvent)
 Implementation for closeEvent Saves the window geometry. More...
 
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. More...
 

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(), and QgsMapLayer::name().

Member Function Documentation

void QgsExpressionSelectionDialog::closeEvent ( QCloseEvent *  closeEvent)
protectedvirtual

Implementation for closeEvent Saves the window geometry.

Parameters
closeEventEvent object. Unused.

Definition at line 202 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 215 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 50 of file qgsexpressionselectiondialog.cpp.

QString QgsExpressionSelectionDialog::expressionText ( )

Returns the current expression text.

Returns
The expression text

Definition at line 60 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 210 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 55 of file qgsexpressionselectiondialog.cpp.

void QgsExpressionSelectionDialog::setGeomCalculator ( const QgsDistanceArea da)

Sets geometry calculator used in distance/area calculations.

Definition at line 65 of file qgsexpressionselectiondialog.cpp.

Member Data Documentation

QgsVectorLayer* QgsExpressionSelectionDialog::mLayer
private

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