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

95 lines
2.6 KiB
C++
Executable File

/**
* @RDE_HEADER@
* Interface-Implementation of BuildingOutline
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
// Own
#include "basic_path_object_impl.h"
#include <MapObjects/building_outline.h> // Interface
#include <GraphicalObjects/graphical_object_model_scene_marker.h>
// Qt
#include <QString>
#include <QUrl>
//----------------------------------------------------------------------------
namespace SituationMap
{
/**
* @brief The BuildingOutlineImpl class displays the outline of a building.
*
* A class instance consists of the following logical elements:
* - mainGraphicalObject (GraphicalObjectPath displaying the main techn. Appearance)
* - mainGraphicalObjectText (displaying the text/name)
* - tacticalAppearance (displaying the tact. Appearance)
*/
// inherent 'public', to get that implementation
// inherent 'public virtual' to get that interface
class SITUATIONMAPOBJECTS_EXPORT BuildingOutlineImpl : public BasicPathObjectImpl, public virtual BuildingOutline
{
using BaseClass = BasicPathObjectImpl;
template <typename> friend class GenericObjectFactory;
protected:
explicit BuildingOutlineImpl(const QString &debugInfo = QString());
virtual ~BuildingOutlineImpl();
public:
BuildingOutlineImpl(const BuildingOutlineImpl &other) = delete;
BuildingOutlineImpl &operator=(BuildingOutlineImpl &other) = delete;
PositionCont positions() const override;
bool setPositions(const PositionCont &posCont) override;
QColor majorColor() const override;
LineStyle lineStyle() const override;
LineStyle &rLineStyle() override;
void setLineStyle(const LineStyle &lineStyle) override;
FillStyle fillStyle() const override;
FillStyle &rFillStyle() override;
void setFillStyle(const FillStyle &fillStyle) override;
void setMarker(const Point3D &markerOrigin) override;
ModelSceneSymbolData getModelSceneSymbolData() override;
void setModelSceneSymbolData(const ModelSceneSymbolData &modelSceneSymbolData) override;
protected:
bool updateViewImpl() override;
bool updateViewImplMarker();
bool updateModelSceneSymbol();
friend class MapImpl;
bool init(MapImpl *mapImpl, const QString &logicalLayerName) override;
// internal/admin
void updateIdentifierPosition() override;
// logical
private:
LOGGER_T m_logger; ///< Interface of the Logging-Facility
GraphicalObjectPictureMarker *m_marker{nullptr};
OriginTranslated m_markerOrigin;
ModelSceneSymbolData m_modelSceneSymolData;
GraphicalObjectModelSceneMarker *m_modelSceneMarker{nullptr};
};
} // namespace SituationMap