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
This commit is contained in:
1718 files changed
+126739
-18495
No files matched your search
+5
-3
@@ -6,7 +6,7 @@
|
||||
* that extend MountingPoint functionality.
|
||||
*/
|
||||
|
||||
#include <InfrastructureManagement/ism_mounting_point.h>
|
||||
#include <InfrastructureManagement/Shared/ism_mounting_point.h>
|
||||
#include <InfrastructureManagement/ism.hpp>
|
||||
#include <InfrastructureManagement/ism_enums.hpp>
|
||||
#include <QtGui/QImage>
|
||||
@@ -121,11 +121,13 @@ void MountingPoint::init() {
|
||||
}
|
||||
|
||||
QString MountingPoint::name() const {
|
||||
return QString::fromStdString(m_data.name());
|
||||
// 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 {
|
||||
return QString::fromStdString(m_data.name());
|
||||
// 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 {
|
||||
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* The MountingPoint class wraps all information from InfrastructureManagement which defines a mounting point
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Hannes Baeuerle, SLSE, 2017-01-16
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/InfrastructureManagement/Shared/ismshared_export.h>
|
||||
#include <InfrastructureManagement/ism.hpp>
|
||||
#include <InfrastructureManagement/ism_enums.hpp>
|
||||
#include <QtGui/QImage>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QString>
|
||||
|
||||
|
||||
namespace dds
|
||||
{
|
||||
namespace core
|
||||
{
|
||||
static inline uint qHash(const InfrastructureManagement::MountingPointType &mpt)
|
||||
{
|
||||
return ::qHash(static_cast<int>(mpt));
|
||||
}
|
||||
} // namespace core
|
||||
} // namespace dds
|
||||
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
|
||||
class ISMSHARED_EXPORT MountingPoint
|
||||
{
|
||||
public:
|
||||
explicit MountingPoint();
|
||||
explicit MountingPoint(const StructureElement &data, int floorId);
|
||||
static void init();
|
||||
|
||||
const StructureElement &data() const { return m_data; }
|
||||
void updateData(const StructureElement &data, int floorId) { m_data = data; m_floor = floorId; }
|
||||
int32_t id() const { return m_data.id; }
|
||||
int32_t associatedAssetId() const { return m_associatedAssetId; }
|
||||
bool hasAssociatedAsset() const { return m_associatedAssetId > 0; }
|
||||
bool hasAssociatedAssetDefect() const { return m_hasAssociatedAssetDefect; }
|
||||
|
||||
/*! \name aimState depends on the (loaded) plan/schedule!!! */
|
||||
//@{
|
||||
|
||||
//! \brief aimState of currently loaded schedule!!!
|
||||
//! \return aimState
|
||||
MountingPointState aimState() const { return m_aimState; }
|
||||
void setAimState(const MountingPointState &mps) { m_aimState = mps;}
|
||||
|
||||
//@}
|
||||
|
||||
bool isValid() const { return m_isValid; }
|
||||
Core::GeoPosition geoPosition() const { return m_data.geoPosition; }
|
||||
Core::RelativePosition relPosition() const { return m_data.relPosition; }
|
||||
MountingPointType type() const { return m_data.mountingPointTypeId; }
|
||||
int32_t buildingId() const { return m_data.mainStructureElementId; }
|
||||
QString name() const;
|
||||
QString fileName() const;
|
||||
QByteArray properties() const { return m_data.properties.c_str(); }
|
||||
|
||||
QImage toImage(int32_t edgeLength = 100) const;
|
||||
bool writeFile(int32_t edgeLength = 25) const;
|
||||
int floor() const { return m_floor; }
|
||||
void setFloor(int floor) { m_floor = floor; }
|
||||
|
||||
void setAssociatedAssetId(int32_t id);
|
||||
void setHasAssociatedAssetDefect(bool hasAssociatedAssetDefect);
|
||||
MountingPointState getNextMountingPointState(const MountingPointState currState);
|
||||
|
||||
private: // methods
|
||||
|
||||
private: // attributes
|
||||
StructureElement m_data;
|
||||
int32_t m_associatedAssetId;
|
||||
MountingPointState m_aimState{};
|
||||
bool m_hasAssociatedAssetDefect;
|
||||
bool m_isValid;
|
||||
int m_floor;
|
||||
|
||||
public:
|
||||
|
||||
enum class MpColor
|
||||
{
|
||||
GRAY,
|
||||
BLUE,
|
||||
RED,
|
||||
GREEN,
|
||||
ORANGE
|
||||
};
|
||||
static QString mpColorToString(MpColor mpColor);
|
||||
static QString mpColorToPostfix(MpColor mpColor);
|
||||
|
||||
struct NameImagePair
|
||||
{
|
||||
NameImagePair(const QString &name = QString(),
|
||||
const QImage &img = QImage())
|
||||
: m_name(name), m_img(img)
|
||||
{}
|
||||
QString m_name; // like announcement_BLUE
|
||||
QImage m_img;
|
||||
};
|
||||
struct MpNameImageData
|
||||
{
|
||||
NameImagePair nipGray;
|
||||
NameImagePair nipBlue;
|
||||
NameImagePair nipRed;
|
||||
NameImagePair nipGreen;
|
||||
NameImagePair nipOrange;
|
||||
};
|
||||
|
||||
//
|
||||
// Some methods regarding ImageTable:
|
||||
//
|
||||
static QMap<MountingPointType, MpNameImageData> &getImageTable(); // contains images in good quality (100*100px)
|
||||
|
||||
static bool getImageAttributePlanActivity(const MountingPoint& mp,
|
||||
QImage &imgOut, QString &attribNameOut);
|
||||
static bool getImageAttributePlanDefinition(const MountingPoint& mp,
|
||||
QImage &imgOut, QString &attribNameOut);
|
||||
|
||||
static bool getImageAttribute(const MountingPoint& mp, MpColor mpColor,
|
||||
QImage &img, QString &attribName);
|
||||
|
||||
private:
|
||||
static QMap<MountingPointType, MpNameImageData> &getImageTableInternal();
|
||||
static void insertHelper(MountingPointType type,
|
||||
const QString &name,
|
||||
const QString &colorCodeGray,
|
||||
const QString &colorCodeGreen,
|
||||
const QString &colorCodeRed,
|
||||
const QString &colorCodeOrange,
|
||||
const QString &defName = QString());
|
||||
|
||||
}; // class MountingPoint
|
||||
|
||||
} // namespace InfrastructureManagement
|
||||
Reference in new issue
Block a user