Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Viewer/SituationMap/Map/overlay_handler.h
T
torstenandCopilot 7a6be7474e Qt6 migration: Fix BUILD_RTI=OFF build errors in TrainingAreaBase
- training_area_telegrams.cpp: Fixed QJsonObject initializer syntax (Qt6 requires {{}} not ({}))
- training_area_telegrams.cpp: Fixed fromJson() methods to access m_* members directly
- training_area_telegrams.cpp: Fixed brace mismatches in multiple toJson() methods
- training_area_telegrams.h: Changed Header struct to public members for consistency
- tx_mixin.cpp: Fixed getEquipmentNumber() template for direct member access
- lts_coordinate.cpp: Added missing #include <iomanip>
- MIGRATION_STATUS.md: Added migration progress tracking document

C++17 constraint enforced due to RTI Connext DDS 7.7.0 incompatibility with C++20+

Build status: BUILD_RTI=OFF successful (0 errors, warnings only)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-23 20:49:23 +02:00

96 lines
2.1 KiB
C++
Executable File

/**
* @RDE_HEADER@
* Interface of AbstractMapObject
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
// Own
#include "situation_map_export.h"
// Qt
#include <QtCore/QMap>
//----------------------------------------------------------------------------
namespace SituationMap
{
class Map;
/**
* @brief The OverlayHandler class handles overlays produced by the PlanEditor.
*/
class SITUATIONMAP_EXPORT OverlayHandler
{
public:
OverlayHandler() = default; ///< Contructor
virtual ~OverlayHandler() = default; ///< Destructor
static OverlayHandler *create(Map *map);
/*! \name Adding / Updating */
//@{
/**
* @brief Add an Overlay.
* @param key to associate the overlay with. Should not be less than 0.
* @param name to use (displayname)
* @param overlayContent to insert.
* @param isSnapshot to ensure correct layer order.
* @return True on success, otherwise false.
*/
virtual bool setOverlay(int key, const QString &name, const QByteArray &overlayContent, bool isSnapshot = false) = 0;
virtual QByteArray content(int key) const = 0;
virtual double minScale(int key) const = 0;
virtual bool setMinScale(int key, double minScale) = 0;
virtual double maxScale(int key) const = 0;
virtual bool setMaxScale(int key, double maxScale) = 0;
virtual double opacity(int key) const = 0;
virtual bool setOpacity(int key, double opacity) = 0;
//@}
virtual bool reorderOverlays(const QVector<int> &orderOfIds) = 0;
/*! \name Visibility */
//@{
virtual bool setOverlayVisibility(int key, bool visibility) = 0;
virtual bool overlayVisibility(int key) const = 0;
//@}
/*! \name Removing */
//@{
/**
* @brief Remove an Overlay
* @param key to be remove()
* @return True on success, otherwise false.
*/
virtual bool removeOverlay(int key) = 0;
virtual int removeAllOverlays() = 0;
//@}
/*! \name Retrieving */
//@{
virtual int overlayCount() const = 0;
virtual QList<int> overlays() const = 0;
virtual bool containsOverlay(int key) const = 0;
// QString getOverlay(int key);
//@}
};
} // namespace SituationMap