te::mnt::ProfileTools Class Reference

#include <ProfileTools.h>

Inheritance diagram for te::mnt::ProfileTools:
te::edit::VertexTool te::edit::GeometriesUpdateTool te::qt::widgets::AbstractTool QObject

Public Types

enum  StageType {
  FEATURE_SELECTION, VERTEX_SEARCH, VERTEX_FOUND, VERTEX_MOVING,
  VERTEX_READY_TO_ADD
}
 Defines the operation stage to this tool. More...
 

Signals

void geometriesEdited ()
 
void geometriesStarted ()
 
void toolDeleted ()
 

Public Member Functions

void disableMouseEvent (QMouseEvent::Type mEvent)
 
std::string getLayerId ()
 
std::vector< te::gm::LineString * > getLines ()
 
EditType getType ()
 
bool isInUse () const
 
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...
 
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 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 mouseReleaseEvent (QMouseEvent *e)
 This event handler can be reimplemented in a concrete tool class to receive mouse release events for the watched object. More...
 
 ProfileTools (te::qt::widgets::MapDisplay *display, const te::map::AbstractLayerPtr &layer, QObject *parent=0)
 
void resetVisualizationTool ()
 
void setInUse (const bool &status)
 
void setLayer (te::map::AbstractLayer *layer)
 
void setLines (std::vector< te::gm::LineString * > &l)
 
void setType (EditType t)
 
void updateRepository ()
 
 ~ProfileTools ()
 
AbstractTool Methods

Methods related with tool behavior.

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 Member Functions

te::gm::Envelope buildEnvelope (const QPointF &pos)
 
void pickFeature (const te::map::AbstractLayerPtr &layer, const te::gm::Envelope &env)
 
void setCursor (const QCursor &cursor)
 It sets the tool cursor. More...
 
void setStage (StageType stage)
 
void updateCursor ()
 
void updateRTree ()
 

Protected Attributes

QCursor m_curCursor
 The current mapdisplay cursor. More...
 
StageType m_currentStage
 
VertexIndex m_currentVertexIndex
 
QCursor m_cursor
 The default tool cursor. More...
 
MapDisplaym_display
 The map display associated with the tool. More...
 
Feature * m_feature
 
bool m_fixGeometry
 
bool m_isEdited
 
bool m_isInUse
 
te::map::AbstractLayerm_layer
 
std::vector< te::gm::LineString * > m_lines
 
QMouseEvent::Type m_mEvent
 
te::sam::rtree::Index< VertexIndex, 8 > m_rtree
 
UndoStackManager & m_stack
 
EditType m_type
 

Detailed Description

Definition at line 54 of file ProfileTools.h.

Member Enumeration Documentation

Defines the operation stage to this tool.

Enumerator
FEATURE_SELECTION 

Selection of feature.

VERTEX_SEARCH 

Search of vertex.

VERTEX_FOUND 

Vertex found.

VERTEX_MOVING 

Vertex movement.

VERTEX_READY_TO_ADD 

Vertex add.

Definition at line 85 of file VertexTool.h.

Constructor & Destructor Documentation

te::mnt::ProfileTools::ProfileTools ( te::qt::widgets::MapDisplay display,
const te::map::AbstractLayerPtr layer,
QObject parent = 0 
)

Definition at line 30 of file ProfileTools.cpp.

References te::edit::VertexTool::pickFeature().

te::mnt::ProfileTools::~ProfileTools ( )

Definition at line 37 of file ProfileTools.cpp.

References te::edit::VertexTool::m_lines.

Member Function Documentation

void te::edit::GeometriesUpdateTool::disableMouseEvent ( QMouseEvent::Type  mEvent)
inherited

Definition at line 82 of file GeometriesUpdateTool.cpp.

References te::edit::GeometriesUpdateTool::m_mEvent.

void te::edit::GeometriesUpdateTool::geometriesStarted ( )
signalinherited
std::string te::edit::GeometriesUpdateTool::getLayerId ( )
inherited
std::vector<te::gm::LineString*> te::mnt::ProfileTools::getLines ( )
inline

Definition at line 69 of file ProfileTools.h.

EditType te::mnt::ProfileTools::getType ( )
inline

Definition at line 65 of file ProfileTools.h.

bool te::edit::GeometriesUpdateTool::isInUse ( ) const
inherited
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::mnt::ProfileTools::mouseDoubleClickEvent ( QMouseEvent *  e)
virtual

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 from te::edit::VertexTool.

Definition at line 245 of file ProfileTools.cpp.

References m_type, te::edit::VertexTool::mouseDoubleClickEvent(), te::edit::VertexTool::setStage(), VERTEX_ADD, and te::edit::VertexTool::VERTEX_READY_TO_ADD.

bool te::mnt::ProfileTools::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::edit::VertexTool.

