- Migrated all 104 CMakeLists.txt files in Lts/Services - Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg, Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test, Qt5::SerialPort with Qt6:: equivalents - 1244 files modified (CMakeLists.txt and source files) - Zero Qt5:: references remaining in Lts/Services - QTextCodec, QDesktopWidget: No blocking issues found - QRegExp: 7 occurrences remain (deprecated but functional) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
60 lines
1.6 KiB
C++
Executable File
60 lines
1.6 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* ISM Handler Sound Areas
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Filip Biedziak, NLE, 2020-08-05
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QHash>
|
|
|
|
#include "base.h"
|
|
|
|
|
|
namespace InfrastructureManagement
|
|
{
|
|
|
|
class ObjectEffectArea;
|
|
class MainHandler;
|
|
|
|
|
|
class HandlerEffectArea final : public Base
|
|
{
|
|
|
|
public:
|
|
explicit HandlerEffectArea(MainHandler *mainHandler);
|
|
~HandlerEffectArea();
|
|
|
|
bool init();
|
|
|
|
|
|
ObjectEffectArea *createEffectAreaForMse(const InfrastructureManagement::MainStructureElement &mse);
|
|
|
|
QHash<int, ObjectEffectArea *> getObjectEffectAreaMap() const { return m_objectEffectAreaMap; }
|
|
ObjectEffectArea *getEffectAreaFromId(int32_t id) const { return m_objectEffectAreaMap.value(id, nullptr); }
|
|
|
|
private:
|
|
int getSeId(const int mountPointId, const InfrastructureManagement::MainStructureElement &mse) const;
|
|
/**
|
|
* @brief assetIdsFromJsonArray reads the EGCU IDs of the sound area from a Json object.
|
|
* @param jsonObj Json object with an entry 'egcuMountpoints'
|
|
* @return vector with EGCU IDs
|
|
*/
|
|
std::vector<int32_t> egcuIdsFromJsonObject(const QJsonObject &jsonObj, const MainStructureElement &mse) const;
|
|
/**
|
|
* @brief geometryFromJsonArray reads the vertices of the sound area from a Json object.
|
|
* @param jsonObj Json object with an entry 'geometry'
|
|
* @return vector with 2D geo coordinates
|
|
*/
|
|
std::vector<Core::GeoPosition2D> geometryFromJsonObject(const QJsonObject &jsonObj) const;
|
|
|
|
private:
|
|
QHash<int32_t, ObjectEffectArea *> m_objectEffectAreaMap;
|
|
|
|
};
|
|
|
|
} // namespace InfrastructureManagement
|