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

79 lines
1.8 KiB
C++
Executable File

/**
* @RDE_HEADER@
* Interface-Implementation of TerrainProfile
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
// Own
#include <Map/terrain_profile.h> // Interface
#include "map_impl.h"
#include "Rubberbands/rubberband_multi_point_feature.h"
#include <Utils/terrain_profile_dialog.h>
// Qt
#include <QPointF>
#include <QVector>
//----------------------------------------------------------------------------
namespace SituationMap
{
class TerrainProfileImpl : public QObject, public virtual TerrainProfile
{
Q_OBJECT
using BaseClass = TerrainProfile;
public:
explicit TerrainProfileImpl(SituationMap::MapImpl *mapImpl);
virtual ~TerrainProfileImpl();
TerrainProfileImpl(const TerrainProfileImpl &other) = delete;
TerrainProfileImpl &operator=(TerrainProfileImpl &other) = delete;
bool isReady();
void setFinishedCallback(const std::function< bool(long id, const QVector<QPair<QPointF, double>> &)> &finishedCallback) override;
void setTerrainProfileDialog(long id, QPointer<SituationMap::TerrainProfileDialog> &terrainProfileDialog) override;
bool create() override;
long create(const TerrainProfileParameter &terrainProfileParameter) override;
void remove(long terrainProfileId = -1) override;
private Q_SLOTS:
void onRbAbort(RB::RubberbandBase *rbnd);
void onRb2DApply(RB::RubberbandBase *rbnd);
void onLocationsToElevationsCompleted(long id);
private:
void init();
RB::RubberbandMultiPointFeature *createRubberband2D();
RB::RubberbandMultiPointFeature *createRubberband3D();
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;
}; // TerrainProfileImpl
} // namespace SituationMap