Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Plugins/InfrastructureManagement/Shared/ism_mounting_point.cpp
T
CopilotandCopilot e5d8bfa432 Fix FileManagement Build-Fehler (BUILD_RTI=OFF)
- flm_db.h: Stub-Header mit Folder/FileContent Klassen erstellt
- flm_enums.hpp: MainFolder Enum hinzugefügt (None=0)
- flm_translation.h: toInt() entfernt, trFolderName() angepasst
- Plugin-Interfaces erstellt (flm, opm, exm)
- Viewer-Dialogs: QString-Konvertierungen behoben
- AdvancedSymbology CMakeLists.txt: Ungültige Pfade entfernt
- ism_mounting_point.cpp: Redundante Definitionen entfernt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-29 21:01:46 +02:00

154 lines
4.7 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/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 {
return QString::fromStdString(m_data.name());
}
QString MountingPoint::fileName() const {
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