Definition at line 120 of file ProfileTools.cpp.

References LINE_DELETE, LINE_INVERT, te::edit::GeometriesUpdateTool::m_feature, m_type, and te::edit::VertexTool::mouseMoveEvent().

bool te::mnt::ProfileTools::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::edit::VertexTool.

Definition at line 109 of file ProfileTools.cpp.

References m_type, te::edit::VertexTool::mousePressEvent(), VERTEX_ADD, and VERTEX_DELETE.

bool te::mnt::ProfileTools::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::edit::VertexTool.

Definition at line 130 of file ProfileTools.cpp.

References te::edit::VertexTool::buildEnvelope(), te::qt::widgets::Config2DrawPoints(), te::edit::VertexTool::FEATURE_SELECTION, te::edit::GeometriesUpdateTool::geometriesEdited(), te::qt::widgets::MapDisplay::getDisplayPixmap(), te::map::MapDisplay::getExtent(), te::map::AbstractLayer::getId(), te::common::Singleton< RepositoryManager >::getInstance(), te::gm::Envelope::getLowerLeftX(), te::gm::Envelope::getLowerLeftY(), te::edit::GetPosition(), te::color::RGBAColor::getRgba(), te::map::AbstractLayer::getSRID(), te::gm::Envelope::getUpperRightX(), te::gm::Envelope::getUpperRightY(), LINE_DELETE, LINE_INVERT, te::gm::LineStringType, te::edit::VertexTool::m_currentStage, te::qt::widgets::AbstractTool::m_display, te::edit::GeometriesUpdateTool::m_layer, te::edit::VertexTool::m_lines, te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, m_type, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::edit::VertexTool::mouseReleaseEvent(), te::gm::LineString::setPoint(), te::edit::VertexTool::setStage(), te::qt::widgets::Canvas::setWindow(), te::map::SolidLine, te::edit::VertexTool::updateRTree(), VERTEX_ADD, te::edit::VertexTool::VERTEX_SEARCH, te::gm::Coord2D::x, and te::gm::Coord2D::y.

void te::edit::GeometriesUpdateTool::setInUse ( const bool status)
inherited
void te::edit::GeometriesUpdateTool::setLayer ( te::map::AbstractLayer layer)
inherited
void te::mnt::ProfileTools::setLines ( std::vector< te::gm::LineString * > &  l)
void te::mnt::ProfileTools::setType ( EditType  t)
void te::edit::GeometriesUpdateTool::toolDeleted ( )
signalinherited

Member Data Documentation

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::RubberBand::mouseMoveEvent(), te::qt::widgets::PointMove::mouseMoveEvent(), te::qt::widgets::PointPicker::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::CreatePolygonTool::mousePressEvent(), te::edit::MoveGeometryTool::mousePressEvent(), te::edit::DeleteGeometryByAreaTool::mousePressEvent(), te::qt::widgets::Measure::mousePressEvent(), te::qt::widgets::ReadPixelTool::mouseReleaseEvent(), SelectionTool::mouseReleaseEvent(), ReadPixelTool::mouseReleaseEvent(), 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::PointPicker::mouseReleaseEvent(), te::qt::widgets::PointMove::mouseReleaseEvent(), te::qt::widgets::RubberBand::mouseReleaseEvent(), te::qt::widgets::ExtentAcquire::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().

Feature* te::edit::GeometriesUpdateTool::m_feature
protectedinherited

Definition at line 102 of file GeometriesUpdateTool.h.

