Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
@@ -36,7 +36,7 @@ ADD_INTERFACE_LIBRARY(
|
||||
# Data Plugin Interface
|
||||
#
|
||||
# need top be shared due to signals/slots
|
||||
NGL_ADD_LIBRARY(WS IsmDataPluginInterface SHARED ism_data_plugin_interface.h)
|
||||
NGL_ADD_LIBRARY2(WS IsmDataPluginInterface SHARED ism_data_plugin_interface.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(IsmDataPluginInterface
|
||||
Qt6::Core
|
||||
svcIsmCommon
|
||||
|
||||
+14
-15
@@ -35,7 +35,6 @@ ForeignInterfaceImpl::ForeignInterfaceImpl(const std::shared_ptr<Interface::Dtc>
|
||||
: m_dtc(dtc)
|
||||
, m_scheduleId(-1)
|
||||
, m_exerciseId(exerciseId)
|
||||
, m_logger(getLogger("ForeignDataInterface"))
|
||||
{
|
||||
|
||||
}
|
||||
@@ -50,7 +49,7 @@ void ForeignInterfaceImpl::enableIsmForeignInterface() const
|
||||
|
||||
if (!m_mountingPoints.isEmpty())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START, ismDataDtc, m_exerciseId = " << m_exerciseId
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START, ismDataDtc, m_exerciseId = " << m_exerciseId
|
||||
<< " already initialized -> return";
|
||||
return;
|
||||
}
|
||||
@@ -60,7 +59,7 @@ void ForeignInterfaceImpl::enableIsmForeignInterface() const
|
||||
NON_CONST_THIS->init();
|
||||
|
||||
#ifdef BENCHMARK_RUN
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " ISM::StructureElementCache / ForeignInterfaceImpl::init took " << elapsedTimer.elapsed() << " [ms]"
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " ISM::StructureElementCache / ForeignInterfaceImpl::init took " << elapsedTimer.elapsed() << " [ms]"
|
||||
<< " - m_exerciseId = " << m_exerciseId
|
||||
<< " - m_mountingPoints.size()=" << m_mountingPoints.size()
|
||||
<< ", (m_mountingPointAssetMap.size()=" << m_mountingPointAssetMap.size() << ")";
|
||||
@@ -76,12 +75,12 @@ bool ForeignInterfaceImpl::mountingPoints(const std::function<void (const Mounti
|
||||
cb(it.value());
|
||||
|
||||
#ifdef BENCHMARK_RUN
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " - m_exerciseId = " << m_exerciseId
|
||||
<< " - m_mountingPoints.size()=" << m_mountingPoints.size()
|
||||
<< " took " << elapsedTimer.elapsed() << " [ms]";
|
||||
#else
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " - m_exerciseId = " << m_exerciseId
|
||||
<< " - m_mountingPoints.size()=" << m_mountingPoints.size();
|
||||
#endif
|
||||
@@ -118,7 +117,7 @@ MainSchedule ForeignInterfaceImpl::mainSchedule(int32_t scheduleId)
|
||||
|
||||
void ForeignInterfaceImpl::setScheduleId(int32_t scheduleId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "setScheduleId to: " << scheduleId
|
||||
DEBUG_LOG() << "setScheduleId to: " << scheduleId
|
||||
<< " (was " << m_scheduleId << ")";
|
||||
|
||||
enableIsmForeignInterface();
|
||||
@@ -184,7 +183,7 @@ void ForeignInterfaceImpl::onMainStructureElementChanged(const MainStructureElem
|
||||
|
||||
const QJsonDocument doc(QJsonDocument::fromJson(content, &parserError));
|
||||
if (parserError.error != QJsonParseError::NoError)
|
||||
WARNING_LOG(m_logger) << "Invalid properties for MSE " << data.id() << ", " << data.name();
|
||||
WARNING_LOG() << "Invalid properties for MSE " << data.id() << ", " << data.name();
|
||||
else
|
||||
{
|
||||
const QJsonArray exercises(QJsonObject(doc.object()).value(QStringLiteral("available_in_exercise")).toArray());
|
||||
@@ -222,7 +221,7 @@ void ForeignInterfaceImpl::onMainStructureElementChanged(const MainStructureElem
|
||||
if (realChange)
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " m_bldgsInExcersise updated."
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " m_bldgsInExcersise updated."
|
||||
<< " (mseId=" << mseId << " name=" << data.name();
|
||||
emit buildingsInCurrentExerciseChanged();
|
||||
}
|
||||
@@ -248,7 +247,7 @@ void ForeignInterfaceImpl::onMainStructureElementChanged(const MainStructureElem
|
||||
|
||||
|
||||
if (!m_dtc->getStructureElementById(curPath[1], seFloor))
|
||||
WARNING_LOG(m_logger) << " getStructureElementById failed for " << curPath[1];
|
||||
WARNING_LOG() << " getStructureElementById failed for " << curPath[1];
|
||||
|
||||
}
|
||||
|
||||
@@ -269,7 +268,7 @@ void ForeignInterfaceImpl::onMainStructureElementChanged(const MainStructureElem
|
||||
mountingPointRef.updateData(currentStructEle, floorId);
|
||||
emit mountingPointChanged(mountingPointRef, DataModification::eModified);
|
||||
} else {
|
||||
DEBUG_LOG(m_logger) << "New Mounting point with id " << currentStructEle.id()
|
||||
DEBUG_LOG() << "New Mounting point with id " << currentStructEle.id()
|
||||
<< " and type " << currentStructEle.mountingPointTypeId()
|
||||
<< " (type " << currentStructEle.mountingPointTypeId().underlying() << ")"
|
||||
<< " subid: " << currentStructEle.mountingPointId() << this;
|
||||
@@ -295,7 +294,7 @@ void ForeignInterfaceImpl::onMountingPointAssetChanged(const MountingPointAsset
|
||||
{
|
||||
const int32_t structureElementId = data.structureElementId();
|
||||
|
||||
DEBUG_LOG(m_logger) << "onMountingPointAssetChanged se id: " << structureElementId << ", assetId: " << data.assetId();
|
||||
DEBUG_LOG() << "onMountingPointAssetChanged se id: " << structureElementId << ", assetId: " << data.assetId();
|
||||
|
||||
|
||||
|
||||
@@ -367,7 +366,7 @@ void ForeignInterfaceImpl::onMainScheduleChanged(const MainSchedule &data, DataM
|
||||
|
||||
void ForeignInterfaceImpl::init()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START, ismDataDtc, m_exerciseId = " << m_exerciseId
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START, ismDataDtc, m_exerciseId = " << m_exerciseId
|
||||
<< " - m_mountingPoints.size()=" << m_mountingPoints.size()
|
||||
<< ", (m_mountingPointAssetMap.size()=" << m_mountingPointAssetMap.size() << ")";
|
||||
|
||||
@@ -426,12 +425,12 @@ void ForeignInterfaceImpl::init()
|
||||
int firstBldg = -1;
|
||||
if (!m_bldgsInExcersise.isEmpty())
|
||||
firstBldg = *m_bldgsInExcersise.begin();
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << ", exerciseId = " << m_exerciseId << ", bldgs in excersise = " << m_bldgsInExcersise.size()
|
||||
DEBUG_LOG() << Q_FUNC_INFO << ", exerciseId = " << m_exerciseId << ", bldgs in excersise = " << m_bldgsInExcersise.size()
|
||||
<< ", firstBldg: " << firstBldg;
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << "XXXXX" << m_bldgsInExcersise.size();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << "XXXXX" << m_bldgsInExcersise.size();
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " END, ismDataDtc, m_exerciseId = " << m_exerciseId
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " END, ismDataDtc, m_exerciseId = " << m_exerciseId
|
||||
<< " - m_mountingPoints.size()=" << m_mountingPoints.size()
|
||||
<< ", (m_mountingPointAssetMap.size()=" << m_mountingPointAssetMap.size() << ")";
|
||||
}
|
||||
|
||||
-1
@@ -64,7 +64,6 @@ private:
|
||||
|
||||
int32_t m_scheduleId;
|
||||
int32_t m_exerciseId{-1};
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+2
-3
@@ -48,7 +48,6 @@ SetRecordingDialog::SetRecordingDialog(QWidget *parent)
|
||||
, m_model(nullptr)
|
||||
, m_checkStateProxyModel(nullptr)
|
||||
, m_timerUpdate(nullptr)
|
||||
, m_logger(getLogger("SetRecordingDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
setOnlineHelpFilename(QStringLiteral("Ressourcen-Exercise_Assignment"));
|
||||
@@ -74,7 +73,7 @@ bool SetRecordingDialog::init(const std::shared_ptr<Interface::Dtc> &ismDtc, con
|
||||
if (!(m_ismDtc->enableMainStructureElement() &&
|
||||
m_ismFtc->enableMainStructureElementModify()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable ISM topics";
|
||||
ERROR_LOG() << "Could not enable ISM topics";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -89,7 +88,7 @@ bool SetRecordingDialog::init(const std::shared_ptr<Interface::Dtc> &ismDtc, con
|
||||
{
|
||||
delete m_model;
|
||||
m_model = nullptr;
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -53,8 +53,6 @@ private:
|
||||
SetRecordingCheckStateProxyModel *m_checkStateProxyModel;
|
||||
QTimer *m_timerUpdate;
|
||||
bool update = false;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+3
-4
@@ -16,7 +16,6 @@ namespace InfrastructureManagement
|
||||
SetRecordingDialogModel::SetRecordingDialogModel(QObject *parent)
|
||||
: NGLTreeModel(parent, new NGLTreeItem(QVariant()), { tr("Name") })
|
||||
, m_dtc(nullptr)
|
||||
, m_logger(getLogger("InfrastructureManagement"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -54,7 +53,7 @@ bool SetRecordingDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &d
|
||||
if (!(m_dtc->enableMainStructureElement() &&
|
||||
m_dtc->enableMountingPointAsset()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopics";
|
||||
ERROR_LOG() << "Could not enable Datatopics";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -63,7 +62,7 @@ bool SetRecordingDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &d
|
||||
connect(m_dataInterface.get(), &ForeignDataInterface::mountingPointChanged,
|
||||
this, &SetRecordingDialogModel::onMountingPointChanged);
|
||||
|
||||
INFO_LOG(m_logger) << "initModel successfull";
|
||||
INFO_LOG() << "initModel successfull";
|
||||
|
||||
initData();
|
||||
|
||||
@@ -122,7 +121,7 @@ void SetRecordingDialogModel::initData()
|
||||
if(mapGroup.contains(groupId))
|
||||
continue;
|
||||
const QString sectionText = InfrastructureManagement::toString(static_cast<InfrastructureManagement::BuildingGroup_def::type>(groupId));
|
||||
DEBUG_LOG(m_logger)<<" >> Adding section >> "<<sectionText;
|
||||
DEBUG_LOG()<<" >> Adding section >> "<<sectionText;
|
||||
NGLTreeItem *sectionRoot = new NGLTreeItem(sectionText);
|
||||
mapGroup.insert(groupId, sectionRoot);
|
||||
m_rootItem->appendChild(mapGroup.value(groupId));
|
||||
|
||||
-2
@@ -64,8 +64,6 @@ private:
|
||||
private:
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<InfrastructureManagement::ForeignDataInterface> m_dataInterface;
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
Q_DECLARE_METATYPE(InfrastructureManagement::SimpleRecordingData)
|
||||
+4
-5
@@ -28,7 +28,6 @@ ExerciseAssignmentDialog::ExerciseAssignmentDialog(LtsSession::LtsSession *sessi
|
||||
, m_exmDtc(nullptr)
|
||||
, m_model(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("ExerciseAssignmentDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->assetListView->setSelectionMode(QAbstractItemView::MultiSelection);
|
||||
@@ -57,19 +56,19 @@ bool ExerciseAssignmentDialog::init(const std::shared_ptr<Interface::Dtc> &ismDt
|
||||
|
||||
if (!m_ismFtc->enableInstrumentationAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ismFtc->enableMainStructureElementModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MainStructureElementModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MainStructureElementModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_exmDtc->enableExercise())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable DT Exercise of EXM";
|
||||
ERROR_LOG() << "Could not enable DT Exercise of EXM";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -84,7 +83,7 @@ bool ExerciseAssignmentDialog::init(const std::shared_ptr<Interface::Dtc> &ismDt
|
||||
m_model = new ExerciseAssignmentDialogModel(this);
|
||||
if (!m_model->initModel(m_ismDtc, m_exmDtc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
delete m_model;
|
||||
m_model = nullptr;
|
||||
return false;
|
||||
|
||||
-2
@@ -55,7 +55,5 @@ private:
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
|
||||
ExerciseAssignmentDialogModel *m_model;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
+4
-5
@@ -18,7 +18,6 @@ ExerciseAssignmentDialogModel::ExerciseAssignmentDialogModel(QObject *parent)
|
||||
parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_exmDtc(nullptr)
|
||||
, m_logger(getLogger("ExerciseAssignmentDialogModel"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -47,7 +46,7 @@ QVariant ExerciseAssignmentDialogModel::data(const QModelIndex &index, int role)
|
||||
|
||||
if (parseError.error != QJsonParseError::NoError)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Could not parse JSON props of building with ID "
|
||||
INFO_LOG() << "Could not parse JSON props of building with ID "
|
||||
<< currentMainStructureElement.id()
|
||||
<< ". Reason: "
|
||||
<< parseError.errorString()
|
||||
@@ -84,13 +83,13 @@ bool ExerciseAssignmentDialogModel::initModel(const std::shared_ptr<Interface::D
|
||||
|
||||
if (!m_dtc->enableInstrumentationAsset())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopic InstrumentationAsset of the Data Topic Client";
|
||||
ERROR_LOG() << "Could not enable Datatopic InstrumentationAsset of the Data Topic Client";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_exmDtc->enableExercise())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Topic Exercise from Exercise Management DTC";
|
||||
ERROR_LOG() << "Could not enable Topic Exercise from Exercise Management DTC";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -103,7 +102,7 @@ bool ExerciseAssignmentDialogModel::initModel(const std::shared_ptr<Interface::D
|
||||
};
|
||||
m_dtc->mainStructureElements(cb);
|
||||
|
||||
INFO_LOG(m_logger) << "initModel successful";
|
||||
INFO_LOG() << "initModel successful";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
-2
@@ -37,8 +37,6 @@ private:
|
||||
private:
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -19,7 +19,6 @@ ApproachingPointsDialog::ApproachingPointsDialog(const QString &menuGroup, LtsSe
|
||||
, m_ui(new Ui::ApproachingPointsDialog)
|
||||
, m_model(nullptr)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_logger(getLogger("ApproachingPointsDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -54,7 +53,7 @@ bool ApproachingPointsDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
m_model = new ApproachingPointsDialogModel(this);
|
||||
if (!m_model->initModel(dtc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
delete m_model;
|
||||
m_model = nullptr;
|
||||
return false;
|
||||
|
||||
-4
@@ -58,9 +58,5 @@ private:
|
||||
QString m_menuGroup;
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<SituationMap::ForeignGuiInterface> m_sitMapIfc;
|
||||
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+1
-2
@@ -22,7 +22,6 @@ ApproachingPointsDialogModel::ApproachingPointsDialogModel(QObject *parent)
|
||||
tr("Special Type"),
|
||||
tr("Properties")},
|
||||
parent)
|
||||
, m_logger(getLogger("ApproachingPointsDialogModel"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -67,7 +66,7 @@ bool ApproachingPointsDialogModel::initModel(const std::shared_ptr<Interface::Dt
|
||||
};
|
||||
dtc->mainStructureElements(cb);
|
||||
|
||||
INFO_LOG(m_logger) << "initModel successful";
|
||||
INFO_LOG() << "initModel successful";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-3
@@ -34,8 +34,6 @@ public:
|
||||
protected:
|
||||
bool isFiltered(const InfrastructureManagement::MainStructureElement &data, DataModification modType) const override;
|
||||
|
||||
private:
|
||||
|
||||
LOGGER_T m_logger;
|
||||
private:
|
||||
};
|
||||
}
|
||||
-1
@@ -21,7 +21,6 @@ EditApproachingPointDialog::EditApproachingPointDialog(QWidget *parent)
|
||||
, m_ftc(nullptr)
|
||||
, m_sitMapGuiIfc(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("EditApproachingPointDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
fillCbDepartureDirection();
|
||||
|
||||
-3
@@ -59,8 +59,5 @@ private:
|
||||
std::shared_ptr<SituationMap::ForeignGuiInterface> m_sitMapGuiIfc;
|
||||
MainStructureElement m_approachingPoint;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+18
-19
@@ -44,7 +44,6 @@ AssetListDialog::AssetListDialog(const QString &menuGroup, LtsSession::LtsSessio
|
||||
, m_ftc(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper())
|
||||
, m_ui(new Ui::AssetListDialog)
|
||||
, m_logger(getLogger("AssetListDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Print, this, &AssetListDialog::onPrint);
|
||||
@@ -266,7 +265,7 @@ InstrumentationAsset AssetListDialog::importData(const QVector<QStringRef> &segm
|
||||
{
|
||||
if (bOk)
|
||||
*bOk = false;
|
||||
WARNING_LOG(m_logger) << "Could not determine mounting point type from barcode: " << dmc.toString();
|
||||
WARNING_LOG() << "Could not determine mounting point type from barcode: " << dmc.toString();
|
||||
}
|
||||
|
||||
return asset;
|
||||
@@ -412,40 +411,40 @@ bool AssetListDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_ftc->enableStructureElementModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT StructureElementModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT StructureElementModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
if (!m_ftc->enableMountingPointAssetRemove())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
return false;
|
||||
}
|
||||
if (!m_ftc->enableInstrumentationAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
if (!m_ftc->enableInstrumentationAssetUnmount())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetUnmount of ISM";
|
||||
ERROR_LOG() << "Could not enable FT InstrumentationAssetUnmount of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_cmoFtc->enableTriggerUpdate())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT TriggerUpdate of CMO";
|
||||
ERROR_LOG() << "Could not enable FT TriggerUpdate of CMO";
|
||||
return false;
|
||||
}
|
||||
|
||||
if(m_ftc->enableInstrumentationAssetSetState() == false)
|
||||
{
|
||||
ERROR_LOG(m_logger)<<"Couldn't enable InstrumentationAssetSetState";
|
||||
ERROR_LOG()<<"Couldn't enable InstrumentationAssetSetState";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -456,7 +455,7 @@ bool AssetListDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_model->initModel(m_dtc, m_cmoDtc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
delete m_model;
|
||||
m_model = nullptr;
|
||||
return false;
|
||||
@@ -611,7 +610,7 @@ void AssetListDialog::onImportClicked()
|
||||
QVector<QStringRef> segments = line.splitRef(QLatin1Char(';'));
|
||||
if (segments.size() < 10)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Skipping line '" << line << "' - to few data";
|
||||
WARNING_LOG() << "Skipping line '" << line << "' - to few data";
|
||||
continue;
|
||||
}
|
||||
const InstrumentationAsset ia = importData(segments, &bOk);
|
||||
@@ -650,7 +649,7 @@ void AssetListDialog::onExportClicked()
|
||||
AssetFilterDialog *filterDialog = new AssetFilterDialog(m_model, this);
|
||||
if (!filterDialog->init(m_ui->assetListView->selectionModel()->selectedRows().size() > 0))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unexpected error";
|
||||
ERROR_LOG() << "Unexpected error";
|
||||
return;
|
||||
}
|
||||
filterDialog->fillAssetComboBoxes();
|
||||
@@ -679,7 +678,7 @@ void AssetListDialog::onUnmountButtonClicked()
|
||||
StructureElement se;
|
||||
if(m_dtc->getStructureElementInMntPointAssetByAssetId(asset.id(), se) == false)
|
||||
{
|
||||
WARNING_LOG(m_logger)<<" asset not mounted. name: "<<asset.name()<< " id: "<<asset.id();
|
||||
WARNING_LOG()<<" asset not mounted. name: "<<asset.name()<< " id: "<<asset.id();
|
||||
continue;
|
||||
}
|
||||
InstrumentationAssetUnmountRequest req(asset.id());
|
||||
@@ -692,7 +691,7 @@ void AssetListDialog::onUnmountButtonClicked()
|
||||
if(m_requestHelper->hasRequests() &&
|
||||
m_requestHelper->startRequests() == false)
|
||||
{
|
||||
ERROR_LOG(m_logger)<<" Couldn't unmount selected assets";
|
||||
ERROR_LOG()<<" Couldn't unmount selected assets";
|
||||
}
|
||||
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Load,false);
|
||||
@@ -754,7 +753,7 @@ void AssetListDialog::onFilterSelected(const AssetFilterDialog::Export &exp, con
|
||||
|
||||
void AssetListDialog::onCustomContextMenuRequested(const QPoint &globalPos, const QModelIndex &indexSrc)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START, indexSrc" << indexSrc.row();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START, indexSrc" << indexSrc.row();
|
||||
if (!indexSrc.isValid())
|
||||
return;
|
||||
|
||||
@@ -778,7 +777,7 @@ void AssetListDialog::onReachabilityUpdateAction()
|
||||
if (bhasHostnameForTriggerUpdate)
|
||||
{
|
||||
m_hostsForUpdate.insert(QString::fromStdString(ia.hostname()));
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " trigger update for " << ia;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " trigger update for " << ia;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -787,7 +786,7 @@ void AssetListDialog::onReachabilityUpdateAction()
|
||||
|
||||
void AssetListDialog::onHostsForUpdateNotifyTimeout()
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " START, hostsForUpdate.size() = " << m_hostsForUpdate.size();
|
||||
INFO_LOG() << Q_FUNC_INFO << " START, hostsForUpdate.size() = " << m_hostsForUpdate.size();
|
||||
|
||||
if (!m_cmoFtc)
|
||||
return;
|
||||
@@ -795,7 +794,7 @@ void AssetListDialog::onHostsForUpdateNotifyTimeout()
|
||||
return;
|
||||
|
||||
for (auto item : std::as_const(m_hostsForUpdate))
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " host = " << item;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " host = " << item;
|
||||
|
||||
|
||||
std::vector<std::string> hostnameStd;
|
||||
@@ -807,7 +806,7 @@ void AssetListDialog::onHostsForUpdateNotifyTimeout()
|
||||
ComponentMonitor::TriggerUpdate request;
|
||||
request.hostnames(hostnameStd);
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " TriggerUpdate - request = " << request;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " TriggerUpdate - request = " << request;
|
||||
|
||||
m_requestHelper->addRequest([request, this]()
|
||||
{
|
||||
|
||||
-3
@@ -103,8 +103,5 @@ private:
|
||||
QSet<QString> m_hostsForUpdate;
|
||||
QTimer *m_hostsForUpdateNotifiy{nullptr};
|
||||
QTimer *m_updateBtnBoxBtns{nullptr};
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+3
-4
@@ -39,7 +39,6 @@ parent)
|
||||
, m_alteredCells()
|
||||
, m_alteredValues()
|
||||
, m_updateFilterTimer(new QTimer(this))
|
||||
, m_logger(getLogger("AssetListDialogModel"))
|
||||
{
|
||||
m_intactStr = tr("Intact");
|
||||
updateFilterStates();
|
||||
@@ -311,12 +310,12 @@ bool AssetListDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_dtc->enableInstrumentationAsset())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopic InstrumentationAsset of the Data Topic Client";
|
||||
ERROR_LOG() << "Could not enable Datatopic InstrumentationAsset of the Data Topic Client";
|
||||
return false;
|
||||
}
|
||||
if (!m_cmoDtc->enableComponentStatus())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopic enableComponentStatus of cmo";
|
||||
ERROR_LOG() << "Could not enable Datatopic enableComponentStatus of cmo";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -367,7 +366,7 @@ bool AssetListDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
connect(this, &AssetListDialogModel::modelReset, this, &AssetListDialogModel::onUpdateFilter);
|
||||
onUpdateFilter();
|
||||
|
||||
INFO_LOG(m_logger) << "initModel successfull";
|
||||
INFO_LOG() << "initModel successfull";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
-1
@@ -17,7 +17,6 @@ EditAssetDialog::EditAssetDialog(QWidget *parent, const std::shared_ptr<Interfac
|
||||
, m_ftc(ftc)
|
||||
, m_asset(assets)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("EditAssetDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
|
||||
-3
@@ -50,8 +50,5 @@ private:
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
std::vector<InstrumentationAsset> m_asset;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
-1
@@ -15,7 +15,6 @@ AssetFilterDialog::AssetFilterDialog(AssetListDialogModel *model, QWidget *paren
|
||||
: LtsWidgets::LtsFramelessDialog(parent)
|
||||
, m_model(model)
|
||||
, m_ui(new Ui::AssetFilterDialog)
|
||||
, m_logger(getLogger("AssetFilterDialog"))
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_ui->setupUi(this);
|
||||
|
||||
+2
-3
@@ -16,7 +16,6 @@ SetPropertiesDialog::SetPropertiesDialog(QLineEdit *lineEdit, QWidget *parent)
|
||||
: LtsWidgets::LtsFramelessDialog(parent)
|
||||
, m_ui(new Ui::SetPropertiesDialog)
|
||||
, m_lineEdit(lineEdit)
|
||||
, m_logger(getLogger("SetPropertiesDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
init();
|
||||
@@ -46,13 +45,13 @@ void SetPropertiesDialog::init()
|
||||
|
||||
if (error.error != QJsonParseError::NoError)
|
||||
{
|
||||
ERROR_LOG(m_logger) << error.errorString();
|
||||
ERROR_LOG() << error.errorString();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!doc.isObject())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Properties String is no JSON-Object";
|
||||
ERROR_LOG() << "Properties String is no JSON-Object";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -47,6 +47,5 @@ private:
|
||||
Ui::SetPropertiesDialog *m_ui;
|
||||
QMap<QLineEdit *, QLineEdit *> m_properties;
|
||||
QLineEdit *m_lineEdit;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
-1
@@ -14,7 +14,6 @@ namespace InfrastructureManagement
|
||||
CustomViewSchedule::CustomViewSchedule(QWidget *parent)
|
||||
: AbstractDisplayWidget(parent)
|
||||
, m_ui(new Ui::CustomViewSchedule)
|
||||
, m_logger(getLogger("CustomViewSchedule"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
|
||||
+3
-4
@@ -32,7 +32,6 @@ ExerciseAssignmentDialog::ExerciseAssignmentDialog(LtsSession::LtsSession *sessi
|
||||
, m_model(nullptr)
|
||||
, m_modelAssignedFilter(new ExerciseAssignmentDialogModelFilterProxy(this))
|
||||
, m_modelUnassignedFilter(new ExerciseAssignmentDialogModelFilterProxy(this))
|
||||
, m_logger(getLogger("ExerciseAssignmentDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Print, this, &ExerciseAssignmentDialog::onPrint);
|
||||
@@ -47,13 +46,13 @@ ExerciseAssignmentDialog::ExerciseAssignmentDialog(LtsSession::LtsSession *sessi
|
||||
|
||||
if (!m_ftc->enableMainStructureElementModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MainStructureElementModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MainStructureElementModify of ISM";
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
if (!exmDtc->enableExercise())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable DT Exercise of EXM";
|
||||
ERROR_LOG() << "Could not enable DT Exercise of EXM";
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
@@ -242,7 +241,7 @@ bool ExerciseAssignmentDialog::apply()
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "can't parse json for mseId " << ri.mseId << " and excId " << ri.exerciseId << " - using new json";
|
||||
ERROR_LOG() << "can't parse json for mseId " << ri.mseId << " and excId " << ri.exerciseId << " - using new json";
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -56,6 +56,5 @@ private:
|
||||
ExerciseAssignmentDialogModelFilterProxy *m_modelUnassignedFilter;
|
||||
|
||||
QMap<qint32, ExerciseManagement::Exercise> m_exercises;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
+1
-2
@@ -18,7 +18,6 @@ ExerciseAssignmentDialogModel::ExerciseAssignmentDialogModel(const QMap<qint32,
|
||||
: QAbstractItemModel(parent)
|
||||
, m_rootItem(new TreeItem(0, 0, tr("InvisibleRootItem"), -1))
|
||||
, m_exercises(exercises)
|
||||
, m_logger(getLogger("ExerciseAssignmentDialogModel"))
|
||||
{
|
||||
for (int it = BuildingGroup_def::UnknownGroup;
|
||||
it <= BuildingGroup_def::Salchau;
|
||||
@@ -46,7 +45,7 @@ void ExerciseAssignmentDialogModel::addMse(int mseId, int sectionId, const QStri
|
||||
return;
|
||||
}
|
||||
}
|
||||
ERROR_LOG(m_logger) << "Did not find section with enum value " << sectionId;
|
||||
ERROR_LOG() << "Did not find section with enum value " << sectionId;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -24,7 +24,6 @@ public:
|
||||
ExerciseAssignmentDialogModelFilterProxy(QObject *parent)
|
||||
: QSortFilterProxyModel(parent)
|
||||
, m_exerciseId(0)
|
||||
, m_logger(getLogger("ExerciseAssignmentDialogModelFilterProxy"))
|
||||
{
|
||||
setRecursiveFilteringEnabled(true);
|
||||
}
|
||||
@@ -77,7 +76,6 @@ protected:
|
||||
private:
|
||||
int m_exerciseId;
|
||||
ExerciseAssignmentDialogModel *m_sourceModel;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+8
-9
@@ -28,7 +28,6 @@ MountingPointInfoDialog::MountingPointInfoDialog(int32_t mountingPointId, int32_
|
||||
, m_dtc(nullptr)
|
||||
, m_ismIfc(nullptr)
|
||||
, m_avmIfc(nullptr)
|
||||
, m_logger(getLogger("MountingPointInfoDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->gbxAsset->hide();
|
||||
@@ -66,7 +65,7 @@ bool MountingPointInfoDialog::init(const std::shared_ptr<InfrastructureManagemen
|
||||
const std::shared_ptr<ForeignDataInterface> &ismIfc,
|
||||
const std::shared_ptr<AudioVideoManagement::ForeignDataInterface> &avmIfc)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Initializing MountingPointInfoDialog ...";
|
||||
DEBUG_LOG() << "Initializing MountingPointInfoDialog ...";
|
||||
|
||||
disconnect();
|
||||
m_dtc = dtc;
|
||||
@@ -217,11 +216,11 @@ bool MountingPointInfoDialog::init(const std::shared_ptr<InfrastructureManagemen
|
||||
break;
|
||||
case InfrastructureManagement::MountingPointType::Unknown:
|
||||
default:
|
||||
WARNING_LOG(m_logger) << "Unknown MountingPointType found for assetId " << m_assetId << ": " << toString(mountingPointData.mountingPointTypeId());
|
||||
WARNING_LOG() << "Unknown MountingPointType found for assetId " << m_assetId << ": " << toString(mountingPointData.mountingPointTypeId());
|
||||
break;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Initializing MountingPointInfoDialog done :)";
|
||||
DEBUG_LOG() << "Initializing MountingPointInfoDialog done :)";
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -261,7 +260,7 @@ void MountingPointInfoDialog::onShowStream() const
|
||||
{
|
||||
if (!m_avmIfc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "m_avmIfc is not loaded.";
|
||||
ERROR_LOG() << "m_avmIfc is not loaded.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -272,7 +271,7 @@ void MountingPointInfoDialog::onAnnouncement() const
|
||||
{
|
||||
if (!m_avmIfc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "m_avmIfc is not loaded.";
|
||||
ERROR_LOG() << "m_avmIfc is not loaded.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -282,7 +281,7 @@ void MountingPointInfoDialog::onAnnouncement() const
|
||||
void MountingPointInfoDialog::showAsset(const InfrastructureManagement::InstrumentationAsset &asset)
|
||||
{
|
||||
removeAsset();
|
||||
DEBUG_LOG(m_logger) << "Showing new asset";
|
||||
DEBUG_LOG() << "Showing new asset";
|
||||
|
||||
m_assetId = asset.id();
|
||||
|
||||
@@ -309,7 +308,7 @@ void MountingPointInfoDialog::showAsset(const InfrastructureManagement::Instrume
|
||||
|
||||
void MountingPointInfoDialog::removeAsset()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Removing asset information";
|
||||
DEBUG_LOG() << "Removing asset information";
|
||||
|
||||
m_assetId = -1;
|
||||
m_ui->gbxAsset->hide();
|
||||
@@ -323,7 +322,7 @@ void MountingPointInfoDialog::removeAsset()
|
||||
|
||||
void MountingPointInfoDialog::addAssetProperty(const QString &propName, const QString &propValue)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Adding asset property "
|
||||
DEBUG_LOG() << "Adding asset property "
|
||||
<< propName
|
||||
<< ':'
|
||||
<< propValue;
|
||||
|
||||
-1
@@ -58,6 +58,5 @@ private:
|
||||
std::shared_ptr<InfrastructureManagement::ForeignDataInterface> m_ismIfc;
|
||||
std::shared_ptr<AudioVideoManagement::ForeignDataInterface> m_avmIfc;
|
||||
QVector<QLabel *> m_dynamicAssetPropLabels;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
+22
-23
@@ -69,19 +69,18 @@ MountingPointListDialog::MountingPointListDialog(const QString &menuGroup, QWidg
|
||||
, m_ddsSelector(nullptr)
|
||||
, m_scheduleId(-1)
|
||||
, m_ui(new Ui::MountingPointListDialog)
|
||||
, m_logger(getLogger("MountingPointListDialog"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
m_ui->setupUi(this);
|
||||
setOnlineHelpFilename(QStringLiteral("Ressourcen-Mounting_Point_List"));
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Print, this, &MountingPointListDialog::onPrint);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
MountingPointListDialog::~MountingPointListDialog()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_mapGuiInterface->removeObjectIndicator();
|
||||
m_mapGuiInterface->setSkipMapObjectSelectionDialog(false);
|
||||
|
||||
@@ -96,7 +95,7 @@ MountingPointListDialog::~MountingPointListDialog()
|
||||
delete m_ui;
|
||||
delete m_ddsSelector;
|
||||
delete m_requestHelper;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void MountingPointListDialog::retranslate()
|
||||
@@ -113,7 +112,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
const std::shared_ptr<SituationMap::ForeignGuiInterface> &mapIfc,
|
||||
const std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> fltBuildingComponentIfc)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_dtc = dtc;
|
||||
m_ftc = ftc;
|
||||
m_dataIfc = dataInterface;
|
||||
@@ -127,43 +126,43 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableInstrumentationAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT enableInstrumentationAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetRemove())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableInstrumentationAssetRemove of ISM";
|
||||
ERROR_LOG() << "Could not enable FT enableInstrumentationAssetRemove of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetUnmount())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableInstrumentationAssetUnmount of ISM";
|
||||
ERROR_LOG() << "Could not enable FT enableInstrumentationAssetUnmount of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointAssetRemove())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableStructureElementModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableStructureElementModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT enableStructureElementModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -184,7 +183,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
m_sourceModel->setMntPointFilterTypes(filters);
|
||||
if (!m_sourceModel->initModel(m_dtc, m_dataIfc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
@@ -256,7 +255,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
m_buildingComponentSettings->addChangedCallback(this);
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " addChangedCallback fltBuildingComponentIfc failed";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " addChangedCallback fltBuildingComponentIfc failed";
|
||||
#ifdef LTS_DEBUG
|
||||
Q_ASSERT(false);
|
||||
#endif
|
||||
@@ -265,7 +264,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
onBuildingComponentSettingsChanged();
|
||||
}else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "No BuildingCOmponentIfc ";
|
||||
ERROR_LOG() << "No BuildingCOmponentIfc ";
|
||||
}
|
||||
|
||||
|
||||
@@ -341,7 +340,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
this, &MountingPointListDialog::onInfoMountButtonClicked, Qt::UniqueConnection);
|
||||
onUpdateInfoMountButtonAndBehaviour();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -353,7 +352,7 @@ void MountingPointListDialog::getMountingPointPlanData(const QModelIndex &index,
|
||||
if (item->data().canConvert<SimpleMountingPointData>())
|
||||
{
|
||||
const SimpleMountingPointData &data = item->data().value<SimpleMountingPointData>();
|
||||
DEBUG_LOG(m_logger) << "Item: " << m_sourceModel->data(index, Qt::DisplayRole).toString()
|
||||
DEBUG_LOG() << "Item: " << m_sourceModel->data(index, Qt::DisplayRole).toString()
|
||||
<< ", Structure Element Id: " << data.id;
|
||||
|
||||
if (mppMap.contains(data.id))
|
||||
@@ -363,7 +362,7 @@ void MountingPointListDialog::getMountingPointPlanData(const QModelIndex &index,
|
||||
}
|
||||
else if (data.aimState != MountingPointState_def::Idle)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Not available in Map. Desired: " << data.aimState;
|
||||
DEBUG_LOG() << "Not available in Map. Desired: " << data.aimState;
|
||||
modify.push_back(MountingPointPlan(data.id, data.aimState));
|
||||
}
|
||||
}
|
||||
@@ -419,7 +418,7 @@ void MountingPointListDialog::onMountingPointAssetRemoveReply(const Core::Functi
|
||||
|
||||
void MountingPointListDialog::onBuildingComponentSettingsChanged()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
|
||||
@@ -453,7 +452,7 @@ void MountingPointListDialog::onBuildingComponentSettingsChanged()
|
||||
|
||||
m_sortProxyModel->setFloorFilter(visibleFloors);
|
||||
}
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool MountingPointListDialog::apply()
|
||||
@@ -689,7 +688,7 @@ void MountingPointListDialog::onUnmountButtonClicked()
|
||||
});
|
||||
|
||||
if (!ret)
|
||||
WARNING_LOG(m_logger)<<" couldn't unmount asset on MountingPoinAsset id: "<<req.id();
|
||||
WARNING_LOG()<<" couldn't unmount asset on MountingPoinAsset id: "<<req.id();
|
||||
else
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Load,false);
|
||||
}
|
||||
@@ -704,7 +703,7 @@ void MountingPointListDialog::onUnmountButtonClicked()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger)<<" Couldn't convert to SimpleMountingPointData: ";
|
||||
ERROR_LOG()<<" Couldn't convert to SimpleMountingPointData: ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -153,7 +153,5 @@ private:
|
||||
|
||||
|
||||
Ui::MountingPointListDialog *m_ui{nullptr};
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+13
-14
@@ -27,13 +27,12 @@ MountingPointListDialogModel::MountingPointListDialogModel(QObject *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_scheduleId(-1)
|
||||
, m_dataChangedTimer(new QTimer(this))
|
||||
, m_logger(getLogger("MountingPointListDialogModel"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_dataChangedTimer->setSingleShot(true);
|
||||
m_dataChangedTimer->setInterval(100);
|
||||
connect(m_dataChangedTimer, &QTimer::timeout, this, &MountingPointListDialogModel::emitDataChanged);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -88,11 +87,11 @@ QVariant MountingPointListDialogModel::data(const QModelIndex &index, int role)
|
||||
const SimpleMountingPointData itemData = item->data().value<SimpleMountingPointData>();
|
||||
if (itemData.mpType.underlying() == MountingPointType::Unknown)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "unknown!!!";
|
||||
ERROR_LOG() << "unknown!!!";
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
ERROR_LOG(m_logger) << "mpType = " << itemData.mpType.underlying();
|
||||
ERROR_LOG() << "mpType = " << itemData.mpType.underlying();
|
||||
if(itemData.mpType == MountingPointType::OutdoorIPS)
|
||||
return MountingPointType::IndoorIPS;
|
||||
|
||||
@@ -114,14 +113,14 @@ QVariant MountingPointListDialogModel::data(const QModelIndex &index, int role)
|
||||
|
||||
bool MountingPointListDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc, const std::shared_ptr<ForeignDataInterface> &dataInterface)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (m_dtc == dtc)
|
||||
return true;
|
||||
|
||||
if (!(dtc->enableMainStructureElement() &&
|
||||
dtc->enableMountingPointAsset()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopics";
|
||||
ERROR_LOG() << "Could not enable Datatopics";
|
||||
return false;
|
||||
}
|
||||
m_dtc = dtc;
|
||||
@@ -132,14 +131,14 @@ bool MountingPointListDialogModel::initModel(const std::shared_ptr<Interface::Dt
|
||||
connect(m_dataInterface.get(), &ForeignDataInterface::mountingPointChanged,
|
||||
this, &MountingPointListDialogModel::onMountingPointChanged);
|
||||
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
DEBUG_LOG() << "initModel successful";
|
||||
|
||||
initData();
|
||||
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -150,7 +149,7 @@ QModelIndex MountingPointListDialogModel::getIndexOfVisibleRootItem() const
|
||||
|
||||
void MountingPointListDialogModel::initData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
#ifdef BENCHMARK
|
||||
QElapsedTimer elapsedTimer1;
|
||||
@@ -266,9 +265,9 @@ void MountingPointListDialogModel::initData()
|
||||
parentIndex = m_mountingPointIndexes.value(path.at(path.size() - 2), indexFromItem(m_visRoot));
|
||||
if (!parentIndex.isValid())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
ERROR_LOG() << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
for (const StructureElement &se : mse.elements())
|
||||
ERROR_LOG(m_logger) << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
ERROR_LOG() << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -295,7 +294,7 @@ void MountingPointListDialogModel::initData()
|
||||
qCritical() << " MountingPointListDialogModel::init-BENCHMARK: took " << elapsedTimer1.elapsed() << " [ms]";
|
||||
#endif
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
QSet<int> MountingPointListDialogModel::getAvailableFloors() const
|
||||
@@ -442,7 +441,7 @@ void MountingPointListDialogModel::onScheduleIdChanged(int32_t scheduleId)
|
||||
if (scheduleId == m_scheduleId)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "onScheduleIdChanged: " << scheduleId;
|
||||
DEBUG_LOG() << "onScheduleIdChanged: " << scheduleId;
|
||||
|
||||
m_scheduleId = scheduleId;
|
||||
|
||||
|
||||
-1
@@ -104,7 +104,6 @@ private:
|
||||
QSet<int> m_availableFloors;
|
||||
QSet<int> m_availableBuildingGroups;
|
||||
QVariant m_cbxFilterType;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ MountingPointSelector::MountingPointSelector(const std::shared_ptr<Interface::Dt
|
||||
{
|
||||
if (!m_ftc->enableMountingPointPlanModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointPlanModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MountingPointPlanModify of ISM";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,10 +31,10 @@ void MountingPointSelector::onMountingPointPlanModifyReply(const Core::FunctionR
|
||||
m_requestHelper->requestReply(replyObject);
|
||||
|
||||
if (replyObject.error())
|
||||
ERROR_LOG(m_logger) << "MountingPointPlansRemove error: "
|
||||
ERROR_LOG() << "MountingPointPlansRemove error: "
|
||||
<< replyObject.str();
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "MountingPointPlansRemove success";
|
||||
DEBUG_LOG() << "MountingPointPlansRemove success";
|
||||
}
|
||||
|
||||
|
||||
|
||||
-1
@@ -35,7 +35,6 @@ protected:
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+2
-3
@@ -19,7 +19,6 @@ ConflictsDialog::ConflictsDialog(const QString &menuGroup, QWidget *parent)
|
||||
, m_ui(new Ui::ConflictsDialog)
|
||||
, m_sourceModel(nullptr)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_logger(getLogger("ConflictsDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
setOnlineHelpFilename(QStringLiteral("Ressourcen-Conflicts"));
|
||||
@@ -55,7 +54,7 @@ bool ConflictsDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (m_scheduleId <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid id for Instrumentation plan: " << m_scheduleId;
|
||||
ERROR_LOG() << "Invalid id for Instrumentation plan: " << m_scheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -65,7 +64,7 @@ bool ConflictsDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_sourceModel->initModel(m_scheduleId, m_anotherScheduleId, m_dtc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init ConflictsDialogModel";
|
||||
ERROR_LOG() << "Could not init ConflictsDialogModel";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
|
||||
+9
-10
@@ -24,7 +24,6 @@ ConflictsDialogModel::ConflictsDialogModel(QObject *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_scheduleId(-1)
|
||||
, m_anotherScheduleId(-1)
|
||||
, m_logger(getLogger("OverviewConflictsDialogModel"))
|
||||
{
|
||||
|
||||
}
|
||||
@@ -129,7 +128,7 @@ bool ConflictsDialogModel::initModel(int scheduleId,
|
||||
if (!(dtc->enableMainStructureElement() &&
|
||||
dtc->enableMainSchedule()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Data Topics";
|
||||
ERROR_LOG() << "Could not enable Data Topics";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -303,7 +302,7 @@ void ConflictsDialogModel::initData()
|
||||
|
||||
if (mountingPoint.mountingPointState() == compareMountingPointState)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "No conflict for mounting point id = " << currentElement.id() << " - " << currentElement.name();
|
||||
DEBUG_LOG() << "No conflict for mounting point id = " << currentElement.id() << " - " << currentElement.name();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -315,11 +314,11 @@ void ConflictsDialogModel::initData()
|
||||
mpData.conflictState = compareMountingPointState;
|
||||
mpData.mpType = currentElement.mountingPointTypeId();
|
||||
|
||||
DEBUG_LOG(m_logger) << "## MP Id = " << mpData.id;
|
||||
DEBUG_LOG(m_logger) << "## MP Name = " << mpData.name;
|
||||
DEBUG_LOG(m_logger) << "## Aim state = " << mpData.aimState;
|
||||
DEBUG_LOG() << "## MP Id = " << mpData.id;
|
||||
DEBUG_LOG() << "## MP Name = " << mpData.name;
|
||||
DEBUG_LOG() << "## Aim state = " << mpData.aimState;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Adding mounting point id = " << mpData.id << " - " << mpData.name;
|
||||
DEBUG_LOG() << "Adding mounting point id = " << mpData.id << " - " << mpData.name;
|
||||
|
||||
item = new NGLTreeItem(QVariant::fromValue(mpData));
|
||||
}
|
||||
@@ -339,16 +338,16 @@ void ConflictsDialogModel::initData()
|
||||
parentIndex = m_mountingPointIndexes.value(path.at(path.size() - 2), indexFromItem(m_rootItem));
|
||||
if (!parentIndex.isValid())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
DEBUG_LOG() << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
for (const StructureElement &se : mse.elements())
|
||||
DEBUG_LOG(m_logger) << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
DEBUG_LOG() << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
parentIndex = groupIndex.isValid() ? groupIndex : indexFromItem(m_rootItem);
|
||||
DEBUG_LOG(m_logger) << "Insert row under root: " << currentElement.displayName();
|
||||
DEBUG_LOG() << "Insert row under root: " << currentElement.displayName();
|
||||
}
|
||||
|
||||
insertRow(rowCount(parentIndex), parentIndex, item);
|
||||
|
||||
-3
@@ -81,9 +81,6 @@ private:
|
||||
QHash<int, QModelIndex> m_mountingPointIndexes;
|
||||
QSet<int> m_availableBuildingGroups;
|
||||
QList<MountingPointType> m_visibleTypes;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
+21
-22
@@ -25,9 +25,8 @@ OverviewDialog::OverviewDialog(const QString &menuGroup, LtsSession::LtsSession
|
||||
, m_session(session)
|
||||
, m_ui(new Ui::OverviewDialog)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_logger(getLogger("OverviewDialog"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_ui->setupUi(this);
|
||||
m_timerUpdateView = new QTimer(this);
|
||||
m_timerUpdateView->setSingleShot(true);
|
||||
@@ -37,19 +36,19 @@ OverviewDialog::OverviewDialog(const QString &menuGroup, LtsSession::LtsSession
|
||||
connect(m_ui->cbBasePlan, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OverviewDialog::onCbBasePlanIndexChanged);
|
||||
|
||||
setOnlineHelpFilename(QStringLiteral("Ressourcen-Overview"));
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
OverviewDialog::~OverviewDialog()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::aboutToClose()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "About to close";
|
||||
DEBUG_LOG() << "About to close";
|
||||
if (m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts")))
|
||||
m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts"))->closeRequest();
|
||||
}
|
||||
@@ -70,7 +69,7 @@ bool OverviewDialog::init(int planId,
|
||||
const std::shared_ptr<Interface::Ftc> &ftc,
|
||||
const std::shared_ptr<ForeignDataInterface> &dataInterface)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_scheduleId = planId;
|
||||
m_dtc = dtc;
|
||||
m_ftc = ftc;
|
||||
@@ -94,32 +93,32 @@ bool OverviewDialog::init(int planId,
|
||||
|
||||
|
||||
connect(m_timerUpdateView, &QTimer::timeout, this, &OverviewDialog::reloadModel);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
void OverviewDialog::setCbBasePlan()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_ui->cbBasePlan->clear();
|
||||
m_ui->cbBasePlan->addItem(tr("Actual Mountings"), 0);
|
||||
m_ui->cbBasePlan->insertSeparator(1);
|
||||
for (auto ms : m_dtc->mainSchedules())
|
||||
m_ui->cbBasePlan->addItem(QString::fromStdString(ms.name()), ms.id());
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
void OverviewDialog::setCbComparePlan()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_ui->cbComparePlan->clear();
|
||||
m_ui->cbComparePlan->addItem(tr("All active(*) plans"),0);
|
||||
m_ui->cbComparePlan->insertSeparator(1);
|
||||
for (auto ms : m_dtc->mainSchedules())
|
||||
m_ui->cbComparePlan->addItem((ms.statusId() == ScheduleStatus_def::Active ? QLatin1Literal("* ") : QLatin1Literal(" ")) +
|
||||
QString::fromStdString(ms.name()), ms.id());
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onPrint()
|
||||
@@ -151,7 +150,7 @@ void OverviewDialog::onPrint()
|
||||
|
||||
void OverviewDialog::onScheduleIdChanged(int32_t scheduleId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (m_scheduleId == scheduleId)
|
||||
return;
|
||||
setCbComparePlan();
|
||||
@@ -164,30 +163,30 @@ void OverviewDialog::onScheduleIdChanged(int32_t scheduleId)
|
||||
m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts"))->closeRequest();
|
||||
|
||||
retranslate();
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onCbComparePlanIndexChanged(int index)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
Q_UNUSED(index);
|
||||
updateOverviewData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onCbBasePlanIndexChanged(int index)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
Q_UNUSED(index);
|
||||
updateOverviewData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onPlansDataChanged()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
updateOverviewData();
|
||||
ConflictsDialog *dialog = static_cast<ConflictsDialog*>(m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts")));
|
||||
if (dialog)
|
||||
@@ -195,7 +194,7 @@ void OverviewDialog::onPlansDataChanged()
|
||||
dialog->updateModel();
|
||||
}
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::updateOverviewData()
|
||||
@@ -205,7 +204,7 @@ void OverviewDialog::updateOverviewData()
|
||||
|
||||
void OverviewDialog::reloadModel()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (m_model == nullptr)
|
||||
return;
|
||||
|
||||
@@ -218,7 +217,7 @@ void OverviewDialog::reloadModel()
|
||||
if (m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts")))
|
||||
m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts"))->closeRequest();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
}
|
||||
+14
-15
@@ -30,9 +30,8 @@ OverviewDialogModel::OverviewDialogModel(QObject *parent)
|
||||
, m_loadedScheduleId(-1)
|
||||
, m_comparedScheduleId(0)
|
||||
, m_dtc(nullptr)
|
||||
, m_logger(getLogger("OverviewDialogModel"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +53,7 @@ OverviewDialogModel::OverviewDialogModel(QObject *parent)
|
||||
m_refMap[MountingPointType_def::IndoorCamera] = 2;
|
||||
m_refMap[MountingPointType_def::IndoorIPS] = 3;
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
QVariant OverviewDialogModel::data(const QModelIndex &index, int role) const
|
||||
@@ -114,7 +113,7 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
|
||||
const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
int32_t comparedScheduleId, int32_t basePlanId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_dtc = dtc;
|
||||
m_loadedScheduleId = mainScheduleId;
|
||||
m_comparedScheduleId = comparedScheduleId;
|
||||
@@ -125,19 +124,19 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
|
||||
if (!m_dtc->mainSchedules().contains(m_loadedScheduleId))
|
||||
{
|
||||
m_loadedScheduleId = -1;
|
||||
ERROR_LOG(m_logger) << "Invalid scheduleId = " << mainScheduleId;
|
||||
ERROR_LOG() << "Invalid scheduleId = " << mainScheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "[INITIAL] loaded: "<<m_loadedScheduleId<<" cmp: "<<m_comparedScheduleId<<" sim: "<<m_basePlanId;
|
||||
DEBUG_LOG() << "[INITIAL] loaded: "<<m_loadedScheduleId<<" cmp: "<<m_comparedScheduleId<<" sim: "<<m_basePlanId;
|
||||
|
||||
if (!initData())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init data";
|
||||
ERROR_LOG() << "Could not init data";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
DEBUG_LOG() << "initModel successful";
|
||||
|
||||
|
||||
connect(m_dtc.get(), &Interface::Dtc::mainStructureElementChanged,
|
||||
@@ -147,13 +146,13 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
|
||||
connect(m_dtc.get(), &Interface::Dtc::instrumentationAssetChanged,
|
||||
this, &OverviewDialogModel::initData, Qt::UniqueConnection);
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OverviewDialogModel::initData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
#ifdef BENCHMARK
|
||||
QElapsedTimer elapsedTimer1;
|
||||
@@ -174,9 +173,9 @@ bool OverviewDialogModel::initData()
|
||||
setNewData();
|
||||
|
||||
for ( int mppId : std::as_const(m_conflictedStructureElementIds))
|
||||
DEBUG_LOG(m_logger) << "Conflicted structure element id = " << mppId;
|
||||
DEBUG_LOG() << "Conflicted structure element id = " << mppId;
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -214,7 +213,7 @@ bool OverviewDialogModel::hasConflictedMountingPoints()
|
||||
|
||||
QHash<int, MountingPointPlan> OverviewDialogModel::mergePlans(const QHash<int, MountingPointPlan> &currPlan, const int cmpPlanId)
|
||||
{
|
||||
DEBUG_LOG(m_logger)<<"[MERGE PLANs] currPlanId: "<<m_loadedScheduleId<<" ; cmpPlanId: "<<cmpPlanId;
|
||||
DEBUG_LOG()<<"[MERGE PLANs] currPlanId: "<<m_loadedScheduleId<<" ; cmpPlanId: "<<cmpPlanId;
|
||||
QHash<int, MountingPointPlan> mergedPlan = currPlan;
|
||||
|
||||
const auto msConst = m_dtc->mainSchedules();
|
||||
@@ -244,7 +243,7 @@ QHash<int, MountingPointPlan> OverviewDialogModel::mergePlans(const QHash<int, M
|
||||
if ((basePlanMpp.mountingPointState() == MountingPointState::Equipped && currentMpp.mountingPointState() == MountingPointState::Empty) ||
|
||||
(basePlanMpp.mountingPointState() == MountingPointState::Empty && currentMpp.mountingPointState() == MountingPointState::Equipped))
|
||||
{
|
||||
DEBUG_LOG(m_logger)<<" conflicted name: "<<currentMpp.structureElementId();
|
||||
DEBUG_LOG()<<" conflicted name: "<<currentMpp.structureElementId();
|
||||
mergedPlan[currentMpp.structureElementId()].mountingPointState(MountingPointState::Idle);
|
||||
m_conflictedStructureElementIds.insert(basePlanMpp.structureElementId());
|
||||
}
|
||||
@@ -280,7 +279,7 @@ void OverviewDialogModel::setNewData()
|
||||
QHash<int , MountingPointPlan> baseMountingPointPlans;
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "We compare plan " << m_basePlanId << " with " << m_comparedScheduleId;
|
||||
DEBUG_LOG() << "We compare plan " << m_basePlanId << " with " << m_comparedScheduleId;
|
||||
|
||||
baseMountingPointPlans.clear();
|
||||
m_conflictedStructureElementIds.clear();
|
||||
|
||||
-3
@@ -92,9 +92,6 @@ private:
|
||||
QMap<qint32, InfrastructureManagement::MountingPointAsset> m_mountingPointAssets;
|
||||
|
||||
QMap<MountingPointType, int> m_refMap;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
+13
-14
@@ -23,12 +23,11 @@ OverviewMountingPointListDialog::OverviewMountingPointListDialog(const QString &
|
||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_ui(new Ui::OverViewMountingPointListDialog)
|
||||
, m_logger(getLogger("OverviewMountingPointListDialog"))
|
||||
, m_actionMenu(new QMenu(this))
|
||||
, m_printMountingAction(new QAction(tr("To Mount"), this))
|
||||
, m_printUnmountingAction(new QAction(tr("To Unmount"), this))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
m_ui->setupUi(this);
|
||||
@@ -40,14 +39,14 @@ OverviewMountingPointListDialog::OverviewMountingPointListDialog(const QString &
|
||||
connect(m_actionMenu, &QMenu::triggered, this, &OverviewMountingPointListDialog::onPrint);
|
||||
|
||||
m_buttonBox->setMenu(LtsWidgets::DialogButton::Print, m_actionMenu);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
OverviewMountingPointListDialog::~OverviewMountingPointListDialog()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +57,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
const std::shared_ptr<ForeignDataInterface> &dataInterface,
|
||||
int32_t scheduleId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, scheduleId=" << scheduleId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, scheduleId=" << scheduleId;
|
||||
m_dtc = dtc;
|
||||
m_dataIfc = dataInterface;
|
||||
m_session = session;
|
||||
@@ -69,30 +68,30 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointPlanModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableMountingPointPlansModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT enableMountingPointPlansModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " new ViewMountingPointListModel...";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " new ViewMountingPointListModel...";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = new ViewMountingPointListModel(this);
|
||||
|
||||
if (!m_sourceModel->initModel(m_dtc, m_dataIfc, m_scheduleId))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " new m_mountedPointSortProxyModel ...";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " new m_mountedPointSortProxyModel ...";
|
||||
delete m_mountedPointSortProxyModel;
|
||||
m_mountedPointSortProxyModel = new ViewMountingPointListSortModel(this);
|
||||
m_mountedPointSortProxyModel->setVisibleState(MountingPointState::Equipped);
|
||||
@@ -104,7 +103,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
m_ui->mountingPointListView->setSortingEnabled(true);
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " new m_unmountedPointSortProxyModel ...";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " new m_unmountedPointSortProxyModel ...";
|
||||
delete m_unmountedPointSortProxyModel;
|
||||
m_unmountedPointSortProxyModel = new ViewMountingPointListSortModel(this);
|
||||
m_unmountedPointSortProxyModel->setVisibleState(MountingPointState::Empty);
|
||||
@@ -134,7 +133,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " filter... ...";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " filter... ...";
|
||||
const auto filters = { MountingPointType::BuildingSensorModule,
|
||||
|
||||
|
||||
@@ -216,7 +215,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
retranslate();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+12
-13
@@ -26,14 +26,13 @@ ViewMountingPointListModel::ViewMountingPointListModel(QObject *parent)
|
||||
: NGLTreeModel(parent, new NGLTreeItem(QVariant()), { tr("Name"), tr("Type"), tr("Aim State") })
|
||||
, m_visRoot(new NGLTreeItem(tr("Mounting Points")))
|
||||
, m_dtc(nullptr)
|
||||
, m_logger(getLogger("ViewMountingPointListModel"))
|
||||
, m_dataChangedTimer(new QTimer(this))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_dataChangedTimer->setSingleShot(true);
|
||||
m_dataChangedTimer->setInterval(100);
|
||||
connect(m_dataChangedTimer, &QTimer::timeout, this, &ViewMountingPointListModel::emitDataChanged);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +105,7 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
const std::shared_ptr<ForeignDataInterface> &dataInterface,
|
||||
int32_t requestedScheduleId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, scheduleId=" << requestedScheduleId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, scheduleId=" << requestedScheduleId;
|
||||
|
||||
if (m_dtc == dtc)
|
||||
return true;
|
||||
@@ -114,7 +113,7 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
if (!(dtc->enableMainStructureElement() &&
|
||||
dtc->enableMountingPointAsset()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopics";
|
||||
ERROR_LOG() << "Could not enable Datatopics";
|
||||
return false;
|
||||
}
|
||||
m_dtc = dtc;
|
||||
@@ -133,11 +132,11 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
connect(m_dataInterface.get(), &ForeignDataInterface::mountingPointChanged,
|
||||
this, &ViewMountingPointListModel::onMountingPointChanged);
|
||||
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
DEBUG_LOG() << "initModel successful";
|
||||
|
||||
initData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -178,7 +177,7 @@ inline int getFakeBuildingGroupId(int seId)
|
||||
|
||||
void ViewMountingPointListModel::initData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, m_scheduleId=" << m_scheduleId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, m_scheduleId=" << m_scheduleId;
|
||||
|
||||
|
||||
#ifdef BENCHMARK
|
||||
@@ -312,9 +311,9 @@ void ViewMountingPointListModel::initData()
|
||||
parentIndex = m_mountingPointIndexes.value(path.at(path.size() - 2), indexFromItem(m_visRoot));
|
||||
if (!parentIndex.isValid())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
ERROR_LOG() << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
for (const StructureElement &se : mse.elements())
|
||||
ERROR_LOG(m_logger) << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
ERROR_LOG() << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -346,18 +345,18 @@ void ViewMountingPointListModel::initData()
|
||||
qCritical() << " ViewMountingPointListModel::initData-BENCHMARK: m_scheduleId=" << m_scheduleId << " took " << elapsedTimer1.elapsed() << " [ms]";
|
||||
#endif
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool ViewMountingPointListModel::mountingPointHasAssetMounted(int32_t mountingPointId, const QMap<qint32, MountingPointAsset> &mountingPointAssetMap)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
for (const MountingPointAsset &mpa : mountingPointAssetMap)
|
||||
{
|
||||
if (mpa.structureElementId() == mountingPointId)
|
||||
return true;
|
||||
}
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -109,7 +109,6 @@ private:
|
||||
QHash<int32_t, bool> m_mountingPointHasAssetMounted;
|
||||
|
||||
QSet<int> m_availableFloors;
|
||||
LOGGER_T m_logger;
|
||||
QTimer *m_dataChangedTimer{nullptr};
|
||||
|
||||
};
|
||||
|
||||
-1
@@ -13,7 +13,6 @@ NewPlanDialog::NewPlanDialog(LtsSession::LtsSession *session, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_ui(new Ui::NewPlanDialog)
|
||||
, m_session(session)
|
||||
, m_logger(getLogger("NewPlanDialog"))
|
||||
{
|
||||
setWindowTitle(tr("Create New Plan"));
|
||||
m_ui->setupUi(this);
|
||||
|
||||
-1
@@ -32,7 +32,6 @@ private:
|
||||
Ui::NewPlanDialog* m_ui;
|
||||
std::shared_ptr<ForeignGuiComboboxInterface> m_ismGuiCbx{nullptr};
|
||||
LtsSession::LtsSession *m_session{nullptr};
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
-1
@@ -26,7 +26,6 @@ PlanChooser::PlanChooser(const std::shared_ptr<Interface::Dtc> &dtc, QWidget *pa
|
||||
, m_model(nullptr)
|
||||
, m_dtc(dtc)
|
||||
, m_selected(false)
|
||||
, m_logger(getLogger("PlanChooser"))
|
||||
{
|
||||
LtsWidgets::LtsGlobalWaitDialog::getInstance()->setVisible(false);
|
||||
|
||||
|
||||
-2
@@ -38,8 +38,6 @@ private:
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_dtc{nullptr};
|
||||
bool m_close{false};
|
||||
bool m_selected{false};
|
||||
LOGGER_T m_logger;
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
|
||||
+2
-3
@@ -16,7 +16,6 @@ ScheduleDifferencesListDialog::ScheduleDifferencesListDialog(const QString &menu
|
||||
, m_ui(new Ui::ScheduleDifferencesListDialog)
|
||||
, m_sourceModel(nullptr)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_logger(getLogger("ScheduleDifferencesListDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
setOnlineHelpFilename(QStringLiteral("Ressourcen-Completeness_Check"));
|
||||
@@ -48,7 +47,7 @@ bool ScheduleDifferencesListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (m_scheduleId <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid id for Instrumentation plan: " << m_scheduleId;
|
||||
ERROR_LOG() << "Invalid id for Instrumentation plan: " << m_scheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,7 +57,7 @@ bool ScheduleDifferencesListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_sourceModel->initModel(m_scheduleId, m_dtc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init ScheduleDifferencesListDialogModel";
|
||||
ERROR_LOG() << "Could not init ScheduleDifferencesListDialogModel";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
|
||||
+5
-6
@@ -20,7 +20,6 @@ ScheduleDifferencesListDialogModel::ScheduleDifferencesListDialogModel(QObject *
|
||||
tr("Asset Id"),
|
||||
tr("Asset Name")},
|
||||
parent)
|
||||
, m_logger(getLogger("ScheduleDifferencesListDialogModel"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -76,28 +75,28 @@ bool ScheduleDifferencesListDialogModel::initModel(int scheduleId,
|
||||
m_scheduleId = scheduleId;
|
||||
if (m_scheduleId <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid scheduleId = " << m_scheduleId;
|
||||
ERROR_LOG() << "Invalid scheduleId = " << m_scheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
QList<MountingPointPlan> diff;
|
||||
bool isComplete = m_dtc->getScheduleDifferences(m_scheduleId, diff);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Plan id = " << m_scheduleId << ", Differences = " << diff.size();
|
||||
DEBUG_LOG() << "Plan id = " << m_scheduleId << ", Differences = " << diff.size();
|
||||
|
||||
if (isComplete)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Instrumentation plan is complete. No differences to show.";
|
||||
WARNING_LOG() << "Instrumentation plan is complete. No differences to show.";
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const MountingPointPlan &mpp : std::as_const(diff))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Adding to model MPP = " << mpp.id();
|
||||
DEBUG_LOG() << "Adding to model MPP = " << mpp.id();
|
||||
insertRow(mpp);
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
DEBUG_LOG() << "initModel successful";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -29,7 +29,7 @@ PlanTimeLineDialog::PlanTimeLineDialog(LtsSession::LtsSession *session, const QS
|
||||
, m_ui(new Ui::PlanTimeLineDialog)
|
||||
, m_logger(getLogger(QStringLiteral("PlanTimeLineDialog")))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " ";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " ";
|
||||
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -52,7 +52,7 @@ PlanTimeLineDialog::~PlanTimeLineDialog()
|
||||
|
||||
bool PlanTimeLineDialog::init(const std::shared_ptr<InfrastructureManagement::Interface::Dtc> &dtc, const std::shared_ptr<Interface::Ftc> &ftc, const std::shared_ptr<ForeignDataInterface> &dataInterface, InfrastructureManagement::ForeignResourceManagementGuiInterface *ismGuiIfc)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Start init FileManagementDialogWidget...";
|
||||
DEBUG_LOG() << "Start init FileManagementDialogWidget...";
|
||||
|
||||
m_dtc = dtc;
|
||||
m_ftc = ftc;
|
||||
@@ -68,7 +68,7 @@ bool PlanTimeLineDialog::init(const std::shared_ptr<InfrastructureManagement::In
|
||||
|
||||
if (!bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable DTC/FTC from ISM";
|
||||
ERROR_LOG() << "Could not enable DTC/FTC from ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ bool PlanTimeLineDialog::init(const std::shared_ptr<InfrastructureManagement::In
|
||||
m_model = new PlanTimelineModel(m_ui->timeline->view(), this);
|
||||
if (!m_model->initModel(m_dtc, m_dataIfc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
delete m_model;
|
||||
m_model = nullptr;
|
||||
return false;
|
||||
@@ -133,7 +133,7 @@ void PlanTimeLineDialog::setScheduleId(const int scheduleId)
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "ism_plan_tln_dialog: setScheduleId = " << m_scheduleId;
|
||||
DEBUG_LOG() << "ism_plan_tln_dialog: setScheduleId = " << m_scheduleId;
|
||||
|
||||
ismIfc->setScheduleId(m_scheduleId);
|
||||
|
||||
@@ -158,7 +158,7 @@ void PlanTimeLineDialog::onLoad()
|
||||
int scheduleId = m_model->getScheduleIdOfItem(m_selectedItem);
|
||||
if (scheduleId == -1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "onLoad failed: Could not find model for selected item:" << m_selectedItem;
|
||||
ERROR_LOG() << "onLoad failed: Could not find model for selected item:" << m_selectedItem;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ void PlanTimeLineDialog::onApply()
|
||||
int seId = m_model->getScheduleIdOfItem(itemId);
|
||||
if (seId == -1)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not find schedule for item id:" << itemId;
|
||||
WARNING_LOG() << "Could not find schedule for item id:" << itemId;
|
||||
continue;
|
||||
}
|
||||
InfrastructureManagement::MainSchedule mse = m_dtc->mainSchedule(seId);
|
||||
@@ -311,13 +311,13 @@ void PlanTimeLineDialog::updateTimeLine()
|
||||
|
||||
if (m_scheduleId == -1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid schedule id: timeline update aborted!";
|
||||
ERROR_LOG() << "Invalid schedule id: timeline update aborted!";
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_model!= nullptr && !m_model->updateModel())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid model!";
|
||||
ERROR_LOG() << "Invalid model!";
|
||||
return;
|
||||
}
|
||||
resizeView();
|
||||
|
||||
+7
-8
@@ -19,13 +19,12 @@ PlanTimelineModel::PlanTimelineModel(TimelineView *tlv, QObject *parent)
|
||||
, m_endTime(m_startTime + (LtsTimeline::ZoomFactor::OneDay))
|
||||
, m_scheduleId(-1)
|
||||
, m_tlv(tlv)
|
||||
, m_logger(getLogger("PlanTimeLineModel"))
|
||||
{
|
||||
}
|
||||
|
||||
bool PlanTimelineModel::initModel(const std::shared_ptr<InfrastructureManagement::Interface::Dtc> &dtc, const std::shared_ptr<ForeignDataInterface> &dataInterface)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Start init FileManagement timeline model...";
|
||||
DEBUG_LOG() << "Start init FileManagement timeline model...";
|
||||
|
||||
if (m_dtc == dtc)
|
||||
return true;
|
||||
@@ -43,17 +42,17 @@ bool PlanTimelineModel::initModel(const std::shared_ptr<InfrastructureManagement
|
||||
|
||||
if (!bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable ISM DTC Main schedule or Structure elements";
|
||||
ERROR_LOG() << "Could not enable ISM DTC Main schedule or Structure elements";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!setModel())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not set timeline model";
|
||||
ERROR_LOG() << "Could not set timeline model";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << "initModel successful";
|
||||
INFO_LOG() << "initModel successful";
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -63,7 +62,7 @@ bool PlanTimelineModel::setModel()
|
||||
{
|
||||
if (m_scheduleId == -1)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Invalid scheduleId " << m_scheduleId;
|
||||
WARNING_LOG() << "Invalid scheduleId " << m_scheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -103,12 +102,12 @@ bool PlanTimelineModel::setModel()
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "## Unable to add item or track to model. Exception: " << e.what();
|
||||
ERROR_LOG() << "## Unable to add item or track to model. Exception: " << e.what();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "Time start/end not set for schedule id " << mse.id();
|
||||
WARNING_LOG() << "Time start/end not set for schedule id " << mse.id();
|
||||
}
|
||||
return true;
|
||||
|
||||
|
||||
+13
-14
@@ -24,7 +24,6 @@ BuildingMountPointDialog::BuildingMountPointDialog(QWidget *parent)
|
||||
, m_ftc(nullptr)
|
||||
, m_ismGuiIfc(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("BuildingMountPointDialog"))
|
||||
, m_importedModelIndex()
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
@@ -70,7 +69,7 @@ bool BuildingMountPointDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_model->initModel(m_dtc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -95,7 +94,7 @@ bool BuildingMountPointDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_ftc->enableMainStructureElementModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MainStructureElementModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MainStructureElementModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -218,7 +217,7 @@ bool BuildingMountPointDialog::exportData(const std::vector<StructureElement> &s
|
||||
|
||||
void BuildingMountPointDialog::onExportClicked()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "**** onExportClicked() ";
|
||||
DEBUG_LOG() << "**** onExportClicked() ";
|
||||
|
||||
const QModelIndexList indexList = m_ui->tvBuildings->selectionModel()->selectedRows();
|
||||
if (indexList.isEmpty())
|
||||
@@ -252,14 +251,14 @@ void BuildingMountPointDialog::onExportClicked()
|
||||
tr("CSV-Files (*.csv)"));
|
||||
if (!fileNameTemplate.contains(placeholder))
|
||||
{
|
||||
ERROR_LOG(m_logger) << " no placeholder '" << placeholder << "'";
|
||||
ERROR_LOG() << " no placeholder '" << placeholder << "'";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("The name must have a placeholder (%1). Please try again.").arg(placeholder));
|
||||
return;
|
||||
}
|
||||
const QString &dir = QFileInfo(fileNameTemplate).absolutePath();
|
||||
|
||||
fileNameTemplate.replace(placeholder, QStringLiteral("%1"));
|
||||
DEBUG_LOG(m_logger) << " fileNameTemplate after '" << fileNameTemplate << "'";
|
||||
DEBUG_LOG() << " fileNameTemplate after '" << fileNameTemplate << "'";
|
||||
for (auto idxItem : indexList)
|
||||
{
|
||||
const QModelIndex &idx = m_proxyModel->mapToSource(idxItem);
|
||||
@@ -267,16 +266,16 @@ void BuildingMountPointDialog::onExportClicked()
|
||||
const QString bldgName = QString::fromStdString(m_model->getMainStructureElement(idx).name());
|
||||
if (bldgName.isEmpty())
|
||||
{
|
||||
ERROR_LOG(m_logger) << " bldgName is empty";
|
||||
ERROR_LOG() << " bldgName is empty";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Name is empty").arg(dir));
|
||||
return;
|
||||
}
|
||||
|
||||
const QString &fileName = QString(fileNameTemplate).arg(bldgName);
|
||||
DEBUG_LOG(m_logger) << " fileName '" << fileName << "'";
|
||||
DEBUG_LOG() << " fileName '" << fileName << "'";
|
||||
|
||||
if (!exportData(structureElements, fileName))
|
||||
ERROR_LOG(m_logger) << " exportData failed bldgName " << bldgName;
|
||||
ERROR_LOG() << " exportData failed bldgName " << bldgName;
|
||||
}
|
||||
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this,
|
||||
@@ -313,7 +312,7 @@ void BuildingMountPointDialog::onExportAllClicked()
|
||||
|
||||
void BuildingMountPointDialog::onImportClicked()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "**** onImportClicked() ";
|
||||
DEBUG_LOG() << "**** onImportClicked() ";
|
||||
|
||||
QModelIndexList indexList = m_ui->tvBuildings->selectionModel()->selectedRows();
|
||||
if (indexList.isEmpty() || indexList.size() > 1)
|
||||
@@ -343,7 +342,7 @@ void BuildingMountPointDialog::onImportClicked()
|
||||
int colBarcode = 0;
|
||||
int colMountingPointId = 1;
|
||||
|
||||
DEBUG_LOG(m_logger) << "colBarcode: " << colBarcode
|
||||
DEBUG_LOG() << "colBarcode: " << colBarcode
|
||||
<< ", colMountingPointId: " << colMountingPointId;
|
||||
|
||||
m_importedModelIndex = m_proxyModel->mapToSource(indexList.at(0));
|
||||
@@ -359,7 +358,7 @@ void BuildingMountPointDialog::onImportClicked()
|
||||
if (colMountingPointId >= values.size() ||
|
||||
colBarcode >= values.size())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "skipping line - to few data: '" << line << "'";
|
||||
WARNING_LOG() << "skipping line - to few data: '" << line << "'";
|
||||
continue;
|
||||
}
|
||||
QString newBarCode = values.at(colBarcode).toString();
|
||||
@@ -379,7 +378,7 @@ void BuildingMountPointDialog::onImportClicked()
|
||||
barcodes.insert(curMountingPointId, newBarCode);
|
||||
prevMountingPointId = curMountingPointId;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "mountingPoint: " << curMountingPointId
|
||||
DEBUG_LOG() << "mountingPoint: " << curMountingPointId
|
||||
<< ", new barcode: " << newBarCode;
|
||||
}
|
||||
file.close();
|
||||
@@ -433,7 +432,7 @@ bool BuildingMountPointDialog::apply()
|
||||
|
||||
void BuildingMountPointDialog::onResetClicked()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "**** onResetClicked() ";
|
||||
DEBUG_LOG() << "**** onResetClicked() ";
|
||||
|
||||
m_model->resetNewItems(m_importedModelIndex);
|
||||
m_model->resetNewBarcodes(m_importedModelIndex);
|
||||
|
||||
-1
@@ -64,7 +64,6 @@ private:
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
ForeignResourceManagementGuiInterface *m_ismGuiIfc{nullptr};
|
||||
LtsUtils::RequestHelper *m_requestHelper{nullptr};
|
||||
LOGGER_T m_logger;
|
||||
QModelIndex m_importedModelIndex;
|
||||
};
|
||||
}
|
||||
+4
-5
@@ -28,7 +28,6 @@ BuildingMountPointModel::BuildingMountPointModel(QObject *parent)
|
||||
tr("Barcode (new)"),
|
||||
tr("Mounted Asset"),
|
||||
tr("Properties")})
|
||||
, m_logger(getLogger("BuildingMountPointModel"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -357,7 +356,7 @@ void BuildingMountPointModel::modifyBuilding(const MainStructureElement &mse)
|
||||
if (!building)
|
||||
{
|
||||
|
||||
WARNING_LOG(m_logger)<<">>> not found section: "<<gse.id()<<" not exist. new one will be added ";
|
||||
WARNING_LOG()<<">>> not found section: "<<gse.id()<<" not exist. new one will be added ";
|
||||
findAndRemoveBuilding(mse);
|
||||
return addBuilding(mse);
|
||||
}
|
||||
@@ -384,7 +383,7 @@ void BuildingMountPointModel::modifyBuilding(const MainStructureElement &mse)
|
||||
|
||||
if (!buildingSeId)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Found no structure element with type 'Building' in content: " << mse;
|
||||
ERROR_LOG() << "Found no structure element with type 'Building' in content: " << mse;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -481,7 +480,7 @@ void BuildingMountPointModel::removeBuildingByGroupId(const MainStructureElement
|
||||
|
||||
if (bfound == false)
|
||||
{
|
||||
ERROR_LOG(m_logger)<<"No mse with Id: ( "<<mse.id()<<" ) | groupId: "<<mse.groupId()<<" | sectionId: "<<section<<" found!";
|
||||
ERROR_LOG()<<"No mse with Id: ( "<<mse.id()<<" ) | groupId: "<<mse.groupId()<<" | sectionId: "<<section<<" found!";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -528,7 +527,7 @@ void BuildingMountPointModel::insertChildren(int parentId,
|
||||
auto it = structureElements.constFind(childId);
|
||||
if (it == structureElements.constEnd())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Can not find structure element with id " << childId << " - ignoring";
|
||||
ERROR_LOG() << "Can not find structure element with id " << childId << " - ignoring";
|
||||
continue;
|
||||
}
|
||||
const StructureElement &data = it.value();
|
||||
|
||||
-1
@@ -102,7 +102,6 @@ private:
|
||||
QHash<int, QModelIndex> m_buildingsIndexes;
|
||||
const int maxIntValue = std::numeric_limits<int>::max();
|
||||
QMap<int, MainStructureElement> m_mainStructureElements;
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<Interface::Dtc> m_dtc{nullptr};
|
||||
QSet<int> m_availableBuildingGroups;
|
||||
};
|
||||
|
||||
+29
-29
@@ -30,7 +30,7 @@ PlanDialog::PlanDialog(const QString &menuGroup, LtsSession::LtsSession * sessio
|
||||
, m_ui(new Ui::PlanDialog)
|
||||
, m_logger(getLogger(QStringLiteral("PlanDialog")))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_ui->setupUi(this);
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Print, this, &PlanDialog::onPrint);
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Remove, this, &PlanDialog::onRemove);
|
||||
@@ -47,14 +47,14 @@ PlanDialog::PlanDialog(const QString &menuGroup, LtsSession::LtsSession * sessio
|
||||
connect(m_ui->planView, &LtsDataView::LtsDataView::doubleClicked, this, &PlanDialog::onEdit);
|
||||
|
||||
setOnlineHelpFilename(QStringLiteral("Ressourcen-Plans"));
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
PlanDialog::~PlanDialog()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::retranslate()
|
||||
@@ -74,7 +74,7 @@ bool PlanDialog::init(int scheduleId, const std::shared_ptr<Interface::Dtc> &dtc
|
||||
const std::shared_ptr<ForeignDataInterface> &dataInterface,
|
||||
ForeignResourceManagementGuiInterface *ismGuiIfc)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
m_scheduleId = scheduleId;
|
||||
m_dtc = dtc;
|
||||
@@ -96,7 +96,7 @@ bool PlanDialog::init(int scheduleId, const std::shared_ptr<Interface::Dtc> &dtc
|
||||
|
||||
if (!bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable DTC or FTC from ISM";
|
||||
ERROR_LOG() << "Could not enable DTC or FTC from ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -111,17 +111,17 @@ bool PlanDialog::init(int scheduleId, const std::shared_ptr<Interface::Dtc> &dtc
|
||||
connect(m_dataIfc.get(), &ForeignDataInterface::scheduleIdChanged, this, &PlanDialog::onScheduleIdchanged);
|
||||
m_ui->planView->setToolTip(tr("Current Instrumentation Plan Id = %1").arg(m_scheduleId));
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_scheduleId = " << m_scheduleId;
|
||||
DEBUG_LOG() << "m_scheduleId = " << m_scheduleId;
|
||||
|
||||
setScheduleId(m_scheduleId);
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PlanDialog::setScheduleId(const int scheduleId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_scheduleId = scheduleId;
|
||||
|
||||
std::shared_ptr<InfrastructureManagement::ForeignDataInterface> ismIfc;
|
||||
@@ -131,7 +131,7 @@ void PlanDialog::setScheduleId(const int scheduleId)
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "setScheduleId = " << m_scheduleId;
|
||||
DEBUG_LOG() << "setScheduleId = " << m_scheduleId;
|
||||
|
||||
ismIfc->setScheduleId(m_scheduleId);
|
||||
|
||||
@@ -144,7 +144,7 @@ void PlanDialog::setScheduleId(const int scheduleId)
|
||||
|
||||
m_ui->planView->setToolTip(tr("Current Instrumentation Plan Id = %1").arg(m_scheduleId));
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onPrint()
|
||||
@@ -154,11 +154,11 @@ void PlanDialog::onPrint()
|
||||
|
||||
void PlanDialog::onMainScheduleChanged(const MainSchedule &data, DataModification modType)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_scheduleId = data.id();
|
||||
enaDisa();
|
||||
Q_UNUSED(modType);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onScheduleIdchanged(int32_t id)
|
||||
@@ -169,7 +169,7 @@ void PlanDialog::onScheduleIdchanged(int32_t id)
|
||||
|
||||
void PlanDialog::onLoad()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
QModelIndexList indexList = m_ui->planView->selectedRows();
|
||||
|
||||
if (indexList.size() == 0)
|
||||
@@ -187,12 +187,12 @@ void PlanDialog::onLoad()
|
||||
setScheduleId(m_scheduleId);
|
||||
m_ismGuiIfc->setPlanId(m_scheduleId);
|
||||
enaDisa();
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onRemove()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
QModelIndexList indexList = m_ui->planView->selectedRows();
|
||||
|
||||
if (indexList.size() == 0)
|
||||
@@ -244,12 +244,12 @@ void PlanDialog::onRemove()
|
||||
{
|
||||
return m_ftc->mainScheduleRemoveRequest(rmReq, this);
|
||||
});
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::enaDisa()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Add, true);
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Print, true);
|
||||
|
||||
@@ -272,12 +272,12 @@ void PlanDialog::enaDisa()
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Edit, (indexList.size() == 1) );
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Show, (indexList.size() == 1) );
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Save, (indexList.size() == 1 && !isComplete) );
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onEdit()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
QModelIndexList indexList = m_ui->planView->selectedRows();
|
||||
if (indexList.size() == 0)
|
||||
return;
|
||||
@@ -286,7 +286,7 @@ void PlanDialog::onEdit()
|
||||
if (item.id() < 0 )
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "onEdit schedule with id = " << item.id();
|
||||
DEBUG_LOG() << "onEdit schedule with id = " << item.id();
|
||||
|
||||
PlanEditDialog *dialog = new PlanEditDialog(this);
|
||||
if (!dialog->init(m_session, item.id(), m_dtc, m_ftc, m_ismGuiCbx))
|
||||
@@ -296,12 +296,12 @@ void PlanDialog::onEdit()
|
||||
}
|
||||
|
||||
addDialog(dialog, m_menuGroup, QStringLiteral("EditSchedule%1").arg(item.id()), LtsWidgets::LayoutArea::eDialogTab);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onAdd()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onAdd";
|
||||
DEBUG_LOG() << "onAdd";
|
||||
PlanEditDialog *dialog = new PlanEditDialog(this);
|
||||
if (!dialog->init(m_session, 0, m_dtc, m_ftc, m_ismGuiCbx))
|
||||
{
|
||||
@@ -313,7 +313,7 @@ void PlanDialog::onAdd()
|
||||
|
||||
void PlanDialog::onCheck()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
QModelIndexList indexList = m_ui->planView->selectedRows();
|
||||
if (indexList.size() == 0)
|
||||
return;
|
||||
@@ -322,7 +322,7 @@ void PlanDialog::onCheck()
|
||||
if (item.id() < 0 )
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "show Differences schedule with id = " << item.id();
|
||||
DEBUG_LOG() << "show Differences schedule with id = " << item.id();
|
||||
|
||||
|
||||
|
||||
@@ -341,13 +341,13 @@ void PlanDialog::onCheck()
|
||||
}
|
||||
|
||||
addDialog(dialog, m_menuGroup, QStringLiteral("ShowDifferences%1").arg(item.id()), LtsWidgets::LayoutArea::eDialogTab);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
void PlanDialog::onCopy()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
QModelIndexList indexList = m_ui->planView->selectedRows();
|
||||
if (indexList.size() == 0)
|
||||
return;
|
||||
@@ -356,7 +356,7 @@ void PlanDialog::onCopy()
|
||||
if (item.id() < 0 )
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "onCopy schedule with id = " << item.id();
|
||||
DEBUG_LOG() << "onCopy schedule with id = " << item.id();
|
||||
|
||||
MainScheduleCopyRequest req;
|
||||
req.id(item.id());
|
||||
@@ -366,7 +366,7 @@ void PlanDialog::onCopy()
|
||||
return m_ftc->mainScheduleCopyRequest(req, this);
|
||||
});
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
|
||||
-1
@@ -97,7 +97,6 @@ private:
|
||||
LtsUtils::RequestHelper *m_requestHelper{nullptr};
|
||||
int m_scheduleId{-1};
|
||||
Ui::PlanDialog *m_ui{nullptr};
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+6
-7
@@ -18,29 +18,28 @@ PlanDialogModel::PlanDialogModel(QObject *parent)
|
||||
tr("Complete")},
|
||||
parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_logger(getLogger("PlanDialogModel"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
PlanDialogModel::~PlanDialogModel()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
bool PlanDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_dtc = dtc;
|
||||
|
||||
connect(m_dtc.get(), &Interface::Dtc::mainScheduleChanged, this, &PlanDialogModel::onDataChanged);
|
||||
m_dtc->mainSchedules([this](const MainSchedule &ms){ onDataChanged(ms, DataModification::eAdded); });
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -37,7 +37,6 @@ public:
|
||||
|
||||
private:
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
-1
@@ -19,7 +19,6 @@ PlanEditDialog::PlanEditDialog(QWidget *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_ftc(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("PlanEditDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
|
||||
-1
@@ -62,7 +62,6 @@ private:
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<ForeignGuiComboboxInterface> m_ismGuiCbxIfc;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+4
@@ -14,6 +14,10 @@ NGL_ADD_LIBRARY2(WS IsmShared SHARED ism_mounting_point.h ism_mounting_point.cpp
|
||||
NGL_TARGET_LINK_LIBRARIES(IsmShared
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(IsmShared
|
||||
svcIsmCommon
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(IsmShared)
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
namespace InfrastructureManagement {
|
||||
struct DataPluginInterface {
|
||||
virtual ~DataPluginInterface() = default;
|
||||
};
|
||||
}
|
||||
+182
-409
@@ -1,82 +1,94 @@
|
||||
|
||||
|
||||
|
||||
#include "ism_mounting_point.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QFile>
|
||||
#include <QPainter>
|
||||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
#include <QImageWriter>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QMap>
|
||||
#include <QDir>
|
||||
#include <QElapsedTimer>
|
||||
#include <QDebug>
|
||||
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
|
||||
MountingPoint::MountingPoint()
|
||||
: MountingPoint(StructureElement(), -10)
|
||||
: m_data()
|
||||
, m_associatedAssetId(0)
|
||||
, m_aimState(MountingPointState::Undefined)
|
||||
, m_hasAssociatedAssetDefect(false)
|
||||
, m_isValid(false)
|
||||
, m_floor(-1)
|
||||
{
|
||||
m_data.id(-1);
|
||||
}
|
||||
|
||||
MountingPoint::MountingPoint(const StructureElement &data, int floorId)
|
||||
: m_data(data)
|
||||
, m_associatedAssetId(-1)
|
||||
, m_aimState(MountingPointState::Idle)
|
||||
, m_associatedAssetId(0)
|
||||
, m_aimState(MountingPointState::Undefined)
|
||||
, m_hasAssociatedAssetDefect(false)
|
||||
, m_isValid(true)
|
||||
, m_floor(floorId)
|
||||
{
|
||||
}
|
||||
|
||||
void MountingPoint::init()
|
||||
{
|
||||
getImageTableInternal();
|
||||
}
|
||||
|
||||
QString MountingPoint::name() const
|
||||
{
|
||||
if (m_data.displayName().size() > 0)
|
||||
return QString::fromStdString(m_data.displayName());
|
||||
if (m_data.name().size() > 0)
|
||||
return QString::fromStdString(m_data.name());
|
||||
return QStringLiteral("MP_%1").arg(m_data.id());
|
||||
}
|
||||
|
||||
void MountingPoint::setHasAssociatedAssetDefect(bool hasAssociatedAssetDefect)
|
||||
{
|
||||
m_hasAssociatedAssetDefect = hasAssociatedAssetDefect;
|
||||
}
|
||||
|
||||
MountingPointState MountingPoint::getNextMountingPointState(MountingPointState currState)
|
||||
{
|
||||
if (currState == MountingPointState::Empty)
|
||||
return MountingPointState::Idle;
|
||||
else if( currState == MountingPointState::Idle)
|
||||
return MountingPointState::Equipped;
|
||||
else if (currState == MountingPointState::Equipped)
|
||||
return MountingPointState::Empty;
|
||||
else
|
||||
return MountingPointState::Idle;
|
||||
}
|
||||
|
||||
QImage MountingPoint::toImage(int32_t edgeLength) const
|
||||
{
|
||||
QImage result = getImage(*this);
|
||||
|
||||
if (result.isNull())
|
||||
return result;
|
||||
|
||||
if (edgeLength == 100)
|
||||
return result;
|
||||
return result.scaled(edgeLength, edgeLength);
|
||||
return QString::fromStdString(m_data.displayName());
|
||||
}
|
||||
|
||||
QString MountingPoint::fileName() const
|
||||
{
|
||||
return QStringLiteral("%1/mp_%2.png").arg(QDir::tempPath()).arg(m_data.id());
|
||||
return QString::fromStdString(m_data.name());
|
||||
}
|
||||
|
||||
QImage MountingPoint::toImage(int32_t edgeLength) const
|
||||
{
|
||||
QImage img(edgeLength, edgeLength, QImage::Format_ARGB32);
|
||||
img.fill(Qt::transparent);
|
||||
|
||||
QPainter painter(&img);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
|
||||
// Zeichne basierend auf aimState
|
||||
QColor color;
|
||||
switch (m_aimState) {
|
||||
case MountingPointState::Equipped:
|
||||
color = Qt::green;
|
||||
break;
|
||||
case MountingPointState::Empty:
|
||||
color = Qt::red;
|
||||
break;
|
||||
case MountingPointState::Idle:
|
||||
color = Qt::gray;
|
||||
break;
|
||||
default:
|
||||
color = Qt::blue;
|
||||
break;
|
||||
}
|
||||
|
||||
painter.setBrush(color);
|
||||
painter.setPen(Qt::NoPen);
|
||||
painter.drawEllipse(2, 2, edgeLength - 4, edgeLength - 4);
|
||||
|
||||
return img;
|
||||
}
|
||||
|
||||
bool MountingPoint::writeFile(int32_t edgeLength) const
|
||||
{
|
||||
const QImage img(toImage(edgeLength));
|
||||
if (img.isNull())
|
||||
QImage img = toImage(edgeLength);
|
||||
QString fileName = this->fileName();
|
||||
if (fileName.isEmpty()) {
|
||||
return false;
|
||||
return img.save(fileName(), "PNG");
|
||||
}
|
||||
|
||||
QImageWriter writer(fileName);
|
||||
return writer.write(img);
|
||||
}
|
||||
|
||||
void MountingPoint::setAssociatedAssetId(int32_t id)
|
||||
@@ -84,399 +96,160 @@ void MountingPoint::setAssociatedAssetId(int32_t id)
|
||||
m_associatedAssetId = id;
|
||||
}
|
||||
|
||||
void MountingPoint::insertHelper(MountingPointType_def::type type,
|
||||
const QString &name,
|
||||
const QString &colorCodeGray,
|
||||
const QString &colorCodeGreen,
|
||||
const QString &colorCodeRed,
|
||||
const QString &colorCodeOrange,
|
||||
const QString &defName)
|
||||
void MountingPoint::setHasAssociatedAssetDefect(bool hasDefect)
|
||||
{
|
||||
QMap<MountingPointType_def::type, MountingPoint::MpNameImageData> &imageCont = MountingPoint::getImageTableInternal();
|
||||
|
||||
MountingPoint::MpNameImageData mnid;
|
||||
|
||||
static QString path(QStringLiteral(":/style/"));
|
||||
|
||||
|
||||
{
|
||||
|
||||
QString curFilename = path + name + QStringLiteral(".svg");
|
||||
if (!defName.isEmpty())
|
||||
curFilename = path + defName + QStringLiteral(".svg");
|
||||
|
||||
QFile file(curFilename);
|
||||
if (!file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
qCritical() << " insertHelper: file could not be opened: filename= '" << curFilename << "'";
|
||||
return;
|
||||
}
|
||||
|
||||
QByteArray fileData;
|
||||
fileData = file.readAll();
|
||||
const QString &text = QString::fromUtf8(fileData);
|
||||
fileData = text.toUtf8();
|
||||
|
||||
QImage currentImg;
|
||||
if (!currentImg.loadFromData(fileData))
|
||||
{
|
||||
qCritical() << " insertHelper: loadFromData failed: filename= '" << curFilename << "'";
|
||||
return;
|
||||
}
|
||||
|
||||
mnid.nipBlue = MountingPoint::NameImagePair(name + MountingPoint::mpColorToPostfix(MountingPoint::MpColor::BLUE), currentImg);
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
|
||||
QString curFilename = path + name + QStringLiteral("_fillcolor.svg.template");
|
||||
QFile file(curFilename);
|
||||
if (!file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
qCritical() << " insertHelper: file could not be opened: filename= '" << curFilename << "'";
|
||||
return;
|
||||
}
|
||||
|
||||
QByteArray fileData;
|
||||
fileData = file.readAll();
|
||||
const QString &textTemplate = QString::fromUtf8(fileData);
|
||||
|
||||
QString temp;
|
||||
{
|
||||
temp = textTemplate;
|
||||
temp.replace(QString(QStringLiteral("@@FILLCOLOR@@")), colorCodeGray);
|
||||
fileData = temp.toUtf8();
|
||||
|
||||
QImage currentImg;
|
||||
if (!currentImg.loadFromData(fileData))
|
||||
{
|
||||
qCritical() << " insertHelper: loadFromData failed: filename= '" << curFilename << "'";
|
||||
return;
|
||||
}
|
||||
mnid.nipGray = MountingPoint::NameImagePair(name + MountingPoint::mpColorToPostfix(MountingPoint::MpColor::GRAY), currentImg);
|
||||
}
|
||||
{
|
||||
temp = textTemplate;
|
||||
temp.replace(QString(QStringLiteral("@@FILLCOLOR@@")), colorCodeRed);
|
||||
fileData = temp.toUtf8();
|
||||
|
||||
QImage currentImg;
|
||||
if (!currentImg.loadFromData(fileData))
|
||||
{
|
||||
qCritical() << " insertHelper: loadFromData failed: filename= '" << curFilename << "'";
|
||||
return;
|
||||
}
|
||||
|
||||
currentImg.save(QStringLiteral("/tmp/") + name + QStringLiteral("_red.png"));
|
||||
|
||||
mnid.nipRed = MountingPoint::NameImagePair(name + MountingPoint::mpColorToPostfix(MountingPoint::MpColor::RED), currentImg);
|
||||
}
|
||||
{
|
||||
temp = textTemplate;
|
||||
temp.replace(QString(QStringLiteral("@@FILLCOLOR@@")), colorCodeGreen);
|
||||
fileData = temp.toUtf8();
|
||||
|
||||
QImage currentImg;
|
||||
if (!currentImg.loadFromData(fileData))
|
||||
{
|
||||
qCritical() << " insertHelper: loadFromData failed: filename= '" << curFilename << "'";
|
||||
return;
|
||||
}
|
||||
mnid.nipGreen = MountingPoint::NameImagePair(name + MountingPoint::mpColorToPostfix(MountingPoint::MpColor::GREEN), currentImg);
|
||||
}
|
||||
{
|
||||
temp = textTemplate;
|
||||
temp.replace(QString(QStringLiteral("@@FILLCOLOR@@")), colorCodeOrange);
|
||||
fileData = temp.toUtf8();
|
||||
|
||||
QImage currentImg;
|
||||
if (!currentImg.loadFromData(fileData))
|
||||
{
|
||||
qCritical() << " insertHelper: loadFromData failed: filename= '" << curFilename << "'";
|
||||
return;
|
||||
}
|
||||
mnid.nipOrange = MountingPoint::NameImagePair(name + MountingPoint::mpColorToPostfix(MountingPoint::MpColor::ORANGE), currentImg);
|
||||
}
|
||||
}
|
||||
imageCont.insert(type, mnid);
|
||||
m_hasAssociatedAssetDefect = hasDefect;
|
||||
}
|
||||
|
||||
void MountingPoint::init()
|
||||
MountingPointState MountingPoint::getNextMountingPointState(const MountingPointState currState)
|
||||
{
|
||||
|
||||
|
||||
|
||||
if (MountingPoint::getImageTableInternal().isEmpty())
|
||||
{
|
||||
#ifdef BENCHMARK
|
||||
QElapsedTimer elapsedTimer1;
|
||||
elapsedTimer1.start();
|
||||
#endif
|
||||
|
||||
|
||||
static QString colorCodeGray (QStringLiteral("808080"));
|
||||
static QString colorCodeGreen (QStringLiteral("00FF00"));
|
||||
static QString colorCodeRed (QStringLiteral("FF0000"));
|
||||
static QString colorCodeOrange(QStringLiteral("FF5F1F"));
|
||||
|
||||
insertHelper(MountingPointType_def::BuildingSensorModule, QStringLiteral("reference_module"), colorCodeGray, colorCodeGreen, colorCodeRed, colorCodeOrange);
|
||||
insertHelper(MountingPointType_def::OutdoorCamera, QStringLiteral("mobile_video"), colorCodeGray, colorCodeGreen, colorCodeRed, colorCodeOrange);
|
||||
insertHelper(MountingPointType_def::IndoorCamera, QStringLiteral("fixed_video_announcement"), colorCodeGray, colorCodeGreen, colorCodeRed, colorCodeOrange);
|
||||
|
||||
|
||||
|
||||
|
||||
insertHelper(MountingPointType_def::OutdoorIPS, QStringLiteral("ips"), colorCodeGray, colorCodeGreen, colorCodeRed, colorCodeOrange);
|
||||
insertHelper(MountingPointType_def::IndoorIPS, QStringLiteral("ips"), colorCodeGray, colorCodeGreen, colorCodeRed, colorCodeOrange);
|
||||
|
||||
insertHelper(MountingPointType_def::MeteoDataUnit, QStringLiteral("meteorological_data"), colorCodeGray, colorCodeGreen, colorCodeRed, colorCodeOrange);
|
||||
|
||||
|
||||
insertHelper(MountingPointType_def::AnnouncementUnit, QStringLiteral("announcement"), colorCodeGray, colorCodeGreen, colorCodeRed, colorCodeOrange);
|
||||
insertHelper(MountingPointType_def::BuildingNetworkSwitch, QStringLiteral("presets"), colorCodeGray, colorCodeGreen, colorCodeRed, colorCodeOrange);
|
||||
|
||||
|
||||
insertHelper(MountingPointType_def::EffectGenerationControlUnit, QStringLiteral("egcu"), colorCodeGray, colorCodeGreen, colorCodeRed, colorCodeOrange, QStringLiteral("egcu_enabled"));
|
||||
|
||||
|
||||
|
||||
insertHelper(MountingPointType_def::Unknown, QStringLiteral("unknown"), colorCodeGray, colorCodeGreen, colorCodeRed, colorCodeOrange);
|
||||
|
||||
#ifdef BENCHMARK
|
||||
|
||||
qCritical() << " MountingPoint::init-BENCHMARK: took " << elapsedTimer1.elapsed() << " [ms]";
|
||||
#endif
|
||||
switch (currState) {
|
||||
case MountingPointState::Undefined:
|
||||
return MountingPointState::Empty;
|
||||
case MountingPointState::Equipped:
|
||||
return MountingPointState::Empty;
|
||||
case MountingPointState::Empty:
|
||||
return MountingPointState::Idle;
|
||||
case MountingPointState::Idle:
|
||||
return MountingPointState::Equipped;
|
||||
default:
|
||||
return MountingPointState::Undefined;
|
||||
}
|
||||
}
|
||||
|
||||
QString MountingPoint::mpColorToString(MpColor mpColor)
|
||||
{
|
||||
switch (mpColor) {
|
||||
case MpColor::BLUE:
|
||||
return QStringLiteral("BLUE");
|
||||
break;
|
||||
case MpColor::GRAY:
|
||||
return QStringLiteral("GRAY");
|
||||
break;
|
||||
case MpColor::GREEN:
|
||||
return QStringLiteral("GREEN");
|
||||
break;
|
||||
case MpColor::RED:
|
||||
return QStringLiteral("RED");
|
||||
break;
|
||||
case MpColor::ORANGE:
|
||||
return QStringLiteral("ORANGE");
|
||||
break;
|
||||
default:
|
||||
|
||||
break;
|
||||
case MpColor::GRAY: return QString::fromUtf8("gray");
|
||||
case MpColor::BLUE: return QString::fromUtf8("blue");
|
||||
case MpColor::RED: return QString::fromUtf8("red");
|
||||
case MpColor::GREEN: return QString::fromUtf8("green");
|
||||
case MpColor::ORANGE: return QString::fromUtf8("orange");
|
||||
default: return QString::fromUtf8("unknown");
|
||||
}
|
||||
return QStringLiteral("MpColorUndefined");
|
||||
}
|
||||
|
||||
QString MountingPoint::mpColorToPostfix(MpColor mpColor)
|
||||
{
|
||||
return QStringLiteral("_") + MountingPoint::mpColorToString(mpColor);
|
||||
switch (mpColor) {
|
||||
case MpColor::GRAY: return QString::fromUtf8("_gray");
|
||||
case MpColor::BLUE: return QString::fromUtf8("_blue");
|
||||
case MpColor::RED: return QString::fromUtf8("_red");
|
||||
case MpColor::GREEN: return QString::fromUtf8("_green");
|
||||
case MpColor::ORANGE: return QString::fromUtf8("_orange");
|
||||
default: return QString::fromUtf8("_unknown");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
QMap<MountingPointType_def::type, MountingPoint::MpNameImageData> &MountingPoint::getImageTableInternal()
|
||||
QMap<MountingPointType, MountingPoint::MpNameImageData> &MountingPoint::getImageTable()
|
||||
{
|
||||
static QMap<MountingPointType_def::type, MpNameImageData> s_imageTable;
|
||||
return s_imageTable;
|
||||
}
|
||||
QMap<MountingPointType_def::type, MountingPoint::MpNameImageData> &MountingPoint::getImageTable()
|
||||
{
|
||||
MountingPoint::init();
|
||||
return getImageTableInternal();
|
||||
}
|
||||
|
||||
bool MountingPoint::getImageAttributePlanActivity(const MountingPoint &mp,
|
||||
QImage &imgOut, QString &attribNameOut)
|
||||
bool MountingPoint::getImageAttributePlanActivity(const MountingPoint& mp,
|
||||
QImage &imgOut, QString &attribNameOut)
|
||||
{
|
||||
const MpNameImageData *mnip = getNameImageData(mp);
|
||||
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
Q_ASSERT(mnip);
|
||||
#endif
|
||||
|
||||
if (!mnip)
|
||||
return false;
|
||||
|
||||
const NameImagePair *nip = nullptr;
|
||||
const bool hasAsset = mp.hasAssociatedAsset();
|
||||
const InfrastructureManagement::MountingPointState_def::type aimState = mp.aimState().underlying();
|
||||
|
||||
if ( ((aimState==InfrastructureManagement::MountingPointState_def::Empty) && !hasAsset ) ||
|
||||
((aimState==InfrastructureManagement::MountingPointState_def::Equipped) && hasAsset )
|
||||
)
|
||||
nip = &mnip->nipGreen;
|
||||
else if ((aimState==InfrastructureManagement::MountingPointState_def::Empty) && hasAsset )
|
||||
nip = &mnip->nipRed;
|
||||
else if ((aimState==InfrastructureManagement::MountingPointState_def::Equipped) && !hasAsset )
|
||||
nip = &mnip->nipBlue;
|
||||
|
||||
|
||||
if (!nip)
|
||||
nip = &mnip->nipGray;
|
||||
|
||||
imgOut = nip->m_img;
|
||||
attribNameOut = nip->m_name;
|
||||
|
||||
return true;
|
||||
return getImageAttribute(mp, MpColor::BLUE, imgOut, attribNameOut);
|
||||
}
|
||||
|
||||
bool MountingPoint::getImageAttributePlanDefinition(const MountingPoint &mp, QImage &imgOut, QString &attribNameOut)
|
||||
bool MountingPoint::getImageAttributePlanDefinition(const MountingPoint& mp,
|
||||
QImage &imgOut, QString &attribNameOut)
|
||||
{
|
||||
const MpNameImageData *mnip = getNameImageData(mp);
|
||||
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
Q_ASSERT(mnip);
|
||||
#endif
|
||||
|
||||
if (!mnip)
|
||||
return false;
|
||||
|
||||
const NameImagePair *nip = nullptr;
|
||||
const InfrastructureManagement::MountingPointState_def::type aimState = mp.aimState().underlying();
|
||||
|
||||
switch (aimState) {
|
||||
case InfrastructureManagement::MountingPointState_def::Empty:
|
||||
nip = &mnip->nipRed;
|
||||
break;
|
||||
case InfrastructureManagement::MountingPointState_def::Idle:
|
||||
nip = &mnip->nipGray;
|
||||
break;
|
||||
case InfrastructureManagement::MountingPointState_def::Equipped:
|
||||
nip = &mnip->nipBlue;
|
||||
break;
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
imgOut = nip->m_img;
|
||||
attribNameOut = nip->m_name;
|
||||
|
||||
return true;
|
||||
return getImageAttribute(mp, MpColor::GRAY, imgOut, attribNameOut);
|
||||
}
|
||||
|
||||
bool MountingPoint::getImageAttribute(const MountingPoint &mp, MpColor mpColor, QImage &img, QString &attribName)
|
||||
bool MountingPoint::getImageAttribute(const MountingPoint& mp, MpColor mpColor,
|
||||
QImage &img, QString &attribName)
|
||||
{
|
||||
const MpNameImageData *mnip = getNameImageData(mp);
|
||||
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
Q_ASSERT(mnip);
|
||||
#endif
|
||||
|
||||
if (!mnip)
|
||||
const auto &table = getImageTable();
|
||||
auto it = table.find(mp.type());
|
||||
if (it == table.end()) {
|
||||
return false;
|
||||
|
||||
const NameImagePair *nip = nullptr;
|
||||
|
||||
}
|
||||
|
||||
const MpNameImageData &data = it.value();
|
||||
switch (mpColor) {
|
||||
case MpColor::BLUE:
|
||||
nip = &mnip->nipBlue;
|
||||
break;
|
||||
case MpColor::GRAY:
|
||||
nip = &mnip->nipGray;
|
||||
break;
|
||||
case MpColor::GREEN:
|
||||
nip = &mnip->nipGreen;
|
||||
break;
|
||||
case MpColor::RED:
|
||||
nip = &mnip->nipRed;
|
||||
break;
|
||||
case MpColor::ORANGE:
|
||||
nip = &mnip->nipOrange;
|
||||
break;
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
img = nip->m_img;
|
||||
attribName = nip->m_name;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
QImage MountingPoint::getImage(const MountingPoint &mp)
|
||||
{
|
||||
const NameImagePair *nip = getNameImagePair(mp);
|
||||
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
Q_ASSERT(nip);
|
||||
#endif
|
||||
|
||||
if (!nip)
|
||||
return {};
|
||||
|
||||
return nip->m_img;
|
||||
}
|
||||
|
||||
const MountingPoint::MpNameImageData *MountingPoint::getNameImageData(const MountingPoint &mp)
|
||||
{
|
||||
QMap<MountingPointType_def::type, MountingPoint::MpNameImageData> &imageCont = MountingPoint::getImageTable();
|
||||
|
||||
const MountingPointType_def::type type = mp.type().underlying();
|
||||
|
||||
auto it = imageCont.find(type);
|
||||
if (it == imageCont.end())
|
||||
{
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
qCritical() << " MountingPointType not found: type= " << type;
|
||||
Q_ASSERT(nullptr);
|
||||
#endif
|
||||
return {};
|
||||
}
|
||||
|
||||
const MpNameImageData *mnip = nullptr;
|
||||
|
||||
mnip = &(*it);
|
||||
|
||||
return mnip;
|
||||
}
|
||||
|
||||
const MountingPoint::NameImagePair* MountingPoint::getNameImagePair(const MountingPoint &mp)
|
||||
{
|
||||
QMap<MountingPointType_def::type, MountingPoint::MpNameImageData> &imageCont = MountingPoint::getImageTable();
|
||||
|
||||
const MountingPointType_def::type type = mp.type().underlying();
|
||||
|
||||
auto it = imageCont.find(type);
|
||||
if (it == imageCont.end())
|
||||
return {};
|
||||
|
||||
const MountingPoint::MpNameImageData &mnid = *it;
|
||||
const NameImagePair *nip = nullptr;
|
||||
|
||||
switch (mp.aimState().underlying())
|
||||
{
|
||||
case MountingPointState_def::Equipped:
|
||||
nip = &mnid.nipBlue;
|
||||
case MpColor::GRAY:
|
||||
img = data.nipGray.m_img;
|
||||
attribName = data.nipGray.m_name;
|
||||
break;
|
||||
case MountingPointState_def::Empty:
|
||||
nip = &mnid.nipRed;
|
||||
case MpColor::BLUE:
|
||||
img = data.nipBlue.m_img;
|
||||
attribName = data.nipBlue.m_name;
|
||||
break;
|
||||
case MountingPointState_def::Idle:
|
||||
nip = &mnid.nipGray;
|
||||
case MpColor::RED:
|
||||
img = data.nipRed.m_img;
|
||||
attribName = data.nipRed.m_name;
|
||||
break;
|
||||
case MpColor::GREEN:
|
||||
img = data.nipGreen.m_img;
|
||||
attribName = data.nipGreen.m_name;
|
||||
break;
|
||||
case MpColor::ORANGE:
|
||||
img = data.nipOrange.m_img;
|
||||
attribName = data.nipOrange.m_name;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
Q_ASSERT(nip);
|
||||
#endif
|
||||
|
||||
return nip;
|
||||
return !img.isNull();
|
||||
}
|
||||
|
||||
}
|
||||
QMap<MountingPointType, MountingPoint::MpNameImageData> &MountingPoint::getImageTableInternal()
|
||||
{
|
||||
static QMap<MountingPointType, MpNameImageData> imageTable;
|
||||
static bool initialized = false;
|
||||
|
||||
if (!initialized) {
|
||||
// Initialisiere mit Platzhalter-Daten
|
||||
insertHelper(MountingPointType::Generic, QString::fromUtf8("Generic"), QString::fromUtf8(":/gray/generic.png"),
|
||||
QString::fromUtf8(":/green/generic.png"), QString::fromUtf8(":/red/generic.png"), QString::fromUtf8(":/orange/generic.png"));
|
||||
insertHelper(MountingPointType::Sensor, QString::fromUtf8("Sensor"), QString::fromUtf8(":/gray/sensor.png"),
|
||||
QString::fromUtf8(":/green/sensor.png"), QString::fromUtf8(":/red/sensor.png"), QString::fromUtf8(":/orange/sensor.png"));
|
||||
insertHelper(MountingPointType::Actuator, QString::fromUtf8("Actuator"), QString::fromUtf8(":/gray/actuator.png"),
|
||||
QString::fromUtf8(":/green/actuator.png"), QString::fromUtf8(":/red/actuator.png"), QString::fromUtf8(":/orange/actuator.png"));
|
||||
insertHelper(MountingPointType::BuildingSensorModule, QString::fromUtf8("BSM"), QString::fromUtf8(":/gray/bsm.png"),
|
||||
QString::fromUtf8(":/green/bsm.png"), QString::fromUtf8(":/red/bsm.png"), QString::fromUtf8(":/orange/bsm.png"));
|
||||
insertHelper(MountingPointType::OutdoorCamera, QString::fromUtf8("OutdoorCamera"), QString::fromUtf8(":/gray/camera.png"),
|
||||
QString::fromUtf8(":/green/camera.png"), QString::fromUtf8(":/red/camera.png"), QString::fromUtf8(":/orange/camera.png"));
|
||||
insertHelper(MountingPointType::IndoorCamera, QString::fromUtf8("IndoorCamera"), QString::fromUtf8(":/gray/camera.png"),
|
||||
QString::fromUtf8(":/green/camera.png"), QString::fromUtf8(":/red/camera.png"), QString::fromUtf8(":/orange/camera.png"));
|
||||
insertHelper(MountingPointType::OutdoorIPS, QString::fromUtf8("OutdoorIPS"), QString::fromUtf8(":/gray/ips.png"),
|
||||
QString::fromUtf8(":/green/ips.png"), QString::fromUtf8(":/red/ips.png"), QString::fromUtf8(":/orange/ips.png"));
|
||||
insertHelper(MountingPointType::IndoorIPS, QString::fromUtf8("IndoorIPS"), QString::fromUtf8(":/gray/ips.png"),
|
||||
QString::fromUtf8(":/green/ips.png"), QString::fromUtf8(":/red/ips.png"), QString::fromUtf8(":/orange/ips.png"));
|
||||
insertHelper(MountingPointType::MeteoDataUnit, QString::fromUtf8("Meteo"), QString::fromUtf8(":/gray/meteo.png"),
|
||||
QString::fromUtf8(":/green/meteo.png"), QString::fromUtf8(":/red/meteo.png"), QString::fromUtf8(":/orange/meteo.png"));
|
||||
insertHelper(MountingPointType::AnnouncementUnit, QString::fromUtf8("Announcement"), QString::fromUtf8(":/gray/announcement.png"),
|
||||
QString::fromUtf8(":/green/announcement.png"), QString::fromUtf8(":/red/announcement.png"), QString::fromUtf8(":/orange/announcement.png"));
|
||||
insertHelper(MountingPointType::BuildingNetworkSwitch, QString::fromUtf8("Switch"), QString::fromUtf8(":/gray/switch.png"),
|
||||
QString::fromUtf8(":/green/switch.png"), QString::fromUtf8(":/red/switch.png"), QString::fromUtf8(":/orange/switch.png"));
|
||||
insertHelper(MountingPointType::EffectGenerationControlUnit, QString::fromUtf8("EGCU"), QString::fromUtf8(":/gray/egcu.png"),
|
||||
QString::fromUtf8(":/green/egcu.png"), QString::fromUtf8(":/red/egcu.png"), QString::fromUtf8(":/orange/egcu.png"));
|
||||
insertHelper(MountingPointType::Unknown, QString::fromUtf8("Unknown"), QString::fromUtf8(":/gray/unknown.png"),
|
||||
QString::fromUtf8(":/green/unknown.png"), QString::fromUtf8(":/red/unknown.png"), QString::fromUtf8(":/orange/unknown.png"));
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
return imageTable;
|
||||
}
|
||||
|
||||
void MountingPoint::insertHelper(MountingPointType type,
|
||||
const QString &name,
|
||||
const QString &colorCodeGray,
|
||||
const QString &colorCodeGreen,
|
||||
const QString &colorCodeRed,
|
||||
const QString &colorCodeOrange,
|
||||
const QString &defName)
|
||||
{
|
||||
MpNameImageData data;
|
||||
data.nipGray = NameImagePair(name.isEmpty() ? defName : name + u"_gray", QImage(colorCodeGray));
|
||||
data.nipBlue = NameImagePair(name.isEmpty() ? defName : name + u"_blue", QImage(colorCodeGray)); // blau = grau als Platzhalter
|
||||
data.nipGreen = NameImagePair(name.isEmpty() ? defName : name + u"_green", QImage(colorCodeGreen));
|
||||
data.nipRed = NameImagePair(name.isEmpty() ? defName : name + u"_red", QImage(colorCodeRed));
|
||||
data.nipOrange = NameImagePair(name.isEmpty() ? defName : name + u"_orange", QImage(colorCodeOrange));
|
||||
|
||||
getImageTableInternal()[type] = data;
|
||||
}
|
||||
|
||||
} // namespace InfrastructureManagement
|
||||
+12
-43
@@ -1,23 +1,12 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/InfrastructureManagement/Shared/ismshared_export.h>
|
||||
#include <Services/InfrastructureManagement/ism.hpp>
|
||||
#include <QImage>
|
||||
|
||||
|
||||
namespace dds
|
||||
{
|
||||
namespace core
|
||||
{
|
||||
static inline uint qHash(const InfrastructureManagement::MountingPointType &mpt)
|
||||
{
|
||||
return ::qHash(mpt.underlying());
|
||||
}
|
||||
}
|
||||
}
|
||||
#include <ismshared_export.h>
|
||||
#include <InfrastructureManagement/ism.hpp>
|
||||
#include <InfrastructureManagement/ism_enums.hpp>
|
||||
#include <QtGui/QImage>
|
||||
#include <QMap>
|
||||
#include <QGuiApplication>
|
||||
#include <QScreen>
|
||||
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
@@ -36,16 +25,9 @@ public:
|
||||
bool hasAssociatedAsset() const { return m_associatedAssetId > 0; }
|
||||
bool hasAssociatedAssetDefect() const { return m_hasAssociatedAssetDefect; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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(); }
|
||||
@@ -64,8 +46,6 @@ public:
|
||||
void setHasAssociatedAssetDefect(bool hasAssociatedAssetDefect);
|
||||
MountingPointState getNextMountingPointState(const MountingPointState currState);
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
StructureElement m_data;
|
||||
int32_t m_associatedAssetId;
|
||||
@@ -75,7 +55,6 @@ private:
|
||||
int m_floor;
|
||||
|
||||
public:
|
||||
|
||||
enum class MpColor
|
||||
{
|
||||
GRAY,
|
||||
@@ -105,10 +84,7 @@ public:
|
||||
NameImagePair nipOrange;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
static QMap<MountingPointType_def::type, MpNameImageData> &getImageTable();
|
||||
static QMap<MountingPointType, MpNameImageData> &getImageTable();
|
||||
|
||||
static bool getImageAttributePlanActivity(const MountingPoint& mp,
|
||||
QImage &imgOut, QString &attribNameOut);
|
||||
@@ -119,21 +95,14 @@ public:
|
||||
QImage &img, QString &attribName);
|
||||
|
||||
private:
|
||||
static QMap<MountingPointType_def::type, MpNameImageData> &getImageTableInternal();
|
||||
static void insertHelper(MountingPointType_def::type type,
|
||||
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());
|
||||
};
|
||||
|
||||
static QImage getImage(const MountingPoint &mp);
|
||||
|
||||
static const MpNameImageData *getNameImageData(const MountingPoint&mp);
|
||||
static const NameImagePair *getNameImagePair(const MountingPoint&mp);
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace InfrastructureManagement
|
||||
+3
-1
@@ -3,10 +3,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <Services/InfrastructureManagement/ism_dtc.h>
|
||||
#include <Services/InfrastructureManagement/ism_ftc.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QSet>
|
||||
#include <PluginInterfaces/data_plugin_interface.h>
|
||||
|
||||
#ifndef ISMDATAPLUGININTERFACE_EXPORT
|
||||
@@ -76,7 +78,7 @@ public:
|
||||
|
||||
|
||||
Q_SIGNALS:
|
||||
void mountingPointChanged(const InfrastructureManagement::MountingPoint &data, DataModification modType);
|
||||
void mountingPointChanged(const InfrastructureManagement::MountingPoint &data, ParticipantManagement::DataModification modType);
|
||||
void scheduleIdChanged(int32_t newScheduleId);
|
||||
void buildingsInCurrentExerciseChanged();
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user