92 lines
1.9 KiB
C++
Executable File
92 lines
1.9 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Interface
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
// Own
|
|
#include "plugin_provider.h"
|
|
#include <Map/situation_map_types.h>
|
|
#include <Common/situation_map_logging.h>
|
|
|
|
#include <Plugins/Buildings/bld_data_plugin_interface.h>
|
|
#include <Plugins/InfrastructureManagement/ism_data_plugin_interface.h>
|
|
|
|
|
|
// Qt
|
|
#include <QObject>
|
|
#include <QMap>
|
|
|
|
|
|
namespace SituationMap
|
|
{
|
|
|
|
// forward:
|
|
class Map;
|
|
|
|
|
|
class BuildingContamination : public QObject
|
|
{
|
|
Q_OBJECT
|
|
using BaseClass = QObject;
|
|
|
|
public:
|
|
|
|
explicit BuildingContamination(int drawOrder, QObject *parent = nullptr);
|
|
~BuildingContamination();
|
|
|
|
bool init(Map *map, PluginProvider *pluginProvider);
|
|
void clearInterfaces();
|
|
void removeAllObjects();
|
|
void clearObjects() { removeAllObjects(); }
|
|
|
|
bool run();
|
|
void stop();
|
|
|
|
bool isVisible() const;
|
|
bool setVisible(bool visible);
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
protected Q_SLOTS:
|
|
void onBuildingStateChanged(const Buildings::BuildingState &data, DataModification modType);
|
|
|
|
void onResetBuildingState();
|
|
|
|
|
|
protected:
|
|
void updateBuilding(int buildingId);
|
|
int findFloorIdByRoomId(int roomId);
|
|
bool getRoom(int roomSeId, InfrastructureManagement::StructureElement &roomSe);
|
|
PositionCont retrieveBuildingGeometry(int buildingId, int floorId) const;
|
|
QMap<int, double> retrieveBuildingAbsHeight(int buildingId) const;
|
|
|
|
|
|
private:
|
|
LOGGER_T m_logger; ///< Interface of the Logging-Facility
|
|
QMap<int /* room */, int /* floor */> m_roomToFloorCache;
|
|
QMap<int /* room */, InfrastructureManagement::StructureElement /* se */> m_roomStructureElementCache;
|
|
|
|
|
|
class Private;
|
|
/**
|
|
* The private d->pointer to not break BC when changing internals of this class
|
|
*/
|
|
Private *d = nullptr;
|
|
|
|
|
|
// DDS:
|
|
std::shared_ptr<Buildings::Interface::Dtc> m_bldDtc;
|
|
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
|
|
|
|
};
|
|
|
|
|
|
} // namespace
|