/** ** ** @RDE_HEADER@ ** Definition of base class for rubberband handles ** $Id$ ** $HeadURL$ ** $Author$ ** ** ----------------------------------------------------------------------------------------------- ** ** Hardware-Environment: Intel-PC ** Software-Environment: Windows 7, Qt 5.4. ArcGIS 10.2.5 ** ** Language ........: C++ 11 ** ** ----------------------------------------------------------------------------------------------- ** ** Author ...........: Jörg Turla, SPD G, Tel. 3132 ** ** ----------------------------------------------------------------------------------------------- ** ** Notes .........: ** ** 27.03.2015, JT : First edition for use with Qt5 ** ** ----------------------------------------------------------------------------------------------- */ #pragma once #include #include #include "rubberband_handle.h" class QGraphicsItem; class QGraphicsScene; namespace SituationMap { namespace RB { /** @class RubberbandLineHandle rubberband_line_handle.h @brief Implementation of a line handle for rubberband internal use. @see RubberbandHandle */ class RubberbandLineHandle : public RubberbandHandle { Q_OBJECT public: RubberbandLineHandle( Esri::ArcGISRuntime::MapGraphicsView * mapView ,QGraphicsScene * scene , const QPointF & p1, const QPointF & p2, unsigned int lineWidth = 2, bool dottedLine = false ); ~RubberbandLineHandle(); bool isPositionInside( const QPointF & scenePosition ) const override; virtual void updateCoordinates( const QVector & scenePositionVector ); virtual void updateCoordinate( unsigned index, const QPointF & scenePosition ); virtual QVector getCoordinates() const; virtual RubberbandCoordinate getCoordinate( unsigned index ) const; void dottedLine(bool on = true) { _dottedLine = on; } protected: QGraphicsItem * _lineSymbol; QPen _lineStyle; QVector _coordinates; bool _dottedLine; void updateGraphic() override; void adjustCoordinates() override; void adjustWindow( const QRectF& ) override; }; /* RubberbandLineHandle */ } } /* namespace SituationMap::RB */