/** ** ** @RDE_HEADER@ ** Implementation of preview for tactical symbols ** $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 ** ** ----------------------------------------------------------------------------------------------- */ #include "transient_tactical_symbol.h" #include #include #include namespace SituationMap { namespace RB { TransientTacticalSymbol::TransientTacticalSymbol( MapImpl * mapImpl, const QString & sidc ) { QString layerIdent; if (mapImpl) { layerIdent = mapImpl->layerFactoryImpl().rubberbandLayer(); } if (layerIdent.isEmpty()) { qWarning() << LOGFUNCTION << "not layername found"; } _tacticalRubberbandObj = new SidcSymbolImpl( sidc, QStringLiteral("TransientTacticalSymbol:sidc=%1").arg(sidc) ); _tacticalRubberbandObj -> init( mapImpl, layerIdent ); //_tacticalRubberbandObj -> setDrawOrder( 2000 ); } /* PreviewTaticalSymbol::PreviewTaticalSymbol */ TransientTacticalSymbol::~TransientTacticalSymbol() { delete _tacticalRubberbandObj; } /* TransientTacticalSymbol::~TransientTacticalSymbol */ void TransientTacticalSymbol::update(const QVector & coordinateVector) { PositionCont controlPoints; controlPoints.reserve(coordinateVector.size()); for (const RubberbandDrawable::RubberbandCoordinate &pos : coordinateVector) { const Esri::ArcGISRuntime::Point & p = pos._mapCoordinate; controlPoints.append(Point3D(p.x(), p.y(), p.z())); } _tacticalRubberbandObj -> setPositionsTranslated( controlPoints ); try { _tacticalRubberbandObj -> updateView(); } catch (...) { qWarning() << LOGFUNCTION << "Exception from TacticalAppearance::updateView() catched!!!!"; } } /* TransientTacticalSymbol::update */ } } /* namespace SituationMap::RB */