84 lines
1.9 KiB
C++
Executable File
84 lines
1.9 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* LocationToElevationHelper
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "screen_location_elevation_helper_base.h"
|
|
#include <Map/map.h>
|
|
#include <Common/situation_map_logging.h>
|
|
|
|
|
|
#define USE_ELEVATION_MAP_AS_WORKAROUND // ToDo: remove if Esri-Surface will work without crash
|
|
|
|
|
|
// Qt
|
|
#include <QObject>
|
|
|
|
|
|
namespace Esri {
|
|
namespace ArcGISRuntime
|
|
{
|
|
class Surface;
|
|
class Point;
|
|
class SpatialReference;
|
|
}
|
|
}
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
namespace SituationMap
|
|
{
|
|
/**
|
|
* @brief The ScreenToLocationHelper class helps to assign the (global) requests location_to_elevation to the right caller
|
|
*/
|
|
class SITUATIONMAP_EXPORT LocationToElevationHelper : public ScreenLocationElevationHelperBase
|
|
{
|
|
Q_OBJECT
|
|
|
|
using BaseClass = ScreenLocationElevationHelperBase;
|
|
|
|
public:
|
|
/*! \name Construction, Destruction */
|
|
//@{
|
|
explicit LocationToElevationHelper(QObject *parent = nullptr);
|
|
~LocationToElevationHelper();
|
|
|
|
bool init(Map *map,
|
|
Esri::ArcGISRuntime::Surface *surface,
|
|
const Esri::ArcGISRuntime::SpatialReference &spatialReference);
|
|
|
|
LocationToElevationHelper(const LocationToElevationHelper &other) = delete;
|
|
LocationToElevationHelper &operator=(LocationToElevationHelper &other) = delete;
|
|
//@}
|
|
|
|
void stop();
|
|
|
|
void locationToElevation(const QPointF &mapLocation);
|
|
void locationToElevation(const Esri::ArcGISRuntime::Point &esriMapLocation);
|
|
|
|
void mainComputation() override;
|
|
|
|
Q_SIGNALS:
|
|
void elevationCompleted(double elevation);
|
|
|
|
private Q_SLOTS:
|
|
void onLocationToElevationCompleted(const QUuid &taskId, double elevation);
|
|
|
|
protected:
|
|
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
|
|
|