te::qt::widgets::ExtentAcquire Class Reference

This class implements a concrete tool to define a boundary rectangle. More...

#include <ExtentAcquire.h>

Inheritance diagram for te::qt::widgets::ExtentAcquire:
te::qt::widgets::RubberBand te::qt::widgets::AbstractTool QObject

Public Member Functions

virtual void setCursor (const QCursor &cursor)
 It sets the tool cursor. More...
 
Initializer Methods

Methods related to instantiation and destruction.

 ExtentAcquire (MapDisplay *display, const QCursor &cursor, QObject *parent=0)
 It constructs a extent acquire tool associated with the given map display and with the specified cursor. More...
 
 ~ExtentAcquire ()
 Destructor. More...
 
AbstractTool Methods

Methods related with tool behavior.

bool mousePressEvent (QMouseEvent *e)
 This event handler can be reimplemented in a concrete tool class to receive mouse press events for the watched object. More...
 
bool mouseMoveEvent (QMouseEvent *e)
 This event handler can be reimplemented in a concrete tool class to receive mouse move events for the watched object. More...
 
bool mouseReleaseEvent (QMouseEvent *e)
 This event handler can be reimplemented in a concrete tool class to receive mouse release events for the watched object. More...
 
AbstractTool Methods

Methods related with tool behavior.

virtual bool eventFilter (QObject *watched, QEvent *e)
 Filters events if this object has been installed as an event filter for the watched object. More...
 
virtual bool mouseDoubleClickEvent (QMouseEvent *e)
 This event handler can be reimplemented in a concrete tool class to receive mouse double click events for the watched object. More...
 
virtual bool keyPressEvent (QKeyEvent *e)
 This event handler can be reimplemented in a concrete tool class to receive key press events for the watched object. More...
 

Protected Attributes

QBrush m_brush
 The brush used to draw the rubber band shape. More...
 
QCursor m_curCursor
 The current mapdisplay cursor. More...
 
QCursor m_cursor
 The default tool cursor. More...
 
MapDisplaym_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 Attributes

bool m_started
 Flag that indicates if operation was started. More...
 

Copy Constructor and Assignment Operator

Copy constructor and assignment operator not allowed.

 ExtentAcquire (const ExtentAcquire &rhs)
 Copy constructor not allowed. More...
 
ExtentAcquireoperator= (const ExtentAcquire &rhs)
 Assignment operator not allowed. More...
 
void extentAcquired (te::gm::Envelope env)
 

Detailed Description

This class implements a concrete tool to define a boundary rectangle.

Definition at line 50 of file ExtentAcquire.h.

Constructor & Destructor Documentation

te::qt::widgets::ExtentAcquire::ExtentAcquire ( MapDisplay display,
const QCursor &  cursor,
QObject parent = 0 
)

It constructs a extent acquire tool associated with the given map display and with the specified cursor.

Parameters
displayThe map display associated with the tool.
cursorThe tool cursor.
parentThe tool's parent.
Note
The tool will NOT take the ownership of the given pointers.
If the given cursor is different of Qt::BlankCursor, it will be setted on map display.

Definition at line 34 of file ExtentAcquire.cpp.

References te::qt::widgets::AbstractTool::setCursor(), and ~ExtentAcquire().

te::qt::widgets::ExtentAcquire::~ExtentAcquire ( )
default

Destructor.

Referenced by ExtentAcquire().

te::qt::widgets::ExtentAcquire::ExtentAcquire ( const ExtentAcquire rhs)
private

Copy constructor not allowed.

Parameters
rhsThe right-hand-side copy that would be used to copy from.

Member Function Documentation

bool te::qt::widgets::AbstractTool::eventFilter ( QObject watched,
QEvent e 
)
virtualinherited

Filters events if this object has been installed as an event filter for the watched object.

Parameters
watchedThe watched object.
eventThe last event sent to watched object.
Note
In your reimplementation of this function, if you want to filter the event out, i.e. stop it being handled further, return true; otherwise return false.
Here, the default implementation looks for QMouseEvents and call the pure virutal methods defined on AbstractTool class, e.g. mousePressEvent().

Reimplemented in te::edit::GeometriesUpdateTool, te::qt::widgets::ZoomKeyboard, and te::qt::widgets::ZoomWheel.

Definition at line 50 of file AbstractTool.cpp.

