Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+108
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Interface-Implementation of NineLiner
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Own
|
||||
#include "abstract_multi_point_map_object_impl.h"
|
||||
#include "basic_path_object_impl.h"
|
||||
#include <MapObjects/nine_liner.h> // Interface
|
||||
|
||||
|
||||
// Qt
|
||||
#include <QString>
|
||||
#include <QPointF>
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
namespace SituationMap
|
||||
{
|
||||
|
||||
// inherent 'public', to get that implementation
|
||||
// inherent 'public virtual' to get that interface
|
||||
class SITUATIONMAPOBJECTS_EXPORT NineLinerImpl : public BasicPathObjectImpl, public virtual NineLiner
|
||||
{
|
||||
using BaseClass = SituationMap::BasicPathObjectImpl;
|
||||
|
||||
template <typename> friend class GenericObjectFactory;
|
||||
protected:
|
||||
explicit NineLinerImpl(const QString &debugInfo = QString());
|
||||
virtual ~NineLinerImpl();
|
||||
|
||||
public:
|
||||
NineLinerImpl(const NineLinerImpl &other) = delete;
|
||||
NineLinerImpl &operator=(NineLinerImpl &other) = delete;
|
||||
|
||||
QString identifier() const override;
|
||||
void setIdentifier(const QString &identifier) override;
|
||||
|
||||
void setNineLinerData(const NineLinerData& data) override { m_data = data; }
|
||||
|
||||
void setScale(float scale) override;
|
||||
|
||||
protected:
|
||||
bool updateViewInitialPoint();
|
||||
bool updateViewTargetPosition();
|
||||
|
||||
bool updateViewFriendlies();
|
||||
|
||||
bool updateViewFinalAttackHeading(int length);
|
||||
bool updateViewFahSector(QSharedPointer<GraphicalObjectPath> &path, const QString &debugInfo, int length, int angle);
|
||||
|
||||
|
||||
bool updateViewImpl() override;
|
||||
bool onMapExtentChanged() override;
|
||||
|
||||
bool updateViewImplPost() override
|
||||
{
|
||||
BaseClass::updateViewImplPost();
|
||||
m_data.reset();
|
||||
m_color.reset();
|
||||
m_ownScale.reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
friend class MapImpl;
|
||||
bool init(MapImpl *mapImpl, const QString &logicalLayerName) override;
|
||||
|
||||
// internal/admin
|
||||
|
||||
// logical
|
||||
|
||||
private:
|
||||
bool setPositions(const PositionCont &) override; //SHOULD NEVER BE CALLED
|
||||
|
||||
private:
|
||||
// input:
|
||||
SimpleValue<NineLinerData> m_data;
|
||||
|
||||
OriginTranslated m_otInitialPoint;
|
||||
OriginTranslated m_otTargetPosition;
|
||||
OriginTranslated m_otFriendliesPosition;
|
||||
int m_fahLength = 1;
|
||||
|
||||
// display:
|
||||
SimpleValue<float> m_ownScale;
|
||||
SimpleValue<QColor> m_color;
|
||||
QSharedPointer<GraphicalObjectPictureMarker> m_pmInitialPoint; // square
|
||||
QSharedPointer<GraphicalObjectPictureMarker> m_pmTargetPosition; // triangle
|
||||
|
||||
QSharedPointer<GraphicalObjectPath> m_pathFahSectorLow;
|
||||
QSharedPointer<GraphicalObjectPath> m_pathFahSectorHigh;
|
||||
|
||||
QSharedPointer<GraphicalObjectPictureMarker> m_pmFriendlies; // circle
|
||||
|
||||
LOGGER_T m_logger; ///< Interface of the Logging-Facility
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace SituationMap
|
||||
|
||||
Reference in new issue
Block a user