Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* @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 <MapObjects/line_of_sight.h> // Interface
|
||||
#include <GraphicalObjects/graphical_object_path.h>
|
||||
|
||||
// Qt
|
||||
#include <QString>
|
||||
#include <QPointF>
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
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 <typename> 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
|
||||
|
||||
Reference in new issue
Block a user