References te::qt::widgets::AbstractTool::keyPressEvent(), te::qt::widgets::AbstractTool::m_cursor, te::qt::widgets::AbstractTool::m_display, te::qt::widgets::AbstractTool::mouseDoubleClickEvent(), te::qt::widgets::AbstractTool::mouseMoveEvent(), te::qt::widgets::AbstractTool::mousePressEvent(), and te::qt::widgets::AbstractTool::mouseReleaseEvent().

Referenced by te::qt::widgets::ZoomKeyboard::eventFilter(), te::qt::widgets::ZoomWheel::eventFilter(), and te::edit::GeometriesUpdateTool::eventFilter().

void te::qt::widgets::ExtentAcquire::extentAcquired ( te::gm::Envelope  env)
signal

This signal is emitted when a envelope was acquired.

Referenced by mouseReleaseEvent().

bool te::qt::widgets::AbstractTool::keyPressEvent ( QKeyEvent *  e)
virtualinherited

This event handler can be reimplemented in a concrete tool class to receive key press events for the watched object.

Parameters
eThe key event.
Returns
If you want to filter the event out, i.e. stop it being handled further, return true; otherwise return false.

Reimplemented in te::qt::widgets::Measure.

Definition at line 101 of file AbstractTool.cpp.

Referenced by te::qt::widgets::AbstractTool::eventFilter().

bool te::qt::widgets::AbstractTool::mouseDoubleClickEvent ( QMouseEvent *  e)
virtualinherited

This event handler can be reimplemented in a concrete tool class to receive mouse double click events for the watched object.

Parameters
eThe mouse event.
Returns
If you want to filter the event out, i.e. stop it being handled further, return true; otherwise return false.
Note
The AbstractTool will also receive mouse press and mouse release events in addition to the double click event. It is up to the developer to ensure that the application interprets these events correctly.

Reimplemented in te::edit::VertexTool, te::qt::widgets::Measure, te::edit::SplitPolygonTool, te::edit::CreatePolygonTool, te::edit::CreateLineTool, te::edit::CreatePointTool, te::qt::widgets::PolygonAcquire, te::edit::AggregateAreaTool, te::edit::SubtractAreaTool, and te::mnt::ProfileTools.

Definition at line 96 of file AbstractTool.cpp.

Referenced by te::qt::widgets::AbstractTool::eventFilter().

bool te::qt::widgets::ExtentAcquire::mouseMoveEvent ( QMouseEvent *  e)
virtual

This event handler can be reimplemented in a concrete tool class to receive mouse move events for the watched object.

Parameters
eThe mouse event.
Returns
If you want to filter the event out, i.e. stop it being handled further, return true; otherwise return false.

Reimplemented from te::qt::widgets::RubberBand.

Definition at line 54 of file ExtentAcquire.cpp.

References m_started, and te::qt::widgets::RubberBand::mouseMoveEvent().

bool te::qt::widgets::ExtentAcquire::mousePressEvent ( QMouseEvent *  e)
virtual

This event handler can be reimplemented in a concrete tool class to receive mouse press events for the watched object.

Parameters
eThe mouse event.
Returns
If you want to filter the event out, i.e. stop it being handled further, return true; otherwise return false.

Reimplemented from te::qt::widgets::RubberBand.

Definition at line 43 of file ExtentAcquire.cpp.

References te::qt::widgets::RubberBand::m_rect, m_started, and te::qt::widgets::RubberBand::mousePressEvent().

bool te::qt::widgets::ExtentAcquire::mouseReleaseEvent ( QMouseEvent *  e)
virtual

This event handler can be reimplemented in a concrete tool class to receive mouse release events for the watched object.

Parameters
eThe mouse event.
Returns
If you want to filter the event out, i.e. stop it being handled further, return true; otherwise return false.

Reimplemented from te::qt::widgets::RubberBand.

Definition at line 62 of file ExtentAcquire.cpp.

References extentAcquired(), te::qt::widgets::AbstractTool::m_display, te::qt::widgets::RubberBand::m_origin, te::qt::widgets::RubberBand::m_rect, m_started, te::qt::widgets::RubberBand::mouseReleaseEvent(), and te::qt::widgets::MapDisplay::transform().

ExtentAcquire& te::qt::widgets::ExtentAcquire::operator= ( const ExtentAcquire rhs)
private

Assignment operator not allowed.

Parameters
rhsThe right-hand-side copy that would be used to copy from.
Returns
A reference to this object.

Member Data Documentation

QBrush te::qt::widgets::RubberBand::m_brush
protectedinherited

The brush used to draw the rubber band shape.

Definition at line 95 of file RubberBand.h.

