This class implements a concrete tool to select layer features using an extent. More...
#include <Selection.h>
Public Slots | |
| void | setLayers (const std::list< te::map::AbstractLayerPtr > &layers) |
Signals | |
| void | layerSelectedObjectsChanged (const te::map::AbstractLayerPtr &layer) |
Public Member Functions | |
| virtual void | setCursor (const QCursor &cursor) |
Initializer Methods | |
Methods related to instantiation and destruction. | |
| Selection (MapDisplay *display, const QCursor &cursor, const std::list< te::map::AbstractLayerPtr > &layers, QObject *parent=0) | |
| It constructs a selection tool associated with the given map display. More... | |
| ~Selection () | |
| Destructor. More... | |
AbstractTool Methods | |
Methods related with tool behavior. | |
| bool | mousePressEvent (QMouseEvent *e) |
| bool | mouseMoveEvent (QMouseEvent *e) |
| bool | mouseReleaseEvent (QMouseEvent *e) |
AbstractTool Methods | |
Methods related with tool behavior. | |
| virtual bool | eventFilter (QObject *watched, QEvent *e) |
| virtual bool | mouseDoubleClickEvent (QMouseEvent *e) |
Protected Attributes | |
| QBrush | m_brush |
| The brush used to draw the rubber band shape. More... | |
| QCursor | m_cursor |
| The default tool cursor. More... | |
| MapDisplay * | m_display |
| The map display associated with the tool. More... | |
| QPoint | m_origin |
| Origin point on mouse pressed. More... | |
| QPen | m_pen |
| The pen used to draw the rubber band shape. More... | |
| QRectF | m_rect |
| The boundary rectangle managed by the rubber band. More... | |
Private Member Functions | |
| void | executeSelection (const te::map::AbstractLayerPtr &layer, const te::gm::Envelope &e) |
Private Attributes | |
| bool | m_keepPreviousSelection |
| Flag that indicates if the tool must keep the previous selection. More... | |
| std::list < te::map::AbstractLayerPtr > | m_layers |
| The layer list that will be selected. More... | |
| bool | m_selectionByPointing |
| Flag that indicates if the selection is by pointing. More... | |
| bool | m_selectionStarted |
| Flag that indicates if selection operation was started. More... | |
This class implements a concrete tool to select layer features using an extent.
Definition at line 63 of file Selection.h.
| Selection::Selection | ( | MapDisplay * | display, |
| const QCursor & | cursor, | ||
| const std::list< te::map::AbstractLayerPtr > & | layers, | ||
| QObject * | parent = 0 |
||
| ) |
It constructs a selection tool associated with the given map display.
| display | The map display associated with the tool. |
| cursor | The tool cursor. |
| layer | The layer list that will be selected. |
| parent | The tool's parent. |
Definition at line 53 of file Selection.cpp.
References te::map::DashLine, te::qt::widgets::RubberBand::m_brush, te::qt::widgets::RubberBand::m_pen, and te::qt::widgets::AbstractTool::setCursor().
| Selection::~Selection | ( | ) |
Destructor.
Definition at line 69 of file Selection.cpp.
|
virtualinherited |
Filters events if this object has been installed as an event filter for the watched object.
| watched | The watched object. |
| event | The last event sent to watched object. |
Reimplemented in te::qt::widgets::ZoomKeyboard, and te::qt::widgets::ZoomWheel.
Definition at line 50 of file AbstractTool.cpp.
Referenced by te::qt::widgets::ZoomKeyboard::eventFilter(), and te::qt::widgets::ZoomWheel::eventFilter().
|
private |
Definition at line 144 of file Selection.cpp.
References te::da::ObjectIdSet::clone(), te::da::GenerateOID(), te::gm::Envelope::getCenter(), te::da::GetEmptyOIDSet(), te::da::GetFirstGeomProperty(), te::gm::GetGeomFromEnvelope(), te::dt::Property::getName(), te::da::GetOIDPropertyNames(), te::gm::INTERSECTS, te::gm::Envelope::intersects(), te::da::ObjectIdSet::symDifference(), TE_UNKNOWN_SRS, te::gm::Envelope::transform(), te::map::VISIBLE, te::gm::Coord2D::x, and te::gm::Coord2D::y.
|
signal |
This signal is emitted when the layer selection changed.
|
virtualinherited |
This event handler can be reimplemented in a concrete tool class to receive mouse double click events for the watched object.
| e | The mouse event. |
Reimplemented in te::qt::widgets::Measure, and te::qt::widgets::PolygonAcquire.
Definition at line 93 of file AbstractTool.cpp.
|
virtual |
This event handler can be reimplemented in a concrete tool class to receive mouse move events for the watched object.
| e | The mouse event. |
Reimplemented from te::qt::widgets::RubberBand.
Definition at line 84 of file Selection.cpp.
References te::qt::widgets::RubberBand::mouseMoveEvent().
|
virtual |
This event handler can be reimplemented in a concrete tool class to receive mouse press events for the watched object.
| e | The mouse event. |
Reimplemented from te::qt::widgets::RubberBand.
Definition at line 73 of file Selection.cpp.
References te::qt::widgets::RubberBand::mousePressEvent().
|
virtual |
This event handler can be reimplemented in a concrete tool class to receive mouse release events for the watched object.
| e | The mouse event. |
Reimplemented from te::qt::widgets::RubberBand.
Definition at line 92 of file Selection.cpp.
References te::qt::widgets::RubberBand::mouseReleaseEvent().
|
virtualinherited |
It sets the tool cursor.
| cursor | The cursor that will be used during the tool operation. |
Definition at line 98 of file AbstractTool.cpp.
Referenced by te::qt::widgets::ExtentAcquire::ExtentAcquire(), te::qt::widgets::Info::Info(), te::qt::widgets::Measure::Measure(), te::qt::widgets::Pan::Pan(), te::qt::widgets::PanExtent::PanExtent(), te::qt::widgets::PointPicker::PointPicker(), Selection(), te::qt::widgets::ZoomArea::ZoomArea(), and te::qt::widgets::ZoomClick::ZoomClick().
|
slot |
Definition at line 139 of file Selection.cpp.
|
protectedinherited |
The brush used to draw the rubber band shape.
Definition at line 95 of file RubberBand.h.
Referenced by te::qt::widgets::RubberBand::RubberBand(), and Selection().
|
protectedinherited |
The default tool cursor.
Definition at line 161 of file AbstractTool.h.
|
protectedinherited |
The map display associated with the tool.
Definition at line 160 of file AbstractTool.h.
Referenced by te::qt::widgets::AbstractTool::AbstractTool(), te::qt::widgets::CoordTracking::CoordTracking(), te::qt::widgets::Measure::Measure(), te::qt::widgets::PolygonAcquire::PolygonAcquire(), and te::qt::widgets::ZoomKeyboard::ZoomKeyboard().
|
private |
Flag that indicates if the tool must keep the previous selection.
Definition at line 121 of file Selection.h.
|
private |
The layer list that will be selected.
Definition at line 119 of file Selection.h.
|
protectedinherited |
Origin point on mouse pressed.
Definition at line 92 of file RubberBand.h.
|
protectedinherited |
The pen used to draw the rubber band shape.
Definition at line 94 of file RubberBand.h.
Referenced by te::qt::widgets::RubberBand::RubberBand(), and Selection().
|
protectedinherited |
The boundary rectangle managed by the rubber band.
Definition at line 93 of file RubberBand.h.
|
private |
Flag that indicates if the selection is by pointing.
Definition at line 122 of file Selection.h.
|
private |
Flag that indicates if selection operation was started.
Definition at line 120 of file Selection.h.