91 lines
1.8 KiB
C++
Executable File
91 lines
1.8 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/CentralEffectSimulation/ces_data_plugin_interface.h>
|
|
#include <Plugins/InfrastructureManagement/ism_data_plugin_interface.h>
|
|
|
|
|
|
// Qt
|
|
#include <QObject>
|
|
#include <QMap>
|
|
|
|
|
|
namespace SituationMap
|
|
{
|
|
|
|
// forward:
|
|
class Map;
|
|
|
|
|
|
class BuildingOwnership : public QObject
|
|
{
|
|
Q_OBJECT
|
|
using BaseClass = QObject;
|
|
|
|
public:
|
|
|
|
explicit BuildingOwnership(int drawOrder, QObject *parent = nullptr);
|
|
~BuildingOwnership();
|
|
|
|
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 onBuildingOwnershipChanged(const CentralEffectSimulation::BuildingOwnership &data, DataModification modType);
|
|
|
|
void onResetBuildingOwnership();
|
|
|
|
|
|
protected:
|
|
friend class BuildingGeometryCache;
|
|
void updateBuilding(int buildingId);
|
|
PositionCont retrieveBuildingGeometry(int buildingId, int floorId) const;
|
|
PositionCont retrieveBuildingGeometryInternal(int buildingId, int floorId) const;
|
|
|
|
QMap<int, double> retrieveBuildingAbsHeight(int buildingId) const;
|
|
QMap<int, double> retrieveBuildingAbsHeightInternal(int buildingId) const;
|
|
|
|
|
|
private:
|
|
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;
|
|
|
|
|
|
// DDS:
|
|
std::shared_ptr<CentralEffectSimulation::Interface::Dtc> m_cesDtc;
|
|
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
|
|
|
|
};
|
|
|
|
|
|
} // namespace
|