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

67 lines
1.4 KiB
C++
Executable File

/**
* @RDE_HEADER@
* Interface-Implementation of DangerArea
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
// Own
#include <Map/measurement.h> // Interface
#include "map_impl.h"
#include "Rubberbands/rubberband_multi_point_feature.h"
// Qt
//----------------------------------------------------------------------------
namespace SituationMap
{
class MeasurementImpl : public QObject, public virtual Measurement
{
Q_OBJECT
public:
explicit MeasurementImpl(SituationMap::MapImpl *mapImpl);
virtual ~MeasurementImpl();
MeasurementImpl(const MeasurementImpl &other) = delete;
MeasurementImpl &operator=(MeasurementImpl &other) = delete;
long measureLength() override;
void clear() override;
bool displayPolyline();
bool displayVertices();
bool displayTotalLength();
bool calculateLength(const QVector<Point3D> &mapCoords);
protected Q_SLOTS:
void onRbAbort(RB::RubberbandBase *rbnd);
void onRbInterimResultsChanged(RB::RubberbandBase *rbnd);
void onRbApply(RB::RubberbandBase *rbnd);
void onCurrentCursorPositionChanged(const Point3D &mapCoord);
private:
void init();
bool startRubberband();
RB::RubberbandMultiPointFeature *createRubberband();
LOGGER_T m_logger; ///< Interface of the Logging-Facility
class Private;
/**
* The private d->pointer to not break BC when changing internals of this class
*/
Private *d = nullptr;
};
} // namespace SituationMap