Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Plugins/InfrastructureManagement/Shared/ism_mounting_point.cpp
T
berrux-dev 598fc2560e Complete Qt6 migration: full clean build green across groups G1-G12 incl. runtime plugin set
new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
2026-10-20 09:36:57 +02:00

156 lines
4.9 KiB
C++

/**
* @file ism_mounting_point.cpp
* @brief Implementation of MountingPointHelper methods for InfrastructureManagement
*
* This file provides implementations for the MountingPointHelper class methods
* that extend MountingPoint functionality.
*/
#include <InfrastructureManagement/Shared/ism_mounting_point.h>
#include <InfrastructureManagement/ism.hpp>
#include <InfrastructureManagement/ism_enums.hpp>
#include <QtGui/QImage>
#include <QtCore/QMap>
#include <QtCore/QString>
namespace InfrastructureManagement {
// MountingPoint static method implementations
QString MountingPoint::mpColorToString(MountingPoint::MpColor mpColor) {
switch (mpColor) {
case MountingPoint::MpColor::GRAY: return QStringLiteral("GRAY");
case MountingPoint::MpColor::BLUE: return QStringLiteral("BLUE");
case MountingPoint::MpColor::RED: return QStringLiteral("RED");
case MountingPoint::MpColor::GREEN: return QStringLiteral("GREEN");
case MountingPoint::MpColor::ORANGE: return QStringLiteral("ORANGE");
}
return QStringLiteral("GRAY");
}
QString MountingPoint::mpColorToPostfix(MountingPoint::MpColor mpColor) {
switch (mpColor) {
case MountingPoint::MpColor::GRAY: return QStringLiteral("_gray");
case MountingPoint::MpColor::BLUE: return QStringLiteral("_blue");
case MountingPoint::MpColor::RED: return QStringLiteral("_red");
case MountingPoint::MpColor::GREEN: return QStringLiteral("_green");
case MountingPoint::MpColor::ORANGE: return QStringLiteral("_orange");
}
return QStringLiteral("_gray");
}
QMap<MountingPointType, MountingPoint::MpNameImageData> &
MountingPoint::getImageTableInternal() {
static QMap<MountingPointType, MountingPoint::MpNameImageData> table;
static bool initialized = false;
if (!initialized) {
// Initialize with default values
initialized = true;
}
return table;
}
QMap<MountingPointType, MountingPoint::MpNameImageData> &
MountingPoint::getImageTable() {
return getImageTableInternal();
}
void MountingPoint::insertHelper(MountingPointType type,
const QString &name,
const QString &colorCodeGray,
const QString &colorCodeGreen,
const QString &colorCodeRed,
const QString &colorCodeOrange,
const QString &defName) {
Q_UNUSED(name);
Q_UNUSED(colorCodeGray);
Q_UNUSED(colorCodeGreen);
Q_UNUSED(colorCodeRed);
Q_UNUSED(colorCodeOrange);
Q_UNUSED(defName);
// Stub implementation - just ensure the type exists in the table
getImageTable()[type] = MountingPoint::MpNameImageData();
}
bool MountingPoint::getImageAttributePlanActivity(const MountingPoint& mp,
QImage &imgOut, QString &attribNameOut) {
Q_UNUSED(mp);
Q_UNUSED(imgOut);
Q_UNUSED(attribNameOut);
return false;
}
bool MountingPoint::getImageAttributePlanDefinition(const MountingPoint& mp,
QImage &imgOut, QString &attribNameOut) {
Q_UNUSED(mp);
Q_UNUSED(imgOut);
Q_UNUSED(attribNameOut);
return false;
}
bool MountingPoint::getImageAttribute(const MountingPoint& mp, MountingPoint::MpColor mpColor,
QImage &img, QString &attribName) {
Q_UNUSED(mp);
Q_UNUSED(mpColor);
Q_UNUSED(img);
Q_UNUSED(attribName);
return false;
}
// MountingPoint constructor and method implementations
MountingPoint::MountingPoint()
: m_associatedAssetId(-1)
, m_hasAssociatedAssetDefect(false)
, m_isValid(false)
, m_floor(0)
{
}
MountingPoint::MountingPoint(const StructureElement &data, int floorId)
: m_data(data)
, m_associatedAssetId(-1)
, m_hasAssociatedAssetDefect(false)
, m_isValid(true)
, m_floor(floorId)
{
}
void MountingPoint::init() {
// Stub implementation
}
QString MountingPoint::name() const {
// Qt6: legacy codegen exposed name() as a method; new codegen exposes 'name' as a public member.
return QString::fromStdString(m_data.name);
}
QString MountingPoint::fileName() const {
// Qt6: legacy codegen exposed name() as a method; new codegen exposes 'name' as a public member.
return QString::fromStdString(m_data.name);
}
QImage MountingPoint::toImage(int32_t edgeLength) const {
Q_UNUSED(edgeLength);
return QImage();
}
bool MountingPoint::writeFile(int32_t edgeLength) const {
Q_UNUSED(edgeLength);
return false;
}
void MountingPoint::setAssociatedAssetId(int32_t id) {
m_associatedAssetId = id;
}
void MountingPoint::setHasAssociatedAssetDefect(bool hasDefect) {
m_hasAssociatedAssetDefect = hasDefect;
}
MountingPointState MountingPoint::getNextMountingPointState(MountingPointState currState) {
Q_UNUSED(currState);
return MountingPointState();
}
} // namespace InfrastructureManagement