Referenced by te::edit::SubtractAreaTool::buildPolygon(), te::edit::AggregateAreaTool::buildPolygon(), te::edit::SubtractAreaTool::clear(), te::edit::AggregateAreaTool::clear(), te::edit::CreatePolygonTool::clear(), te::edit::CreateLineTool::clear(), te::edit::MergeGeometriesTool::draw(), te::edit::EditInfoTool::draw(), te::edit::RotateGeometryTool::draw(), te::edit::VertexTool::draw(), te::edit::SubtractAreaTool::drawPolygon(), te::edit::AggregateAreaTool::drawPolygon(), te::edit::MergeGeometriesTool::editingFinished(), te::edit::SubtractAreaTool::editingFinished(), te::edit::AggregateAreaTool::editingFinished(), te::edit::CreatePolygonTool::editingFinished(), te::edit::DeleteGeometryByAreaTool::executeSelection(), te::edit::EditInfoTool::getInfo(), mouseMoveEvent(), te::edit::RotateGeometryTool::mouseMoveEvent(), te::edit::VertexTool::mouseMoveEvent(), te::edit::EditInfoTool::mousePressEvent(), te::edit::RotateGeometryTool::mousePressEvent(), te::edit::DeleteGeometryTool::mousePressEvent(), te::edit::DeletePartTool::mousePressEvent(), te::edit::MoveGeometryTool::mousePressEvent(), te::edit::VertexTool::mouseReleaseEvent(), te::edit::CreatePolygonTool::onCommandFeedback(), te::edit::VertexTool::onCommandFeedback(), te::edit::EditInfoTool::onOkPushButtonPressed(), 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::RotateGeometryTool::reset(), te::edit::MoveGeometryTool::reset(), te::edit::VertexTool::reset(), te::edit::GeometriesUpdateTool::resetVisualizationTool(), te::edit::MoveGeometryTool::resetVisualizationTool(), te::edit::VertexTool::resetVisualizationTool(), te::edit::MergeGeometriesTool::storeFeature(), te::edit::EditInfoTool::storeFeature(), te::edit::SubtractAreaTool::storeFeature(), te::edit::AggregateAreaTool::storeFeature(), te::edit::DeleteGeometryTool::storeFeature(), te::edit::RotateGeometryTool::storeFeature(), te::edit::DeletePartTool::storeFeature(), te::edit::CreatePointTool::storeFeature(), te::edit::CreateLineTool::storeFeature(), te::edit::DeleteGeometryByAreaTool::storeFeature(), te::edit::CreatePolygonTool::storeFeature(), te::edit::VertexTool::storeFeature(), te::edit::SubtractAreaTool::storeUndoCommand(), te::edit::AggregateAreaTool::storeUndoCommand(), te::edit::CreatePolygonTool::storeUndoCommand(), and te::edit::VertexTool::storeUndoCommand().

bool te::edit::VertexTool::m_fixGeometry
protectedinherited

Definition at line 156 of file VertexTool.h.

Referenced by te::edit::VertexTool::mouseReleaseEvent().

bool te::edit::GeometriesUpdateTool::m_isInUse
protectedinherited
te::map::AbstractLayer* te::edit::GeometriesUpdateTool::m_layer
protectedinherited

Definition at line 103 of file GeometriesUpdateTool.h.

Referenced by te::edit::DeleteGeometryByAreaTool::buildPolygon(), te::edit::MergeGeometriesTool::draw(), te::edit::EditInfoTool::draw(), te::edit::SubtractAreaTool::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::edit::MergeGeometriesTool::editingFinished(), te::edit::SplitPolygonTool::editingFinished(), te::edit::DeleteGeometryByAreaTool::executeSelection(), te::edit::EditInfoTool::getInfo(), te::edit::GeometriesUpdateTool::getLayerId(), te::edit::MergeGeometriesTool::getRefEnvelope(), te::edit::EditInfoTool::mousePressEvent(), te::edit::DeleteGeometryTool::mousePressEvent(), te::edit::DeletePartTool::mousePressEvent(), te::edit::MoveGeometryTool::mousePressEvent(), mouseReleaseEvent(), te::edit::VertexTool::mouseReleaseEvent(), te::edit::CreatePolygonTool::onCommandFeedback(), te::edit::SubtractAreaTool::pickFeature(), te::edit::RotateGeometryTool::pickFeature(), te::edit::AggregateAreaTool::pickFeature(), te::edit::MoveGeometryTool::pickFeature(), te::edit::SplitPolygonTool::pickFeatures(), te::edit::SplitPolygonTool::resetVisualizationTool(), te::edit::GeometriesUpdateTool::setLayer(), te::edit::SplitPolygonTool::splitPolygon(), te::edit::MergeGeometriesTool::storeFeature(), te::edit::EditInfoTool::storeFeature(), te::edit::SubtractAreaTool::storeFeature(), te::edit::AggregateAreaTool::storeFeature(), te::edit::DeleteGeometryTool::storeFeature(), te::edit::RotateGeometryTool::storeFeature(), te::edit::DeletePartTool::storeFeature(), te::edit::CreatePointTool::storeFeature(), te::edit::CreateLineTool::storeFeature(), te::edit::DeleteGeometryByAreaTool::storeFeature(), te::edit::MoveGeometryTool::storeFeature(), te::edit::CreatePolygonTool::storeFeature(), te::edit::VertexTool::storeFeature(), te::edit::SubtractAreaTool::storeUndoCommand(), te::edit::AggregateAreaTool::storeUndoCommand(), te::edit::MoveGeometryTool::storeUndoCommand(), te::edit::CreatePolygonTool::storeUndoCommand(), te::edit::VertexTool::storeUndoCommand(), te::edit::MoveGeometryTool::updateCursor(), updateRepository(), te::edit::MergeGeometriesTool::~MergeGeometriesTool(), and te::edit::SplitPolygonTool::~SplitPolygonTool().

QMouseEvent::Type te::edit::GeometriesUpdateTool::m_mEvent
protectedinherited
UndoStackManager& te::edit::VertexTool::m_stack
protectedinherited
EditType te::mnt::ProfileTools::m_type
protected

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