Files
qt-migration-legatus/qt5-before/dlbo/Lts/Viewer/SituationMap/Map/viewshed.h
T
torstenandCopilot 7173785915 Qt6 Migration: Complete migration with DDS/RTI support and build validation
Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list

Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF

Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
  - Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
  - Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)

Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified

Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-15 18:20:26 +00:00

111 lines
3.3 KiB
C++

/**
* @RDE_HEADER@
* Interface of Viewshed
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
// Own
#include "situation_map_types.h"
#include "viewshed_parameter.h"
#include <situation_map_export.h>
// Qt
#include <QObject>
#include <QString>
#include <QPointF>
//----------------------------------------------------------------------------
namespace SituationMap
{
/**
* @brief The Viewshed class creating a viewshed.
*/
class SITUATIONMAP_EXPORT Viewshed : public QObject
{
using BaseClass = QObject;
Q_OBJECT
public:
Viewshed() = default; ///< Contructor
virtual ~Viewshed() = default; ///< Destructor
Viewshed(const Viewshed &other) = delete;
Viewshed &operator=(Viewshed &other) = delete;
/**
* Defines URL to elevation data service or file with elevation data
*
*/
virtual void setViewshedUrl(const QString &viewshedServiceUrl) = 0;
/**
* Creates ESRI based viewshed and starts a rubberband to define the area to analyse. On success the return value is true.
*/
virtual bool create() = 0;
/**
* Creates a GeISiR fan of sight and starts a rubberband to define the area (center point and radius) to analyse.
*
* @param alpha Alpha value to apply to predefined colors SightFan.
* @param innerRadius Distance from center point to start the analyse.
* @param observerHeight Height of center point above terrain.
* @param targetHeight Height of visible objects or targets.
* @param beamAngle Beam width in degree of a single scan line.
*
* @return true on success
*/
virtual bool create(double alpha, double innerRadius, double observerHeight, double targetHeight, double beamAngle) = 0; // will start a rubberband to create a fan of sight
/**
* Create a viewshed from existing parameter settings.
*
* @return true on success
*/
virtual long create(const ViewshedParameter &viewshedParameter) = 0;
/**
* In case of using GeSiR fan of sight for analysing modify the parameter settings.
*
* @param viewshedId Id of viewshed. In case of viewshedId is "-1" the current viwshed (last created) will be modified
* @param alpha Alpha value to apply to predefined colors SightFan.
* @param innerRadius Distance from center point to start the analyse.
* @param observerHeight Height of center point above terrain.
* @param targetHeight Height of visible objects or targets.
* @param beamAngle Beam width in degree of a single scan line.
*
* @return true on success
*/
virtual bool modify(long viewshedId, double alpha, double innerRadius, double observerHeight, double targetHeight, double beamAngle) = 0;
/**
* Remove a viewshed. In case of viewshedId is "-1" all viewsheds will be removed.
* @param vieweshedId Id of viewshed or "-1"
*/
virtual void remove(long viewshedId = -1) = 0;
/**
* Get parameter of a viewshed. In case of viewshedId is "-1" the current viwshed (last created) will be used
* @param vieweshedId Id of viewshed or "-1"
* @param ok Pointer bool variable set to true on success.
*
* @return Struct with viewshed parameters.
*/
virtual ViewshedParameter getViewshedParameter(long viewshedId = -1, bool *ok = nullptr) const = 0;
Q_SIGNALS:
void viewshedFinished(long viewshedId);
};
} // namespace SituationMap