41 lines
1.1 KiB
C++
Executable File
41 lines
1.1 KiB
C++
Executable File
/**
|
|
* Convert from Equipment Number to Participant ID
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, SLSE, 2016-04-14
|
|
*/
|
|
|
|
#pragma once
|
|
#include <ParticipantManagement/ppm_dtc.h>
|
|
#include <QHash>
|
|
#include "logger.h"
|
|
|
|
namespace Buildings
|
|
{
|
|
class MainHandler;
|
|
|
|
class PpmHandler : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit PpmHandler(MainHandler *mainHandler);
|
|
~PpmHandler();
|
|
|
|
bool init();
|
|
int equipmentNumberToParticipantId(int equipmentNumber) const;
|
|
ParticipantManagement::ParticipantPosition participantPosition(int participantId) const;
|
|
|
|
private Q_SLOTS:
|
|
void onEquipmentExerciseMappingChanged(const ParticipantManagement::EquipmentExerciseMapping &data, DataModification modType);
|
|
void onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &data, DataModification modType);
|
|
private:
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
|
QHash<int, int> m_equipmentNumber2ParticipantId;
|
|
QHash<int, ParticipantManagement::ParticipantPosition> m_participantPositions;
|
|
MainHandler *m_mainHandler;
|
|
|
|
LOGGER_T m_logger;
|
|
};
|
|
}
|