137 lines
4.6 KiB
Objective-C
Executable File
137 lines
4.6 KiB
Objective-C
Executable File
/**
|
|
**
|
|
** @RDE_HEADER@
|
|
** Definition of rubberband class to define multipoint feature geometry in 3d
|
|
** $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_3d.h"
|
|
|
|
namespace Esri
|
|
{
|
|
namespace ArcGISRuntime
|
|
{
|
|
class IdentifyGraphicsOverlayResult;
|
|
}
|
|
}
|
|
|
|
|
|
namespace SituationMap { namespace RB
|
|
{
|
|
|
|
/**
|
|
@class RubberbandPointFeature rubberband_point_feature.h
|
|
@brief Implementation of a rubberband to input single coodinates for building point features
|
|
@see Rubberband3D
|
|
*/
|
|
class SITUATIONMAP_EXPORT RubberbandMultiPointFeature3D : public Rubberband3D
|
|
{
|
|
Q_OBJECT
|
|
/**
|
|
@name Construction & Destruction
|
|
@{
|
|
*/
|
|
|
|
friend class RubberbandFactory;
|
|
|
|
explicit RubberbandMultiPointFeature3D( SituationMap::Map * map, QObject * parent = nullptr, bool isActive = true );
|
|
|
|
public:
|
|
|
|
virtual ~RubberbandMultiPointFeature3D();
|
|
|
|
RubberbandMultiPointFeature3D(const RubberbandMultiPointFeature3D &) = delete;
|
|
RubberbandMultiPointFeature3D & operator = (const RubberbandMultiPointFeature3D &) = delete;
|
|
/** @} */
|
|
|
|
bool selectAction ( AbstractEventDispatcher * causer, int x, int y ) override;
|
|
bool setCoordinateAction ( AbstractEventDispatcher * causer, int x, int y ) override;
|
|
bool moveAction ( AbstractEventDispatcher * causer, int x, int y ) override;
|
|
bool movePickedAction ( AbstractEventDispatcher * causer, int x, int y ) override;
|
|
bool contextMenuAction ( AbstractEventDispatcher * causer, int x, int y ) override;
|
|
bool completeStateAction ( AbstractEventDispatcher * causer, int x, int y ) override;
|
|
bool deleteAction ( AbstractEventDispatcher * causer, int x, int y ) override;
|
|
bool undoAction ( AbstractEventDispatcher * causer, int x, int y ) override;
|
|
|
|
|
|
inline void enableClosed( bool flag )
|
|
{
|
|
_isClosed = flag;
|
|
} /* enableClosed */
|
|
|
|
/**
|
|
Gets the value of the close flag
|
|
*/
|
|
inline bool isClosedEnabled() const { return _isClosed; }
|
|
|
|
unsigned int coordinateCount() const override;
|
|
|
|
QVector<QPointF> coordinateVector( CoordinateSystem cs = CoordinateSystem::Geo ) const override;
|
|
|
|
QPointF singleCoordinate( unsigned int idx = 0, CoordinateSystem cs = CoordinateSystem::Geo ) const override;
|
|
|
|
void setCoordinateVector( const QVector<QPointF> & coordinateVector, CoordinateSystem cs = CoordinateSystem::Geo ) override;
|
|
|
|
Point3D singleCoordinate3D( unsigned int idx = 0, CoordinateSystem cs = CoordinateSystem::Geo ) const override;
|
|
QVector<Point3D> coordinateVector3D( CoordinateSystem cs = CoordinateSystem::Geo ) const override;
|
|
|
|
void setCoordinateVector( const QVector<Point3D> & coordinateVector, CoordinateSystem cs = CoordinateSystem::Geo ) override;
|
|
|
|
inline void enableCircular(bool flag)
|
|
{
|
|
_isCircular = flag;
|
|
} // enableCircular
|
|
|
|
inline bool isCircularEnabled() const { return _isCircular; }
|
|
|
|
protected:
|
|
|
|
virtual bool buttonProxyActive( const QPointF & scenePos) const { Q_UNUSED(scenePos); return false; }
|
|
|
|
void activateButtons() override;
|
|
|
|
void update() override;
|
|
|
|
/*
|
|
Forward declaration of internal container class for member variables. The derived classes of Rubberband
|
|
often have also a declaration of InternalData for there own internal members.
|
|
*/
|
|
class InternalData;
|
|
|
|
InternalData * _internal;
|
|
|
|
bool _isClosed;
|
|
bool _isCircular;
|
|
|
|
protected slots:
|
|
|
|
void onGetPickingResult(const QUuid &taskId, const QList<Esri::ArcGISRuntime::IdentifyGraphicsOverlayResult*> &identifyResults);
|
|
void onMapPosition( const Point3D &mapCoordinate );
|
|
|
|
}; /* RubberbandMultiPointFeature3D */
|
|
|
|
} } /* namespace SituationMap::RB */
|