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

185 lines
5.4 KiB
C++
Executable File

/*
** -----------------------------------------------------------------------------------------------
**
** @RDE_HEADER@
** Implementation of fan of sight
** $Id$
** $HeadURL$
** $Author$
**
** -----------------------------------------------------------------------------------------------
**
** Hardware-Environment: Intel-PC
** Software-Environment: Windows 7, Qt 5.x. ArcGISRuntimeQt 100.2
**
** Language ........: C++ 11
**
** -----------------------------------------------------------------------------------------------
**
** Autor ...........: Nikolaus Hanekamp, SEDG, Tel. 2906
** Jörg Turla, SPDG, Tel. 3132
**
** -----------------------------------------------------------------------------------------------
**
** Notices .........:
**
** 01.02.2005, NH : Urversion
** 15.05.2018, JT : adapting GeISiR source to SituationMap
**
** -----------------------------------------------------------------------------------------------
*/
#pragma once
#include <Map/sight_fan.h>
#include <ElevationMap/elevation_map.h>
#include <MapImpl/abstract_map_object_impl.h>
namespace SituationMap
{
class MapImpl;
class SightBeam;
class SITUATIONMAP_EXPORT SightFanImpl : public QObject, public AbstractMapObjectImpl, public virtual SightFan
{
friend class SightBeam;
Q_OBJECT
public:
explicit SightFanImpl(const QString &debugInfo = QString());
virtual ~SightFanImpl();
void initColors();
void initFan( const QPointF &center
, double centHat
, double objHat
, double radius
, double innerRadius
, double startAngle
, double dAngle
, unsigned int nrFans
, double alpha ) override;
void initFan( const Point3D &center
, double objHat
, double radius
, double innerRadius
, double startAngle
, double dAngle
, unsigned int nrFans
, double alpha ) override;
void setCenter(const QPointF &center) override;
void setCenter(const Point3D &center) override;
void setCenter(const QPointF &center, double centerHat) override;
void setCenterHat(double centerHat) override;
void setObjectHat(double objHat) override;
void setRadius(double radius) override;
void setInnerRadius(double radius) override;
void setStartAngle(double startAngle) override;
void setdeltaAngle(double dAngle) override;
void setNoOfFans(double noFans) override;
void setAlpha(double alpha) override;
QPointF center() const override;
double centerHat() const override;
double objectHat() const override;
double innerRadius() const override;
double radius() const override;
double startAngle() const override;
double dAngle() const override;
double alpha() const override;
unsigned int noOfFans() const override;
void move(const QPointF &center) override;
void move(const QPointF &center, double centHat, double objHat) override;
void setFanColor(const QColor & visible, const QColor &invisible, const QColor &undefined) override;
void setFanColorMark(float colMult) override;
void show() override;
/**
Overloaded from base class to implement the construction of GraphicalObjects.
*/
bool init( MapImpl *mapImpl, const QString &logicalLayerName = QStringLiteral("SightFanLayer")) override;
void boundingBox(BoundingBox &bbox) const override;
protected:
bool updateViewImplPre() override;
bool updateViewImpl() override;
bool updateViewImplPost() override;
void calculateSightBeamVec();
void calculateSightBeam(SightBeam &sBeam);
void calculateSightBeam(const LOSVector &losProfile, SightBeam &sBeam);
class Internal;
Internal *m_internal;
private slots:
void delayedMove();
private:
QTimer *m_moveDelayTimer;
QPointF m_moveDelayedCenter;
}; // SightFanImpl
} // SituationMap
/* -----------------------------------------------------------------------------------------------
** CVS-Id/Release ...: $Header$
** -----------------------------------------------------------------------------------------------
**
** Historie:
**
** $Log: not supported by cvs2svn $
** Revision 1.9 2007/12/18 18:11:00 joerg
** draw() um bias erweitert und Rückgabe Boolean = true wenn wriklich gezeichnet wurde.
**
** Revision 1.8 2007/08/01 10:50:39 Jörg
** Neu: dirtyFlags und RenderState
**
** Revision 1.7 2007/07/23 14:04:09 Jörg
** AbstractView eingeführt
**
** Revision 1.6 2007/07/11 08:13:46 Jörg
** move jetzt auch nur mit Position
**
** Revision 1.5 2005/11/09 13:44:19 klaus
** Umsetzung auf Linux;
**
** Revision 1.4 2005/11/09 11:12:26 klaus
** Anpassung an Linux: Kommentar hinter #endif mit "//" versehen
**
** Revision 1.3 2005/04/15 13:05:18 joerg
** Resource Control
**
** Revision 1.2 2005/02/10 13:51:01 klaus
** Bias für SightFans eingeführt
**
** Revision 1.1 2005/02/09 17:08:11 klaus
** 1. Version der SightFans
**
**
** ----------------------------------------------------------------------------------------------- */