Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+67
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* Handler for Blocked Areas
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by gr, SLSE, 2018-07-02
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <CentralEffectSimulation/logger.h>
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
#include <AreaEffectSimulation/aes_dtc.h>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <TrainingAreaBase/tab_ftc.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
// HTTP Request
|
||||
#include <QNetworkAccessManager>
|
||||
|
||||
namespace CesArtillerySound
|
||||
{
|
||||
|
||||
class HandlerArtillerieSound final
|
||||
: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
explicit HandlerArtillerieSound(const std::shared_ptr<CentralEffectSimulation::DdsHandler> &ddsHandler,
|
||||
const std::shared_ptr<CentralEffectSimulation::HandlerBuildingData> &buildingDataHandler,
|
||||
QObject *parent);
|
||||
|
||||
~HandlerArtillerieSound();
|
||||
|
||||
bool init();
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
void onExplosionSingleChanged(const AreaEffectSimulation::ExplosionSingle &data, DataModification modType);
|
||||
void onTechnicalAreaChanged(const AreaEffectSimulation::TechnicalArea &data, DataModification modType);
|
||||
void httpFinished();
|
||||
|
||||
private:
|
||||
void playSound(QString &user, QString &passwd, const QString &host, int &sound, qreal &volume);
|
||||
void startRequest(const QUrl &requestedUrl);
|
||||
private: // attributes
|
||||
std::shared_ptr<CentralEffectSimulation::DdsHandler> m_ddsHandler; ///< Pointer to DDS handler
|
||||
std::shared_ptr<CentralEffectSimulation::HandlerBuildingData> m_handlerBuildingData;
|
||||
|
||||
QHash<int, AreaEffectSimulation::AesEffectState> m_explosionSingleState; // key = id, value = state
|
||||
QHash<int, AreaEffectSimulation::TechnicalArea> m_technicalAreas;
|
||||
QHash<int, QPointF> m_centerSoundArea; // key: TechnicalAreaId, value Center of SoundArea
|
||||
QHash<int, QPointF> m_egcus;
|
||||
QHash<int, QPointF> m_ogcus;
|
||||
|
||||
QNetworkAccessManager m_qnam;
|
||||
bool m_httpRequestAborted = false;
|
||||
|
||||
CentralEffectSimulation::LOGGER_T &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
};
|
||||
} // namespace CesArtillerySound
|
||||
|
||||
Reference in new issue
Block a user