/** ** ** @RDE_HEADER@ ** Definition of rubberband class to define moving, scale and rotating transforms ** $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 .........: ** ** 22.06.2016, JT : First edition for use with Qt5 ** ** ----------------------------------------------------------------------------------------------- */ #pragma once #include "rubberband_rectangle.h" namespace SituationMap { namespace RB { /** @class RubberbandTransform rubberband_transform.h @brief Implementation of a rubberband to move, scale and rotate features @see Rubberband */ class SITUATIONMAP_EXPORT RubberbandTransform : public RubberbandRectangle { Q_OBJECT friend class RubberbandFactory; friend class RubberbandTransformMove; friend class RubberbandTransformRotate; friend class RubberbandTransformScale; /** @name Construction & Destruction @} */ explicit RubberbandTransform( SituationMap::Map * map, QObject * parent = nullptr ); public: ~RubberbandTransform(); /** @} */ /** Provides the transformation matrix */ const MathUtils::Matrix2D & transformMatrix() const; signals: /** The updatePreview signal is emitted before the rubbberband itself will be redrawn. Connecting this signal can be used to draw an preview e.g in case of transform rubberbands. @param rbnd pointer to this Rubberband @param mat transformation matrix to transform features for preview @see Rubberband */ void updatePreview( Rubberband * rbnd, const MathUtils::Matrix2D & mat ); protected: /* Forward declaration of InternalData to hold private member variables. Becareful the base class Rubberband has similary a class for internal data member with name "InternalData". Don't be confused it is not the same. */ struct InternalData; InternalData * _internal; void update() override; private: void setButtonPosition(); }; /* RubberbandTransform */ } } /* namespace SituationMap::RB */