Referenced by te::qt::widgets::RubberBand::mouseMoveEvent(), te::qt::widgets::RubberBand::RubberBand(), and te::qt::widgets::Selection::Selection().

QCursor te::qt::widgets::AbstractTool::m_curCursor
protectedinherited
QCursor te::qt::widgets::AbstractTool::m_cursor
protectedinherited
MapDisplay* te::qt::widgets::AbstractTool::m_display
protectedinherited

The map display associated with the tool.

Definition at line 171 of file AbstractTool.h.

Referenced by te::qt::widgets::AbstractTool::AbstractTool(), te::qt::widgets::Zoom::applyZoom(), te::edit::MergeGeometriesTool::buildEnvelope(), te::edit::EditInfoTool::buildEnvelope(), te::qt::widgets::PointMove::buildEnvelope(), te::edit::SubtractAreaTool::buildEnvelope(), te::edit::RotateGeometryTool::buildEnvelope(), te::edit::DeleteGeometryTool::buildEnvelope(), te::edit::DeletePartTool::buildEnvelope(), te::edit::AggregateAreaTool::buildEnvelope(), te::edit::MoveGeometryTool::buildEnvelope(), te::edit::DeleteGeometryByAreaTool::buildEnvelope(), te::edit::VertexTool::buildEnvelope(), te::edit::CreateLineTool::buildLine(), te::edit::CreatePointTool::buildPoint(), te::edit::SubtractAreaTool::buildPolygon(), te::edit::AggregateAreaTool::buildPolygon(), te::edit::DeleteGeometryByAreaTool::buildPolygon(), te::edit::CreatePolygonTool::buildPolygon(), te::qt::widgets::PolygonAcquire::clear(), te::qt::widgets::Measure::clear(), te::qt::widgets::CoordTracking::CoordTracking(), te::edit::CreateLineTool::CreateLineTool(), te::edit::CreatePolygonTool::CreatePolygonTool(), te::edit::MergeGeometriesTool::draw(), te::edit::EditInfoTool::draw(), te::edit::SubtractAreaTool::draw(), te::qt::widgets::PointMove::draw(), te::edit::AggregateAreaTool::draw(), te::edit::RotateGeometryTool::draw(), te::edit::CreatePointTool::draw(), te::edit::DeleteGeometryByAreaTool::draw(), te::edit::CreateLineTool::draw(), te::edit::CreatePolygonTool::draw(), te::edit::MoveGeometryTool::draw(), te::edit::SplitPolygonTool::draw(), te::edit::VertexTool::draw(), te::qt::widgets::PanExtent::drawCurrentExtent(), SelectionTool::drawGeometries(), te::qt::widgets::PolygonAcquire::drawGeometry(), te::qt::widgets::Measure::drawGeometry(), te::edit::MergeGeometriesTool::editingFinished(), te::edit::SubtractAreaTool::editingFinished(), te::edit::AggregateAreaTool::editingFinished(), te::qt::widgets::ZoomKeyboard::eventFilter(), te::qt::widgets::ZoomWheel::eventFilter(), te::qt::widgets::AbstractTool::eventFilter(), te::qt::widgets::Selection::executeSelection(), te::edit::DeleteGeometryByAreaTool::executeSelection(), te::edit::MergeGeometriesTool::getBaseOID(), te::edit::MergeGeometriesTool::getRefEnvelope(), te::qt::widgets::Measure::Measure(), te::edit::SubtractAreaTool::mouseDoubleClickEvent(), te::edit::AggregateAreaTool::mouseDoubleClickEvent(), te::qt::widgets::PolygonAcquire::mouseDoubleClickEvent(), te::edit::CreatePolygonTool::mouseDoubleClickEvent(), te::edit::VertexTool::mouseDoubleClickEvent(), te::qt::plugins::mnt::ShowValuesTool::mouseMoveEvent(), te::qt::widgets::PanMiddleClick::mouseMoveEvent(), te::qt::widgets::ZoomClick::mouseMoveEvent(), te::qt::widgets::Pan::mouseMoveEvent(), te::qt::widgets::CoordTracking::mouseMoveEvent(), te::qt::widgets::PointMove::mouseMoveEvent(), te::qt::widgets::PointPicker::mouseMoveEvent(), te::qt::widgets::RubberBand::mouseMoveEvent(), te::qt::widgets::Zoom::mouseMoveEvent(), te::qt::widgets::PanExtent::mouseMoveEvent(), te::qt::widgets::PolygonAcquire::mouseMoveEvent(), te::edit::CreateLineTool::mouseMoveEvent(), te::edit::DeleteGeometryByAreaTool::mouseMoveEvent(), te::edit::CreatePolygonTool::mouseMoveEvent(), te::edit::MoveGeometryTool::mouseMoveEvent(), te::qt::widgets::Measure::mouseMoveEvent(), te::edit::VertexTool::mouseMoveEvent(), te::edit::EditInfoTool::mousePressEvent(), te::qt::widgets::ZoomLeftAndRightClick::mousePressEvent(), te::qt::widgets::PanMiddleClick::mousePressEvent(), te::qt::widgets::Pan::mousePressEvent(), te::qt::widgets::ZoomClick::mousePressEvent(), te::qt::widgets::PointPicker::mousePressEvent(), te::qt::widgets::PanExtent::mousePressEvent(), te::qt::widgets::PolygonAcquire::mousePressEvent(), te::edit::CreateLineTool::mousePressEvent(), te::edit::CreatePointTool::mousePressEvent(), te::edit::DeleteGeometryTool::mousePressEvent(), te::edit::DeletePartTool::mousePressEvent(), te::edit::MoveGeometryTool::mousePressEvent(), te::edit::DeleteGeometryByAreaTool::mousePressEvent(), te::edit::CreatePolygonTool::mousePressEvent(), te::qt::widgets::Measure::mousePressEvent(), te::qt::widgets::ReadPixelTool::mouseReleaseEvent(), SelectionTool::mouseReleaseEvent(), ReadPixelTool::mouseReleaseEvent(), te::mnt::ProfileTools::mouseReleaseEvent(), te::edit::SubtractAreaTool::mouseReleaseEvent(), te::qt::widgets::PanMiddleClick::mouseReleaseEvent(), te::qt::widgets::ZoomArea::mouseReleaseEvent(), te::qt::widgets::Pan::mouseReleaseEvent(), te::qt::widgets::ZoomClick::mouseReleaseEvent(), te::qt::widgets::PointMove::mouseReleaseEvent(), te::qt::widgets::RubberBand::mouseReleaseEvent(), te::qt::widgets::PointPicker::mouseReleaseEvent(), mouseReleaseEvent(), te::qt::widgets::Zoom::mouseReleaseEvent(), te::edit::AggregateAreaTool::mouseReleaseEvent(), te::edit::CreatePolygonTool::mouseReleaseEvent(), te::qt::widgets::Selection::mouseReleaseEvent(), te::qt::widgets::Info::mouseReleaseEvent(), te::qt::widgets::Measure::onExtentChanged(), te::edit::MergeGeometriesTool::pickFeature(), te::edit::EditInfoTool::pickFeature(), te::edit::SubtractAreaTool::pickFeature(), te::edit::RotateGeometryTool::pickFeature(), te::edit::AggregateAreaTool::pickFeature(), te::edit::MoveGeometryTool::pickFeature(), te::edit::VertexTool::pickFeature(), te::edit::SplitPolygonTool::pickFeatures(), te::qt::widgets::PolygonAcquire::PolygonAcquire(), SelectionTool::SelectionTool(), te::edit::GeometriesUpdateTool::setCursor(), te::qt::widgets::AbstractTool::setCursor(), te::edit::SplitPolygonTool::splitPolygon(), te::edit::SubtractAreaTool::storeUndoCommand(), te::edit::AggregateAreaTool::storeUndoCommand(), te::edit::MoveGeometryTool::storeUndoCommand(), te::edit::CreatePolygonTool::storeUndoCommand(), te::edit::VertexTool::storeUndoCommand(), te::qt::widgets::ZoomKeyboard::ZoomKeyboard(), te::qt::widgets::AbstractTool::~AbstractTool(), te::qt::widgets::Info::~Info(), te::qt::widgets::Measure::~Measure(), te::qt::widgets::PolygonAcquire::~PolygonAcquire(), and SelectionTool::~SelectionTool().

QPoint te::qt::widgets::RubberBand::m_origin
protectedinherited
QPen te::qt::widgets::RubberBand::m_pen
protectedinherited

The pen used to draw the rubber band shape.

Definition at line 94 of file RubberBand.h.

Referenced by te::qt::widgets::RubberBand::mouseMoveEvent(), te::qt::widgets::RubberBand::RubberBand(), and te::qt::widgets::Selection::Selection().

bool te::qt::widgets::ExtentAcquire::m_started
private

Flag that indicates if operation was started.

Definition at line 123 of file ExtentAcquire.h.

Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().


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