107 lines
2.7 KiB
C++
Executable File
107 lines
2.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Interface-Implementation of SingleFire
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
// Own
|
|
#include "basic_path_object_impl.h"
|
|
#include <MapObjects/single_fire.h> // Interface
|
|
#include <GraphicalObjects/graphical_object_picture_marker.h>
|
|
|
|
|
|
// Qt
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
namespace SituationMap
|
|
{
|
|
|
|
|
|
/**
|
|
* @brief The SingleFireImpl class displays a single impact.
|
|
*
|
|
* A class instance consists of the following logical elements:
|
|
* - mainGraphicalObject (GraphicalObjectPictureMarker / Image, 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 SingleFireImpl : public BasicPathObjectImpl, public virtual SingleFire
|
|
{
|
|
using BaseClass = BasicPathObjectImpl;
|
|
|
|
template <typename> friend class GenericObjectFactory;
|
|
protected:
|
|
explicit SingleFireImpl(const QString &debugInfo = QString());
|
|
virtual ~SingleFireImpl();
|
|
|
|
public:
|
|
SingleFireImpl(const SingleFireImpl &other) = delete;
|
|
SingleFireImpl &operator=(SingleFireImpl &other) = delete;
|
|
|
|
QString toString() const override;
|
|
|
|
|
|
// some set/get methods:
|
|
Point3D impactOrigin() const override;
|
|
void setImpactOrigin(const Point3D &impactOrigin) override;
|
|
|
|
ImpactType impactType() const override;
|
|
void setImpactType(ImpactType impactType = ImpactType::normalImpact) override;
|
|
|
|
Point3D origin() const override;
|
|
void setOrigin(const Point3D &origin) override;
|
|
float radius() const override;
|
|
void setRadius(float radius) override;
|
|
void setOriginatorToTargetLineSurface(const Point3D &start, const Point3D &end) override;
|
|
|
|
|
|
// Delegate to BaseClass:
|
|
AesEffectState aesState() const override;
|
|
void setAesState(AesEffectState aesState) override;
|
|
|
|
SymbolImage symbolImage() const override;
|
|
|
|
static QImage renderDoubleImpactSymbol(const QColor &color, int size, bool filled);
|
|
static QImage renderImpactSymbol(const QColor &color, int size, bool filled);
|
|
|
|
|
|
|
|
protected:
|
|
bool updateViewImpl() override;
|
|
|
|
bool updateViewImplPost() override
|
|
{
|
|
BaseClass::updateViewImplPost();
|
|
m_impactType.reset();
|
|
return true;
|
|
}
|
|
|
|
friend class MapImpl;
|
|
bool init(MapImpl *mapImpl, const QString &logicalLayerName) override;
|
|
|
|
bool onMapExtentChanged() override;
|
|
|
|
// internal/admin
|
|
|
|
// logical
|
|
|
|
|
|
private:
|
|
LOGGER_T m_logger; ///< Interface of the Logging-Facility
|
|
|
|
SimpleValue<ImpactType> m_impactType = ImpactType::normalImpact;
|
|
GraphicalObjectPictureMarker *m_centerImage = nullptr;
|
|
};
|
|
|
|
|
|
|
|
} // namespace SituationMap
|
|
|