Files
qt5-legatus-legacy/Lts/Viewer/SituationMap/Rubberbands/drawable_painter_path.h
T
2026-08-13 18:33:10 +02:00

76 lines
2.3 KiB
C++
Executable File

/**
**
** @RDE_HEADER@
** Definition of base class for rubberband drawing objects
** $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 "rubberband_drawable.h"
namespace SituationMap { namespace RB
{
class DrawablePainterPath : public RubberbandDrawable
{
Q_OBJECT
public:
explicit DrawablePainterPath( Esri::ArcGISRuntime::MapGraphicsView * );
explicit DrawablePainterPath( Esri::ArcGISRuntime::MapGraphicsView *, QGraphicsScene * );
~DrawablePainterPath();
DrawablePainterPath(const RubberbandDrawable &) = delete;
DrawablePainterPath & operator = (const RubberbandDrawable &) = delete;
void setPath( const QVector<QPointF> & scenePath );
void setPath( const QVector<RubberbandDrawable::RubberbandCoordinate> & path );
inline void enableClosedLine(bool on = true) { _closedLine = on; }
inline void dottedPath(bool on = true) { _dottedPath = on; }
inline void fillSolid(bool on = true) { _fillSolid = on; }
protected:
QGraphicsPathItem * _painterPathItem;
QVector<RubberbandDrawable::RubberbandCoordinate> _pathCoordinates;
QPen _lineStyle;
bool _dottedPath;
bool _closedLine;
bool _fillSolid;
void updateGraphic() override;
void adjustCoordinates() override;
void adjustWindow( const QRectF& ) override;
}; /* DrawablePainterPath */
} } /* namespace SituationMap::RB */