- 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>
48 lines
1.4 KiB
C++
Executable File
48 lines
1.4 KiB
C++
Executable File
/**
|
|
* Handler for player data
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by hjl, SLSE, 2017-02-20
|
|
*/
|
|
|
|
#include "handler_pdm_data.h"
|
|
|
|
|
|
namespace EffectShowManagement
|
|
{
|
|
|
|
//=============================================================================
|
|
|
|
HandlerPdmData::HandlerPdmData(const std::shared_ptr<DdsHandler> &ddsHandler,
|
|
QObject *parent)
|
|
|
|
: QObject(parent)
|
|
, m_ddsHandler(ddsHandler)
|
|
, m_logger(getLogger("HandlerPdmData"))
|
|
{
|
|
} // end of ctor()
|
|
//=============================================================================
|
|
|
|
bool HandlerPdmData::isSmoke(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
|
{
|
|
return m_ddsHandler->dtcPdm()->isSmoke(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
|
} // end of isSmoke()
|
|
|
|
int HandlerPdmData::effectShowCount(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
|
{
|
|
return m_ddsHandler->dtcPdm()->maxEffectShows(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
|
}
|
|
|
|
int HandlerPdmData::getCadence(const int chargeId) const
|
|
{
|
|
const auto &gearTypeIds = m_ddsHandler->dtcPdm()->gearTypeIdFromChargeTypeId(chargeId);
|
|
int cadence = 35000;
|
|
if (gearTypeIds.size())
|
|
cadence = m_ddsHandler->dtcPdm()->cadence(gearTypeIds.at(0));
|
|
|
|
return cadence;
|
|
}
|
|
|
|
} // namespace EffectShowManagement
|