/** * @RDE_HEADER@ * Interface-Implementation of HitLine * $Id$ * $HeadURL$ * $Author$ */ #pragma once // Own #include "abstract_multi_point_map_object_impl.h" #include "basic_path_object_impl.h" #include // Interface #include // Qt #include #include //---------------------------------------------------------------------------- namespace SituationMap { /** * @brief The LineOfSightImpl class supports a "single" line with two colors. * The method setPositions() should never be called. * A class instance consists of the following logical elements: * - mainGraphicalObject (GraphicalObjectPath displaying the main techn. Appearance) * - mainGraphicalObjectText (displaying the text/name/identifier) * - tacticalAppearance (displaying the tact. Appearance) */ // inherent 'public', to get that implementation // inherent 'public virtual' to get that interface class SITUATIONMAPOBJECTS_EXPORT LineOfSightImpl : public BasicPathObjectImpl, public virtual LineOfSight { using BaseClass = SituationMap::BasicPathObjectImpl; template friend class GenericObjectFactory; protected: explicit LineOfSightImpl(const QString &debugInfo = QString()); virtual ~LineOfSightImpl(); public: QString identifier() const override; void setIdentifier(const QString &identifier) override; void setPoints(const Point3D &observer, const Point3D &obstacle, const Point3D &target, const QColor &visibleColor = Qt::green, const QColor &obstructedColor = Qt::red) override; protected: bool updateViewImpl() override; void updateExtensionLine(); friend class MapImpl; bool init(MapImpl *mapImpl, const QString &logicalLayerName) override; // internal/admin OriginTranslated m_extensionLineCoordinate; GraphicalObjectPath *m_extensionLine = nullptr; QColor m_extensionLineColor = Qt::red; // logical private: bool setPositions(const PositionCont &) override; //SHOULD NEVER BE CALLED private: LOGGER_T m_logger; ///< Interface of the Logging-Facility }; } // namespace SituationMap