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

81 lines
2.2 KiB
C++
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* @RDE_HEADER@
* Interface of MapObjectIndicator
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include "abstract_multi_point_map_object.h"
//----------------------------------------------------------------------------
namespace SituationMap
{
/**
* @brief The MapObjectIndicator points to exactly one MapObject defined by its uniqueMapId.
*
* This MapObjectIndicator should be smart, you normally don´t have to set the position,
* color or similar directly.
* Just call setMapObjectToPointTo() and updateView();
* \n The MapObjectIndicator shoud 'follow' the object to be pointed to.
* \n The color is taken from the objectToBePointedTo (if that changes, call updateView() again).
*
* <b>Some Annotations / Recommendations:</b>
* - Layer: create the MapObjectIndicator in the topmost (operational) layer (LayerType::Operational)
* - The drawOrder is internal choosen to be OVER the objectToBePointedTo
* - The method setPositions() should never be called.
*
*/
class MapObjectIndicator : public virtual AbstractMultiPointMapObject
{
public:
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Don't use "= default" because of bug in VS2015 JT 2016/11/7
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
MapObjectIndicator() : AbstractMultiPointMapObject() {;} ///< Contructor
virtual ~MapObjectIndicator() = default; ///< Destructor
/*! \name Specific data*/
//@{
/**
* @brief Start and end point:.
*/
virtual Point3D startPoint() const = 0;
virtual Point3D endPoint() const = 0;
virtual void setStartAndEndPoint(const Point3D &start, const Point3D &end) = 0;
/**
* @brief mapObjectToPointTo
* @return uniqueId of the object to be pointed to.
*/
virtual UniqueMapId mapObjectToPointTo() = 0;
/**
* @brief Set uniqueId of object should to be pointed to.
* @attention But there is NO automatic update yet. Caller is responsable for operforming updateView()!
* @param uniqueId of the object to be pointed to.
*/
virtual void setMapObjectToPointTo(UniqueMapId uniqueId) = 0;
//@}
// void setPositions(const PositionCont& posCont) //SHOULD NEVER BE CALLED
};
} // namespace SituationMap