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
+1
-1
@@ -3,7 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Viewer/LtsDataView/abstract_display_widget.h>
|
||||
#include <Plugins/MarkerManagement/Gui/Common/mrkcommon_export.h>
|
||||
#include <Lts/Plugins/MarkerManagement/Gui/Common/mrkcommon_export.h>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
|
||||
+11
-12
@@ -20,13 +20,12 @@ MarkerManagementApplyFilter::MarkerManagementApplyFilter(LtsSession::LtsSession
|
||||
, m_fltParticipantIfc(fltParticipantIfc)
|
||||
, m_fltAesIfc(fltAesIfc)
|
||||
, m_fltBuildingComponentIfc(fltBuildingComponenIfc)
|
||||
, m_logger(getLogger("MarkerManagementApplyFilter"))
|
||||
{
|
||||
std::shared_ptr<SituationMap::ForeignGuiInterface> spSitMapGuiIfc;
|
||||
m_session->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(spSitMapGuiIfc);
|
||||
if (!spSitMapGuiIfc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "No spSitMapGuiIfc";
|
||||
ERROR_LOG() << "No spSitMapGuiIfc";
|
||||
return;
|
||||
}
|
||||
m_sitMapGuiIfc = spSitMapGuiIfc;
|
||||
@@ -47,7 +46,7 @@ const QJsonObject MarkerManagementApplyFilter::getFilterParamsJson() const
|
||||
obj[QStringLiteral("SymbolAppearanceJson")] = symbolAppearanceSettings->settingsToJson();
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "cannot get filter as SymApp filter ifc is missing";
|
||||
WARNING_LOG() << "cannot get filter as SymApp filter ifc is missing";
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +59,7 @@ const QJsonObject MarkerManagementApplyFilter::getFilterParamsJson() const
|
||||
obj[QStringLiteral("AesFilterJson")] = aesDisplayFilter->filterToJson();
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "cannot get filter as aes filter ifc is missing";
|
||||
WARNING_LOG() << "cannot get filter as aes filter ifc is missing";
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +72,7 @@ const QJsonObject MarkerManagementApplyFilter::getFilterParamsJson() const
|
||||
obj[QStringLiteral("BuildingComponentSettingsJson")] = buildingComponentSettings->bldCmpSettingsToJson();
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "cannot get filter as BldgCmpnt filter ifc is missing";
|
||||
WARNING_LOG() << "cannot get filter as BldgCmpnt filter ifc is missing";
|
||||
}
|
||||
|
||||
return obj;
|
||||
@@ -89,14 +88,14 @@ bool MarkerManagementApplyFilter::applyFilter(const QByteArray &filterContent)
|
||||
{
|
||||
if (filterContent.isEmpty())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "filterContent is empty";
|
||||
ERROR_LOG() << "filterContent is empty";
|
||||
return false;
|
||||
}
|
||||
QJsonParseError parserError;
|
||||
const QJsonDocument jDoc(QJsonDocument::fromJson(filterContent, &parserError));
|
||||
if (parserError.error != QJsonParseError::NoError)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error parsing json document: " << parserError.errorString();
|
||||
ERROR_LOG() << "Error parsing json document: " << parserError.errorString();
|
||||
return false;
|
||||
}
|
||||
return applyFilter(jDoc.object());
|
||||
@@ -111,7 +110,7 @@ bool MarkerManagementApplyFilter::applyFilter(const QJsonObject &filterContent)
|
||||
{
|
||||
const QJsonObject innerObj = filterContent[QStringLiteral("AesFilterJson")].toObject();
|
||||
if (innerObj.isEmpty())
|
||||
ERROR_LOG(m_logger) << "inner content AesFilterJson is empty";
|
||||
ERROR_LOG() << "inner content AesFilterJson is empty";
|
||||
else
|
||||
aesFilter.content(QJsonDocument(innerObj).toJson().constData());
|
||||
}
|
||||
@@ -124,7 +123,7 @@ bool MarkerManagementApplyFilter::applyFilter(const QJsonObject &filterContent)
|
||||
{
|
||||
QJsonObject innerObj = filterContent[QStringLiteral("SymbolAppearanceJson")].toObject();
|
||||
if (innerObj.isEmpty())
|
||||
ERROR_LOG(m_logger) << "inner content SymbolAppearanceJson is empty";
|
||||
ERROR_LOG() << "inner content SymbolAppearanceJson is empty";
|
||||
else
|
||||
symbolAppearance.content(QJsonDocument(innerObj).toJson().constData());
|
||||
}
|
||||
@@ -137,7 +136,7 @@ bool MarkerManagementApplyFilter::applyFilter(const QJsonObject &filterContent)
|
||||
{
|
||||
QJsonObject innerObj = filterContent[QStringLiteral("BuildingComponentSettingsJson")].toObject();
|
||||
if (innerObj.isEmpty())
|
||||
ERROR_LOG(m_logger) << "inner content BuildingComponentSettingsJson is empty";
|
||||
ERROR_LOG() << "inner content BuildingComponentSettingsJson is empty";
|
||||
else
|
||||
buildingComponentFilter.content(QJsonDocument(innerObj).toJson().constData());
|
||||
}
|
||||
@@ -188,7 +187,7 @@ bool MarkerManagementApplyFilter::applyFilter(const QJsonObject &filterContent)
|
||||
appearanceSettings->setSettingsFromData(symbolAppearance);
|
||||
|
||||
} else
|
||||
WARNING_LOG(m_logger) << "cannot set filter as at least one filter ifc is missing (fltParticipantIfc|fltIfcPtr)";
|
||||
WARNING_LOG() << "cannot set filter as at least one filter ifc is missing (fltParticipantIfc|fltIfcPtr)";
|
||||
|
||||
|
||||
|
||||
@@ -207,7 +206,7 @@ bool MarkerManagementApplyFilter::applyFilter(const QJsonObject &filterContent)
|
||||
buildingComponentSettings->setBldCmpSettingsFromData(buildingComponentFilter);
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "cannot set filter as at least one filter ifc is missing (fltBldgCmpntIfc)";
|
||||
WARNING_LOG() << "cannot set filter as at least one filter ifc is missing (fltBldgCmpntIfc)";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <MarkerManagement/logger.h>
|
||||
#include <Plugins/MarkerManagement/Gui/Common/mrkcommon_export.h>
|
||||
#include <Lts/Plugins/MarkerManagement/Gui/Common/mrkcommon_export.h>
|
||||
|
||||
#include <LtsSession/lts_session.h>
|
||||
#include <LtsSession/lts_session_data.h>
|
||||
@@ -37,7 +37,6 @@ private:
|
||||
std::weak_ptr<FilterManagement::ForeignAesGuiInterface> m_fltAesIfc;
|
||||
std::weak_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> m_fltBuildingComponentIfc;
|
||||
std::weak_ptr<SituationMap::ForeignGuiInterface> m_sitMapGuiIfc;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+1
-2
@@ -28,7 +28,6 @@ MarkerManagementDialogModel::MarkerManagementDialogModel(QObject *parent)
|
||||
tr("File Id"),
|
||||
tr("Image")},
|
||||
parent)
|
||||
, m_logger(getLogger("MarkerManagementDialogModel"))
|
||||
{}
|
||||
|
||||
|
||||
@@ -93,7 +92,7 @@ void MarkerManagementDialogModel::loadPreview(int fileContentId, int rowId)
|
||||
QByteArray byteArray;
|
||||
if (m_flmGui->loadContent(fileContentId, byteArray, true) && byteArray.size() > 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_previews.insert fileContentId=" << fileContentId
|
||||
DEBUG_LOG() << "m_previews.insert fileContentId=" << fileContentId
|
||||
<< " size Preview=" << byteArray.size();
|
||||
QString str = QStringLiteral("<html><center><img src='data:image/png;base64,%1'></center></html>").arg(QString::fromLatin1(byteArray.toBase64()));
|
||||
m_previews.insert(fileContentId, str);
|
||||
|
||||
+1
-3
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <MarkerManagement/mrk_dtc.h>
|
||||
#include <MarkerManagement/logger.h>
|
||||
#include <Plugins/MarkerManagement/Gui/Common/mrkcommon_export.h>
|
||||
#include <Lts/Plugins/MarkerManagement/Gui/Common/mrkcommon_export.h>
|
||||
#include <FileManagement/flm_explorer_gui_plugin_interface.h>
|
||||
#include <LtsWidgets/lts_abstract_table_model.h>
|
||||
#include <LtsWidgets/lts_column_filter_proxy_model.h>
|
||||
@@ -67,8 +67,6 @@ private:
|
||||
std::shared_ptr<FileManagement::ForeignGuiInterface> m_flmGui;
|
||||
int m_timezoneHoursOffset {0};
|
||||
bool m_ignoreTimezone {false};
|
||||
LOGGER_T m_logger;
|
||||
|
||||
friend class MarkerSortFilterProxyModel;
|
||||
};
|
||||
|
||||
|
||||
+4
-5
@@ -24,7 +24,6 @@ SnapshotTopicEditor::SnapshotTopicEditor(SnapshotDialogModel *snapshotModel, QSo
|
||||
, m_proxyModel(proxyModel)
|
||||
, m_snapshotId(0)
|
||||
, m_ui(new Ui::SnapshotTopicEditor)
|
||||
, m_logger(getLogger("SnapshotTopicEditor"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
init(m_ui->widget);
|
||||
@@ -63,21 +62,21 @@ SnapshotTopicEditor::~SnapshotTopicEditor()
|
||||
|
||||
void SnapshotTopicEditor::updateInternalData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION;
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
|
||||
m_ui->snapshotsDataView->selectionModel()->clear();
|
||||
m_snapshotId = m_topicData.properties.value(QStringLiteral("snapshotId")).toInt(0);
|
||||
|
||||
if (m_snapshotId > 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "snapshotId = " << m_snapshotId;
|
||||
DEBUG_LOG() << "snapshotId = " << m_snapshotId;
|
||||
QModelIndex idx = m_snapshotModel->findIndexForId(m_snapshotId);
|
||||
|
||||
if (idx.isValid())
|
||||
{
|
||||
m_ui->snapshotsDataView->selectRow(m_proxyModel->mapFromSource(idx));
|
||||
const MarkerManagement::Snapshot snapshot = m_snapshotModel->getRowData(idx.row());
|
||||
DEBUG_LOG(m_logger) << "SnapShot Selected " << snapshot.id() ;
|
||||
DEBUG_LOG() << "SnapShot Selected " << snapshot.id() ;
|
||||
m_snapshotId = snapshot.id();
|
||||
m_ui->lblName->setText(QString::fromStdString(snapshot.name()));
|
||||
}
|
||||
@@ -115,7 +114,7 @@ void SnapshotTopicEditor::onSnapshotSelected()
|
||||
return;
|
||||
|
||||
m_snapshotId = snapshot.id();
|
||||
DEBUG_LOG(m_logger) << "new snapshot id = " << m_snapshotId;
|
||||
DEBUG_LOG() << "new snapshot id = " << m_snapshotId;
|
||||
m_ui->lblName->setText(QString::fromStdString(snapshot.name()));
|
||||
slotChangesMade();
|
||||
}
|
||||
|
||||
-1
@@ -45,7 +45,6 @@ private:
|
||||
int m_snapshotId{0};
|
||||
|
||||
Ui::SnapshotTopicEditor *m_ui{nullptr};
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+9
-10
@@ -29,7 +29,6 @@ SnapshotCreateDialog::SnapshotCreateDialog(QWidget *parent)
|
||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_ui(new Ui::SnapshotCreateDialog)
|
||||
, m_logger(getLogger("SnapshotCreateDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -77,7 +76,7 @@ bool SnapshotCreateDialog::init(const std::shared_ptr<MarkerManagement::Interfac
|
||||
m_session = session;
|
||||
|
||||
if (!m_session->getForeignGuiInterface<FileManagement::ForeignGuiInterface>(m_flmGui))
|
||||
ERROR_LOG(m_logger) << "flm gui missing - cannot create screenshots for a snapshot";
|
||||
ERROR_LOG() << "flm gui missing - cannot create screenshots for a snapshot";
|
||||
|
||||
m_ui->cbSavePreview->setEnabled(false);
|
||||
m_ui->cbSavePreview->setChecked(true);
|
||||
@@ -127,8 +126,8 @@ void SnapshotCreateDialog::sendSnapshotRequest()
|
||||
req.timeStamp(partitionTime);
|
||||
req.fileContentId(m_fileId);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Edit/Create snapshot id = " << m_editData.id();
|
||||
DEBUG_LOG(m_logger) << "File id = " << m_fileId;
|
||||
DEBUG_LOG() << "Edit/Create snapshot id = " << m_editData.id();
|
||||
DEBUG_LOG() << "File id = " << m_fileId;
|
||||
|
||||
if (m_requestHelper->startSingleRequest([req, this]()
|
||||
{
|
||||
@@ -136,7 +135,7 @@ void SnapshotCreateDialog::sendSnapshotRequest()
|
||||
}))
|
||||
{
|
||||
m_editData.id(m_requestHelper->getRepliedId());
|
||||
DEBUG_LOG(m_logger) << "Saved snapshot with id = " << m_requestHelper->getRepliedId();
|
||||
DEBUG_LOG() << "Saved snapshot with id = " << m_requestHelper->getRepliedId();
|
||||
__unchange__();
|
||||
closeRequest();
|
||||
}
|
||||
@@ -191,12 +190,12 @@ void SnapshotCreateDialog::saveSnapshotPreviewInLibrary()
|
||||
|
||||
const QString title = ( m_ui->leName->text() + QStringLiteral(" (")+ dtg + QStringLiteral(")"));
|
||||
|
||||
DEBUG_LOG(m_logger) << "saveSnapshotPreviewInLibrary: " << title;
|
||||
DEBUG_LOG() << "saveSnapshotPreviewInLibrary: " << title;
|
||||
|
||||
auto spSitMapGuiIfc = m_sitMapGuiIfc.lock();
|
||||
if (!spSitMapGuiIfc->isMapReady())
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " sitMapGuiInterface not ready";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " sitMapGuiInterface not ready";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -224,7 +223,7 @@ void SnapshotCreateDialog::saveSnapshotPreviewInLibrary()
|
||||
initialFolderId = exeFolderId;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Initial folder Id = " << initialFolderId
|
||||
DEBUG_LOG() << "Initial folder Id = " << initialFolderId
|
||||
<< " snapshotFolderId =" << snapshotFolderId;
|
||||
|
||||
const int folderId = snapshotFolderId > 0 ? snapshotFolderId : initialFolderId;
|
||||
@@ -253,13 +252,13 @@ void SnapshotCreateDialog::saveSnapshotPreviewInLibrary()
|
||||
}))
|
||||
{
|
||||
m_fileId = m_requestHelper->getRepliedId();
|
||||
DEBUG_LOG(m_logger) << "Saved file in library with id = " << m_fileId;
|
||||
DEBUG_LOG() << "Saved file in library with id = " << m_fileId;
|
||||
|
||||
sendSnapshotRequest();
|
||||
|
||||
if (m_editData.fileContentId() != m_fileId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "One more request needed!";
|
||||
DEBUG_LOG() << "One more request needed!";
|
||||
m_editData.fileContentId(m_fileId);
|
||||
}
|
||||
}
|
||||
|
||||
-2
@@ -77,7 +77,5 @@ private:
|
||||
MarkerManagement::Snapshot m_editData;
|
||||
int m_fileId;
|
||||
LtsSession::LtsSession *m_session{nullptr};
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+1
-2
@@ -28,7 +28,6 @@ MarkerManagementDialog::MarkerManagementDialog(const QString &menuGroup, LtsSess
|
||||
, m_flmFtc(nullptr)
|
||||
, m_avmInterface(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("MarkerManagementDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -121,7 +120,7 @@ void MarkerManagementDialog::onEditMarker()
|
||||
if (marker.id() <= 0)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "current MarkerId: " << marker.id();
|
||||
DEBUG_LOG() << "current MarkerId: " << marker.id();
|
||||
|
||||
AudioVideoManagement::StreamNameMapping *streamNameMapping = nullptr;
|
||||
if (m_avmInterface)
|
||||
|
||||
-2
@@ -73,7 +73,5 @@ private:
|
||||
std::shared_ptr<AudioVideoManagement::ForeignDataInterface> m_avmInterface;
|
||||
std::shared_ptr<FileManagement::ForeignGuiInterface> m_flmGui;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
-1
@@ -24,7 +24,6 @@ MarkerEditDialog::MarkerEditDialog(int markerId,
|
||||
, m_streamNameMapping(streamNameMapping)
|
||||
, m_ui(new Ui::MarkerEditDialog)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("MarkerEditDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
|
||||
-2
@@ -53,8 +53,6 @@ private:
|
||||
AudioVideoManagement::StreamNameMapping *m_streamNameMapping;
|
||||
Ui::MarkerEditDialog *m_ui;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+40
-40
@@ -55,27 +55,27 @@ bool InterfaceImpl::fetchInterfaces()
|
||||
m_session->getForeignDataInterface_NEW<FileManagement::ForeignGuiInterface>(m_flmGui);
|
||||
|
||||
if (!m_session->getDtc<OperatorManagement::DataInterface>(m_opmDtc))
|
||||
WARNING_LOG(m_logger) << "No Opm Dtc, no Snapshots";
|
||||
WARNING_LOG() << "No Opm Dtc, no Snapshots";
|
||||
|
||||
if (!m_session->getDtc<FileManagement::DataInterface>(m_flmDtc))
|
||||
WARNING_LOG(m_logger) << "No Flm Dtc, no Snapshots";
|
||||
WARNING_LOG() << "No Flm Dtc, no Snapshots";
|
||||
|
||||
if (!m_session->getFtc<FileManagement::DataInterface>(m_flmFtc))
|
||||
WARNING_LOG(m_logger) << "No Flm Ftc, no Snapshots";
|
||||
WARNING_LOG() << "No Flm Ftc, no Snapshots";
|
||||
|
||||
if (!m_session->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(m_sitMapGuiIfc))
|
||||
WARNING_LOG(m_logger) << "No SitMap, no Snapshots";
|
||||
WARNING_LOG() << "No SitMap, no Snapshots";
|
||||
|
||||
if (!m_session->getDtc<SituationReplayManagement::DataInterface>(m_coreDtc))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No ReplayManagement!!";
|
||||
WARNING_LOG() << "No ReplayManagement!!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_session->app() == LtsAppDescriptor::App::Scripts
|
||||
&& !m_session->getForeignGuiInterface<SituationReplay::ForeignGuiInterface>(m_srpIfc))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Scripts: MarkerManagement: no srp, no topic!";
|
||||
WARNING_LOG() << "Scripts: MarkerManagement: no srp, no topic!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -91,43 +91,43 @@ bool InterfaceImpl::fetchInterfacesReplay()
|
||||
|
||||
if (!m_session->getForeignDataInterface<SituationReplayManagement::DataInterface>(m_srmForeign))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No Srm, no Snapshots";
|
||||
WARNING_LOG() << "No Srm, no Snapshots";
|
||||
m_snapshotsAvailable = false;
|
||||
}
|
||||
|
||||
if (!LtsAppManager::LtsAppManager::getInstance()->hasApp(LtsAppDescriptor::App::Snapshot))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "No Snapshot App? no Snapshots!";
|
||||
DEBUG_LOG() << "No Snapshot App? no Snapshots!";
|
||||
m_snapshotsAvailable = false;
|
||||
}
|
||||
|
||||
if (!m_session->getDtc<OperatorManagement::DataInterface>(m_opmDtc))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No Opm, no Snapshots";
|
||||
WARNING_LOG() << "No Opm, no Snapshots";
|
||||
m_snapshotsAvailable = false;
|
||||
}
|
||||
|
||||
if (!m_session->getForeignGuiInterface<FilterManagement::ForeignFltParticipantGuiInterface>(m_fltParticipantIfc))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No Flt/Part, no Snapshots";
|
||||
WARNING_LOG() << "No Flt/Part, no Snapshots";
|
||||
m_snapshotsAvailable = false;
|
||||
}
|
||||
if (!m_session->getForeignGuiInterface<FilterManagement::ForeignAesGuiInterface>(m_fltAesIfc))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No Flt/Aes, no Snapshots";
|
||||
WARNING_LOG() << "No Flt/Aes, no Snapshots";
|
||||
m_snapshotsAvailable = false;
|
||||
}
|
||||
|
||||
if (!m_session->getForeignGuiInterface<FilterManagement::ForeignFltBuildingComponentGuiInterface>(m_fltBuildingComponentIfc))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "No Flt/BuildingComponent";
|
||||
DEBUG_LOG() << "No Flt/BuildingComponent";
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (!m_session->getForeignGuiInterface<FileManagement::ForeignGuiInterface>(m_flmGui))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No Flm, no Snapshots";
|
||||
WARNING_LOG() << "No Flm, no Snapshots";
|
||||
m_snapshotsAvailable = false;
|
||||
}
|
||||
|
||||
@@ -306,30 +306,30 @@ void InterfaceImpl::startSnapshot()
|
||||
|
||||
try
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "replayPartitionCreateRequest ...";
|
||||
DEBUG_LOG() << "replayPartitionCreateRequest ...";
|
||||
m_replayPartitionId = m_srmForeign->replayPartitionCreateRequest(m_session->exerciseId(),
|
||||
LtsSessionData::LtsSessionData::getInstance()->getWorkstationId(),
|
||||
LtsSessionData::LtsSessionData::getInstance()->getOperatorId(),
|
||||
Core::ReplayType_def::SnapshotData);
|
||||
DEBUG_LOG(m_logger) << "replayPartitionCreateRequest ...DONE";
|
||||
DEBUG_LOG() << "replayPartitionCreateRequest ...DONE";
|
||||
}
|
||||
|
||||
catch(const std::runtime_error &rterr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Failed to start replay partition for snapshot. std::runtime_error";
|
||||
ERROR_LOG(m_logger) << "Failed to start replay partition for snapshot. std::runtime_error: " << rterr.what();
|
||||
ERROR_LOG() << "Failed to start replay partition for snapshot. std::runtime_error";
|
||||
ERROR_LOG() << "Failed to start replay partition for snapshot. std::runtime_error: " << rterr.what();
|
||||
new LtsWidgets::LtsMessageDialogNew(m_session->baseLayout(), tr("Failed to start replay partition for snapshot!"));
|
||||
return;
|
||||
}
|
||||
catch(const std::exception &exception)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Failed to start replay partition for snapshot. Exception: " << exception.what();
|
||||
ERROR_LOG() << "Failed to start replay partition for snapshot. Exception: " << exception.what();
|
||||
new LtsWidgets::LtsMessageDialogNew(m_session->baseLayout(), tr("Failed to start replay partition for snapshot!"));
|
||||
return;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Failed to start replay partition for snapshot. Exception: ... ";
|
||||
ERROR_LOG() << "Failed to start replay partition for snapshot. Exception: ... ";
|
||||
new LtsWidgets::LtsMessageDialogNew(m_session->baseLayout(), tr("Failed to start replay partition for snapshot!"));
|
||||
return;
|
||||
}
|
||||
@@ -337,7 +337,7 @@ void InterfaceImpl::startSnapshot()
|
||||
|
||||
if (m_replayPartitionId < 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Failed to start replay partition for snapshot - invalid replay partition id!";
|
||||
ERROR_LOG() << "Failed to start replay partition for snapshot - invalid replay partition id!";
|
||||
new LtsWidgets::LtsMessageDialogNew(m_session->baseLayout(), tr("Failed to start replay partition for snapshot - invalid replay partition id!"));
|
||||
return;
|
||||
}
|
||||
@@ -458,12 +458,12 @@ bool InterfaceImpl::applyFilter(const Snapshot &snapshot, NGL::INGLLogger &logge
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << "Error while applying filters";
|
||||
ERROR_LOG() << Q_FUNC_INFO << "Error while applying filters";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << "No Filter Ifc (Part or Aes) to apply filters";
|
||||
ERROR_LOG() << Q_FUNC_INFO << "No Filter Ifc (Part or Aes) to apply filters";
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -504,7 +504,7 @@ bool InterfaceImpl::snapshotAdjustSitMap(const Snapshot &snapshot, bool bApplyFi
|
||||
if (!planOverlay.isEmpty())
|
||||
{
|
||||
const bool bIsMapReady = sitMapGuiIfc->isMapReady();
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " bIsMapReady = " << bIsMapReady;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " bIsMapReady = " << bIsMapReady;
|
||||
|
||||
if (bIsMapReady)
|
||||
{
|
||||
@@ -540,7 +540,7 @@ bool InterfaceImpl::snapshotAdjustSitMap(const Snapshot &snapshot, bool bApplyFi
|
||||
<< " planOverlay: " << planOverlay;
|
||||
};
|
||||
if (!sitMapGuiIfc->setMapReadyCallback(this, onMapIsReadyFn))
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << ", setMapReadyCallback failed, snapShotOverlayId: " << snapShotOverlayId;
|
||||
ERROR_LOG() << Q_FUNC_INFO << ", setMapReadyCallback failed, snapShotOverlayId: " << snapShotOverlayId;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -595,7 +595,7 @@ void InterfaceImpl::resetReplay()
|
||||
}
|
||||
else
|
||||
{
|
||||
WARNING_LOG(m_logger) << "could not reset sit map original settings - leaving settings as is...";
|
||||
WARNING_LOG() << "could not reset sit map original settings - leaving settings as is...";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -604,7 +604,7 @@ TopicReplay::Interface *InterfaceImpl::createInterface(TopicEditorBase::TopicTyp
|
||||
{
|
||||
std::shared_ptr<MarkerManagement::Interface::Dtc> mrkDtc;
|
||||
if (!m_session->getDtc<MarkerManagement::DataInterface>(mrkDtc))
|
||||
WARNING_LOG(m_logger) << "mrk dtc missing - snapshot topics cannot live fetch data but instead uses data saved inside the topic";
|
||||
WARNING_LOG() << "mrk dtc missing - snapshot topics cannot live fetch data but instead uses data saved inside the topic";
|
||||
|
||||
return new TopicReplayInterface(m_srpIfc, mrkDtc, m_scriptsMrkIfc , m_logger);
|
||||
}
|
||||
@@ -636,7 +636,7 @@ bool TopicReplayInterface::playbackInit(const QJsonObject &attributes)
|
||||
{
|
||||
if (m_srpIfc == nullptr)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "MarkerManagement:TopicReplayInterface::playbackInit: no srp ifc, no playback";
|
||||
WARNING_LOG() << "MarkerManagement:TopicReplayInterface::playbackInit: no srp ifc, no playback";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -648,7 +648,7 @@ bool TopicReplayInterface::playbackInit(const QJsonObject &attributes)
|
||||
|
||||
if (m_snapshot.id() <= 0 || m_snapshot.timeStamp() < 1)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "cannot fetch live snapshot data (maybe snapshot with id '"<<attributes[QStringLiteral("snapshotId")].toInt(0 )<<"' was deleted), using saved data - timestamp: " << m_snapshot.timeStamp();
|
||||
WARNING_LOG() << "cannot fetch live snapshot data (maybe snapshot with id '"<<attributes[QStringLiteral("snapshotId")].toInt(0 )<<"' was deleted), using saved data - timestamp: " << m_snapshot.timeStamp();
|
||||
|
||||
m_snapshot.planOverlay(attributes[QStringLiteral("planOverlay")].toString().toUtf8().data());
|
||||
m_snapshot.filter(attributes[QStringLiteral("snapshotFilter")].toString().toUtf8().data());
|
||||
@@ -658,7 +658,7 @@ bool TopicReplayInterface::playbackInit(const QJsonObject &attributes)
|
||||
|
||||
if (m_snapshot.timeStamp() < 1)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "invalid snapshot timestamp for playback: " << QString::fromUtf8(QJsonDocument(attributes).toJson());
|
||||
WARNING_LOG() << "invalid snapshot timestamp for playback: " << QString::fromUtf8(QJsonDocument(attributes).toJson());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -666,14 +666,14 @@ bool TopicReplayInterface::playbackInit(const QJsonObject &attributes)
|
||||
|
||||
if (scriptsExerciseId == 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "invalid script's exercise id for playback: "
|
||||
WARNING_LOG() << "invalid script's exercise id for playback: "
|
||||
<< attributes[QStringLiteral("scriptsExerciseId")].toVariant().toString();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_parentIfc == nullptr || !m_parentIfc->snapshotAdjustSitMap(m_snapshot, true, m_originalMapSettings, nullptr, m_logger))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Cannot adjust Situation Map Ifc from Snapshot app";
|
||||
WARNING_LOG() << "Cannot adjust Situation Map Ifc from Snapshot app";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -720,15 +720,15 @@ bool InterfaceImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
event->type() == LtsWidgets::AddSnapshotEvent::addSnapshotEventId() ||
|
||||
event->type() == LtsWidgets::SaveSnapshotEvent::saveSnapshotEventId()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Filtering voice commands (add/set marker, add/save snapshot)";
|
||||
ERROR_LOG() << "Filtering voice commands (add/set marker, add/save snapshot)";
|
||||
|
||||
if (event->type() == LtsWidgets::SetMarkerEvent::setMarkerEventId())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Set marker";
|
||||
DEBUG_LOG() << "Set marker";
|
||||
|
||||
auto ev = static_cast<LtsWidgets::SetMarkerEvent*>(event);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Event description = " << ev->getDescription();
|
||||
DEBUG_LOG() << "Event description = " << ev->getDescription();
|
||||
|
||||
MarkerManagement::Marker req;
|
||||
|
||||
@@ -763,13 +763,13 @@ bool InterfaceImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
}))
|
||||
{
|
||||
req.id(m_requestHelper->getRepliedId());
|
||||
DEBUG_LOG(m_logger) << "Saved Marker with id = " << m_requestHelper->getRepliedId();
|
||||
DEBUG_LOG() << "Saved Marker with id = " << m_requestHelper->getRepliedId();
|
||||
}
|
||||
|
||||
}
|
||||
if (event->type() == LtsWidgets::AddMarkerEvent::addMarkerEventId())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "init dialog Add marker";
|
||||
DEBUG_LOG() << "init dialog Add marker";
|
||||
|
||||
LtsWidgets::LtsBaseLayoutWidget *baseLayout = m_session->baseLayout();
|
||||
|
||||
@@ -793,7 +793,7 @@ bool InterfaceImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
}
|
||||
if (event->type() == LtsWidgets::AddSnapshotEvent::addSnapshotEventId() && m_snapshotsAvailable)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "init dialog Add snapshot";
|
||||
DEBUG_LOG() << "init dialog Add snapshot";
|
||||
|
||||
LtsWidgets::LtsBaseLayoutWidget *baseLayout = m_session->baseLayout();
|
||||
|
||||
@@ -818,11 +818,11 @@ bool InterfaceImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
|
||||
if (event->type() == LtsWidgets::SaveSnapshotEvent::saveSnapshotEventId() && m_snapshotsAvailable)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Save snapshot";
|
||||
DEBUG_LOG() << "Save snapshot";
|
||||
|
||||
auto ev = static_cast<LtsWidgets::SaveSnapshotEvent*>(event);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Event description = " << ev->getDescription();
|
||||
DEBUG_LOG() << "Event description = " << ev->getDescription();
|
||||
|
||||
qint64 partitionTime = m_session->partitionTime();
|
||||
|
||||
@@ -854,7 +854,7 @@ bool InterfaceImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
}))
|
||||
{
|
||||
req.id(m_requestHelper->getRepliedId());
|
||||
DEBUG_LOG(m_logger) << "Saved Snapshot with id = " << m_requestHelper->getRepliedId();
|
||||
DEBUG_LOG() << "Saved Snapshot with id = " << m_requestHelper->getRepliedId();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -75,7 +75,6 @@ public:
|
||||
private:
|
||||
std::shared_ptr<SituationReplay::ForeignGuiInterface> m_srpIfc;
|
||||
Snapshot m_snapshot;
|
||||
NGL::INGLLogger &m_logger;
|
||||
QByteArray m_originalMapSettings;
|
||||
MarkerManagement::ForeignGuiInterface *m_parentIfc;
|
||||
std::shared_ptr<MarkerManagement::Interface::Dtc> m_mrkDtc;
|
||||
|
||||
+10
-11
@@ -69,7 +69,6 @@ SetMarkers::SetMarkers(LtsSession::LtsSession *session, QWidget *parent)
|
||||
, m_session(session)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_ui(new Ui::SetMarkers)
|
||||
, m_logger(getLogger("MarkerCreateDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->dteMarkerTime->setRetrieveCurrentTimeCallback([this]() { return m_session->partitionTime(); });
|
||||
@@ -170,7 +169,7 @@ bool SetMarkers::apply()
|
||||
}
|
||||
catch(const std::exception &ex)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "saving marker failed: " << ex.what();
|
||||
ERROR_LOG() << "saving marker failed: " << ex.what();
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Failed to save marker. Please try again later."));
|
||||
return false;
|
||||
}
|
||||
@@ -334,13 +333,13 @@ void SetMarkers::sendMarkerRequest() noexcept(false)
|
||||
req.timeStampOffset(m_ui->cbxOffset->currentText().toInt() * 1000);
|
||||
req.fileContentId(m_fileId);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Start Marker request with file content Id = " << m_fileId;
|
||||
DEBUG_LOG() << "Start Marker request with file content Id = " << m_fileId;
|
||||
|
||||
auto id = m_ftc->markerModifyRequest(req);
|
||||
|
||||
m_editData.id(id);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Saved marker with id = " << m_requestHelper->getRepliedId();
|
||||
DEBUG_LOG() << "Saved marker with id = " << m_requestHelper->getRepliedId();
|
||||
}
|
||||
|
||||
void SetMarkers::saveMarkerInLibrary() noexcept(false)
|
||||
@@ -352,13 +351,13 @@ void SetMarkers::saveMarkerInLibrary() noexcept(false)
|
||||
.arg(LtsSessionData::LtsSessionData::getInstance()->getOperatorId())
|
||||
.arg(m_ui->teNote->toPlainText().left(20));
|
||||
|
||||
DEBUG_LOG(m_logger) << "saveMarkerInLibrary: " << title;
|
||||
DEBUG_LOG() << "saveMarkerInLibrary: " << title;
|
||||
|
||||
auto spSitMapGuiIfc = m_sitMapGuiIfc.lock();
|
||||
if (!spSitMapGuiIfc->isMapReady())
|
||||
{
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Cannot create a marker as the map is not ready yet."));
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " sitMapGuiInterface not ready";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " sitMapGuiInterface not ready";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -370,13 +369,13 @@ void SetMarkers::saveMarkerInLibrary() noexcept(false)
|
||||
auto onImage = [this, &fig, &image](const QImage &_image)
|
||||
{
|
||||
image = _image;
|
||||
DEBUG_LOG(m_logger) << "onImage callback: image size (w, h) = (" << image.width() << ", " << image.height() << ")";
|
||||
DEBUG_LOG() << "onImage callback: image size (w, h) = (" << image.width() << ", " << image.height() << ")";
|
||||
QMetaObject::invokeMethod(fig.get(), &FinishedSignal::finished, Qt::QueuedConnection);
|
||||
};
|
||||
|
||||
if (!spSitMapGuiIfc->toImage(this, onImage))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Failed to save marker image from map";
|
||||
ERROR_LOG() << "Failed to save marker image from map";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -419,17 +418,17 @@ void SetMarkers::saveMarkerInLibrary() noexcept(false)
|
||||
}
|
||||
catch(const std::exception &ex)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "failed to save image for marker: " << ex.what();
|
||||
ERROR_LOG() << "failed to save image for marker: " << ex.what();
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Saved file in library with id = " << m_fileId;
|
||||
DEBUG_LOG() << "Saved file in library with id = " << m_fileId;
|
||||
|
||||
sendMarkerRequest();
|
||||
|
||||
if (m_editData.fileContentId() != m_fileId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "One more request needed!";
|
||||
DEBUG_LOG() << "One more request needed!";
|
||||
m_editData.fileContentId(m_fileId);
|
||||
}
|
||||
}
|
||||
|
||||
+50
-51
@@ -50,9 +50,8 @@ SnapshotDialog::SnapshotDialog(const QString &menuGroup, LtsSession::LtsSession
|
||||
, m_planEditorHasUpdatedThePlan(false)
|
||||
, m_planEditorApp(nullptr)
|
||||
, m_fileId(-1)
|
||||
, m_logger(getLogger("SnapshotDialog"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_ui->setupUi(this);
|
||||
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Show,
|
||||
@@ -83,16 +82,16 @@ SnapshotDialog::SnapshotDialog(const QString &menuGroup, LtsSession::LtsSession
|
||||
setOnlineHelpFilename(QStringLiteral("Situation-Snapshots"));
|
||||
m_ui->widget->setSelectionMode(QAbstractItemView::SelectionMode::ExtendedSelection);
|
||||
session->getForeignGuiInterface<FileManagement::ForeignGuiInterface>(m_flmGui);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
SnapshotDialog::~SnapshotDialog()
|
||||
{
|
||||
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";
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +120,7 @@ void SnapshotDialog::onShow()
|
||||
|
||||
void SnapshotDialog::onRefreshCurrent(const Snapshot &snapshot)
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " current SnapshotId: " << snapshot.id();
|
||||
INFO_LOG() << Q_FUNC_INFO << " current SnapshotId: " << snapshot.id();
|
||||
|
||||
|
||||
if (snapshot.id() != m_currentSnapshot.id())
|
||||
@@ -134,7 +133,7 @@ void SnapshotDialog::onRefreshCurrent(const Snapshot &snapshot)
|
||||
|
||||
void SnapshotDialog::showSnapshot()
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " current SnapshotId: " << m_currentSnapshot.id();
|
||||
INFO_LOG() << Q_FUNC_INFO << " current SnapshotId: " << m_currentSnapshot.id();
|
||||
showSnapshotInternal(m_currentSnapshot, true);
|
||||
|
||||
enaDisa();
|
||||
@@ -147,7 +146,7 @@ bool SnapshotDialog::applyFilter(const Snapshot &snapshot)
|
||||
|
||||
if (filterContent.isEmpty())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "filterContent is empty, snapshot.id()="<< snapshot.id();
|
||||
ERROR_LOG() << "filterContent is empty, snapshot.id()="<< snapshot.id();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -156,7 +155,7 @@ bool SnapshotDialog::applyFilter(const Snapshot &snapshot)
|
||||
|
||||
if (!appFilter.applyFilter(filterContent))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Error while applying filters";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Error while applying filters";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -179,13 +178,13 @@ bool SnapshotDialog::applyFilter(const Snapshot &snapshot)
|
||||
MarkerManagementApplyFilter appFilter2(pe_session, pe_fltParticipantIfc, pe_fltAesIfc, pe_fltBuildingComponentIfc);
|
||||
if (!appFilter2.applyFilter(filterContent))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << "Error while applying filters";
|
||||
ERROR_LOG() << Q_FUNC_INFO << "Error while applying filters";
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << "getForeignGuiInterface failed";
|
||||
ERROR_LOG() << Q_FUNC_INFO << "getForeignGuiInterface failed";
|
||||
} else
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << "Internal error - can not get previously created session!";
|
||||
ERROR_LOG() << Q_FUNC_INFO << "Internal error - can not get previously created session!";
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +204,7 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
|
||||
SituationMap::SitMapUpdatesEnabledHelper sitMapHelper(spSitMapGuiIfc);
|
||||
|
||||
const int partitionId = m_session->partitionId();
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " current Snapshot: " << snapshot
|
||||
INFO_LOG() << Q_FUNC_INFO << " current Snapshot: " << snapshot
|
||||
<< ", replayPartition: " << partitionId
|
||||
<< ", applyFilter=" << bApplyFilter;
|
||||
|
||||
@@ -219,7 +218,7 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
|
||||
|
||||
if (!m_requestHelper->startSingleRequest([req, this]() { return m_srpFtc->changeReplayStateRequest(req, this); }))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Replay could not be started for partition id = " << partitionId;
|
||||
ERROR_LOG() << "Replay could not be started for partition id = " << partitionId;
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Replay could not be started for partition with id %1").arg(partitionId));
|
||||
return false;
|
||||
}
|
||||
@@ -230,7 +229,7 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
|
||||
if (bApplyFilter)
|
||||
if (!applyFilter(snapshot))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "applyFilter failed, partition id = " << partitionId;
|
||||
ERROR_LOG() << "applyFilter failed, partition id = " << partitionId;
|
||||
success = false;
|
||||
}
|
||||
|
||||
@@ -240,7 +239,7 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
|
||||
std::shared_ptr<PlanOverlaysPlugin::ForeignGuiInterface> ovrDtc;
|
||||
if (m_session->getForeignGuiInterface<PlanOverlaysPlugin::ForeignGuiInterface>(ovrDtc))
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " unloadAllPlans via PlanOverlaysPlugin to update dialog";
|
||||
INFO_LOG() << Q_FUNC_INFO << " unloadAllPlans via PlanOverlaysPlugin to update dialog";
|
||||
ovrDtc->unloadAllPlans();
|
||||
}
|
||||
|
||||
@@ -255,13 +254,13 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
|
||||
|
||||
{
|
||||
const bool bIsMapReady = spSitMapGuiIfc->isMapReady();
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " bIsMapReady = " << bIsMapReady;
|
||||
INFO_LOG() << Q_FUNC_INFO << " bIsMapReady = " << bIsMapReady;
|
||||
|
||||
if (bIsMapReady)
|
||||
{
|
||||
if (!spSitMapGuiIfc->planOverlaySetContent(snapShotOverlayId, tr("Snapshot-PlanOverlay"), planOverlay, true))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Error add planOverlay to snapshot, SnapshotId: " << snapshot.id()
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Error add planOverlay to snapshot, SnapshotId: " << snapshot.id()
|
||||
<< " planOverlay.size()=" << planOverlay.size()
|
||||
<< " planOverlay=" << planOverlay;
|
||||
success = false;
|
||||
@@ -299,16 +298,16 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
|
||||
|
||||
const int snapshotId = snapshot.id();
|
||||
auto onMapIsReadyFn = [this, spSitMapGuiIfc, planOverlay, snapshotId]() {
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " try again: do planOverlaySetContent...";
|
||||
INFO_LOG() << Q_FUNC_INFO << " try again: do planOverlaySetContent...";
|
||||
if (!spSitMapGuiIfc->planOverlaySetContent(snapShotOverlayId, tr("Snapshot-PlanOverlay"), planOverlay, true))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Error add planOverlay to snapshot, SnapshotId: " << snapshotId
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Error add planOverlay to snapshot, SnapshotId: " << snapshotId
|
||||
<< " planOverlay.size()=" << planOverlay.size()
|
||||
<< " planOverlay=" << planOverlay;
|
||||
}
|
||||
};
|
||||
if (!spSitMapGuiIfc->setMapReadyCallback(this, onMapIsReadyFn))
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << ", setMapReadyCallback failed, SnapshotId: " << snapshotId;
|
||||
ERROR_LOG() << Q_FUNC_INFO << ", setMapReadyCallback failed, SnapshotId: " << snapshotId;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -321,7 +320,7 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
|
||||
const QByteArray ba(QByteArray::fromRawData(snapshot.movementTracks().c_str(), snapshot.movementTracks().size()));
|
||||
if (!spSitMapGuiIfc->setMovementTrackManagerSettingsJSon(ba))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Error setMovementTrackManagerSettingsJSon, SnapshotId: " << snapshot.id();
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Error setMovementTrackManagerSettingsJSon, SnapshotId: " << snapshot.id();
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
@@ -368,7 +367,7 @@ void SnapshotDialog::onEditPlan()
|
||||
if (!m_planEditorApp)
|
||||
{
|
||||
|
||||
ERROR_LOG(m_logger) << "Creating Plan Editor-Snapshot failed.";
|
||||
ERROR_LOG() << "Creating Plan Editor-Snapshot failed.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -392,7 +391,7 @@ void SnapshotDialog::onEditPlan()
|
||||
|
||||
void SnapshotDialog::onPlaneditorFinished()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " onPlaneditorFinished"
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " onPlaneditorFinished"
|
||||
<< " m_planEditorHasUpdatedThePlan=" << m_planEditorHasUpdatedThePlan;
|
||||
|
||||
|
||||
@@ -418,7 +417,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
|
||||
auto session = m_planEditorApp->getSession(IDL::PartitionType::Replay, partitionId);
|
||||
if (!session)
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Internal error - can not get previously created session!";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Internal error - can not get previously created session!";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -437,7 +436,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
|
||||
session->getForeignGuiInterface<PlanEditorPlugin::ForeignGuiInterface>(planEditorIfc);
|
||||
if (!sitMapGuiIfc || !planEditorIfc)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Can not create plan editor app - found not all required interfaces";
|
||||
WARNING_LOG() << "Can not create plan editor app - found not all required interfaces";
|
||||
m_planEditorApp->deleteLater();
|
||||
m_planEditorApp = nullptr;
|
||||
return;
|
||||
@@ -447,7 +446,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " current SnapshotId: " << m_currentSnapshot.id()
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " current SnapshotId: " << m_currentSnapshot.id()
|
||||
<< ", PlanEditor - partitionId = " << partitionId;
|
||||
|
||||
SituationReplay::ChangeReplayStateRequest req;
|
||||
@@ -460,7 +459,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
|
||||
|
||||
if (!m_requestHelper->startSingleRequest([req, this]() { return m_srpFtc->changeReplayStateRequest(req, this); }))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Replay could not be started for partition id = " << partitionId;
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Replay could not be started for partition id = " << partitionId;
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Replay could not be started for partition with id %1").arg(partitionId));
|
||||
m_planEditorApp->deleteLater();
|
||||
return;
|
||||
@@ -475,7 +474,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
|
||||
const QJsonDocument jDoc(QJsonDocument::fromJson(ba, &parserError));
|
||||
if (parserError.error != QJsonParseError::NoError)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error parsing json document: " << parserError.errorString();
|
||||
ERROR_LOG() << "Error parsing json document: " << parserError.errorString();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -484,7 +483,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
|
||||
|
||||
if (oms.mode == SituationMap::Mode::Mode_3D)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " PlanEditor in 3D not supported yet, use 2D";
|
||||
DEBUG_LOG() << " PlanEditor in 3D not supported yet, use 2D";
|
||||
oms.mode = SituationMap::Mode::Mode_2D;
|
||||
sitMapGuiIfc->setOperatorMapSettingsJson(oms.toJson());
|
||||
} else {
|
||||
@@ -535,12 +534,12 @@ void SnapshotDialog::prepareIndex(const QModelIndex &idx)
|
||||
{
|
||||
const MarkerManagement::Snapshot &snapshot = m_model->getRowData(idx.row());
|
||||
|
||||
DEBUG_LOG(m_logger) << "Prepare index for snapshot with id = " << snapshot.id();
|
||||
DEBUG_LOG() << "Prepare index for snapshot with id = " << snapshot.id();
|
||||
|
||||
const int fileId = snapshot.fileContentId();
|
||||
if (fileId > 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Loading file content with id = " << fileId;
|
||||
DEBUG_LOG() << "Loading file content with id = " << fileId;
|
||||
|
||||
QByteArray content;
|
||||
if (m_flmGui->loadContent(fileId, content) && content.size() > 0)
|
||||
@@ -552,17 +551,17 @@ void SnapshotDialog::prepareIndex(const QModelIndex &idx)
|
||||
m_imageTitles.append( name + QStringLiteral(" (")+ timeStr + QStringLiteral(")"));
|
||||
m_images.append(QImage::fromData(content));
|
||||
|
||||
DEBUG_LOG(m_logger) << " title=" << m_imageTitles.last()
|
||||
DEBUG_LOG() << " title=" << m_imageTitles.last()
|
||||
<< " description=" << m_descriptions.last()
|
||||
<< " content.size=" << content.size();
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Cannot retrieve file content for fileId = " << fileId;
|
||||
ERROR_LOG() << "Cannot retrieve file content for fileId = " << fileId;
|
||||
}
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "Not found: file id = 0 for snapshot id = " << snapshot.id();
|
||||
WARNING_LOG() << "Not found: file id = 0 for snapshot id = " << snapshot.id();
|
||||
}
|
||||
|
||||
|
||||
@@ -573,20 +572,20 @@ void SnapshotDialog::onPrint()
|
||||
m_imageTitles.clear();
|
||||
m_images.clear();
|
||||
|
||||
DEBUG_LOG(m_logger) << "selectedRows.size()=" << selectedRows.size();
|
||||
DEBUG_LOG() << "selectedRows.size()=" << selectedRows.size();
|
||||
for (const QModelIndex &idx : selectedRows)
|
||||
prepareIndex(idx);
|
||||
|
||||
if (m_images.size() > 0)
|
||||
LtsPrinting::printImages(m_session, this, tr("Snapshots"), m_images, m_imageTitles, m_descriptions);
|
||||
else
|
||||
ERROR_LOG(m_logger) << "No snapshots selected or no valid images to print";
|
||||
ERROR_LOG() << "No snapshots selected or no valid images to print";
|
||||
}
|
||||
|
||||
|
||||
bool SnapshotDialog::saveSnapshotPlan(const QByteArray &planXMLContent)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " save snapshot";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " save snapshot";
|
||||
|
||||
|
||||
m_currentSnapshot.planOverlay(planXMLContent.constData());
|
||||
@@ -598,7 +597,7 @@ bool SnapshotDialog::saveSnapshotPlan(const QByteArray &planXMLContent)
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while updating snapshot plan overlay";
|
||||
ERROR_LOG() << "Error while updating snapshot plan overlay";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Error while updating snapshot plan overlay"), tr("Saving Plan to Snapshot") );
|
||||
}
|
||||
else
|
||||
@@ -657,7 +656,7 @@ bool SnapshotDialog::init(const std::shared_ptr<MarkerManagement::Interface::Dtc
|
||||
|
||||
QTimer::singleShot(1000, this, [this, spSitMapGuiIfc]() {
|
||||
if (!spSitMapGuiIfc->setMapReadyCallback(this, [this]() { enaDisa(); }))
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " setMapReadyCallback failed"
|
||||
ERROR_LOG() << Q_FUNC_INFO << " setMapReadyCallback failed"
|
||||
<< ", m_session->toString " << m_session->toString()
|
||||
<< ", this=" << this;
|
||||
});
|
||||
@@ -670,7 +669,7 @@ bool SnapshotDialog::init(const std::shared_ptr<MarkerManagement::Interface::Dtc
|
||||
|
||||
void SnapshotDialog::aboutToClose()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "aboutToClose - start";
|
||||
DEBUG_LOG() << "aboutToClose - start";
|
||||
if (m_planEditorApp)
|
||||
{
|
||||
m_planEditorApp->disconnect(this);
|
||||
@@ -779,7 +778,7 @@ void SnapshotDialog::onEditMetaData()
|
||||
if (snapshot.id() <= 0)
|
||||
return;
|
||||
|
||||
INFO_LOG(m_logger) << "current SnapshotId: " << snapshot.id();
|
||||
INFO_LOG() << "current SnapshotId: " << snapshot.id();
|
||||
|
||||
if (snapshot.operatorId() == LtsSessionData::LtsSessionData::getInstance()->getOperatorId())
|
||||
{
|
||||
@@ -875,7 +874,7 @@ void SnapshotDialog::saveSnapshotFilter()
|
||||
auto spSitMapGuiIfc = m_sitMapGuiIfc.lock();
|
||||
if (!spSitMapGuiIfc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << ", no m_sitMapGuiIfc, return";
|
||||
ERROR_LOG() << Q_FUNC_INFO << ", no m_sitMapGuiIfc, return";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -887,7 +886,7 @@ void SnapshotDialog::saveSnapshotFilter()
|
||||
req.mapSettings(mapSettings.data());
|
||||
req.operatorId(LtsSessionData::LtsSessionData::getInstance()->getOperatorId());
|
||||
|
||||
DEBUG_LOG(m_logger) << "File content id (of preview image) = " << m_currentSnapshot.fileContentId();
|
||||
DEBUG_LOG() << "File content id (of preview image) = " << m_currentSnapshot.fileContentId();
|
||||
req.fileContentId(m_fileId);
|
||||
|
||||
|
||||
@@ -903,7 +902,7 @@ void SnapshotDialog::saveSnapshotFilter()
|
||||
|
||||
|
||||
if (!m_requestHelper->startSingleRequest([req, this]() { return m_mrkFtc->snapshotModifyRequest(req, this);}))
|
||||
ERROR_LOG(m_logger) << "Saving snapshot filter failed";
|
||||
ERROR_LOG() << "Saving snapshot filter failed";
|
||||
else
|
||||
{
|
||||
__unchange__();
|
||||
@@ -936,12 +935,12 @@ void SnapshotDialog::saveSnapshotPreviewInLibrary(const QString &snapshotTitle)
|
||||
.arg(LtsSessionData::LtsSessionData::getInstance()->getOperatorId())
|
||||
.arg(snapshotTitle.left(20));
|
||||
|
||||
DEBUG_LOG(m_logger) << "saveSnapshotPreviewInLibrary: " << title;
|
||||
DEBUG_LOG() << "saveSnapshotPreviewInLibrary: " << title;
|
||||
|
||||
auto spSitMapGuiIfc = m_sitMapGuiIfc.lock();
|
||||
if (!spSitMapGuiIfc->isMapReady())
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " sitMapGuiInterface not ready";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " sitMapGuiInterface not ready";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -967,7 +966,7 @@ void SnapshotDialog::saveSnapshotPreviewInLibrary(const QString &snapshotTitle)
|
||||
snapshotFolderId = m_flmDtc->findFolder(initialFolderId, QStringLiteral("Snapshots"));
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Initial folder Id = " << initialFolderId
|
||||
DEBUG_LOG() << "Initial folder Id = " << initialFolderId
|
||||
<< " snapshotFolderId =" << snapshotFolderId;
|
||||
|
||||
const int folderId = snapshotFolderId > 0 ? snapshotFolderId : initialFolderId;
|
||||
@@ -996,17 +995,17 @@ void SnapshotDialog::saveSnapshotPreviewInLibrary(const QString &snapshotTitle)
|
||||
}))
|
||||
{
|
||||
m_fileId = m_requestHelper->getRepliedId();
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " Saved file in library with id = " << m_fileId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " Saved file in library with id = " << m_fileId;
|
||||
|
||||
saveSnapshotFilter();
|
||||
|
||||
if (m_currentSnapshot.fileContentId() != m_fileId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " One more request needed!";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " One more request needed!";
|
||||
m_currentSnapshot.fileContentId(m_fileId);
|
||||
}
|
||||
} else {
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Saved file in library with id = " << m_fileId << " failed";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Saved file in library with id = " << m_fileId << " failed";
|
||||
}
|
||||
|
||||
|
||||
|
||||
-2
@@ -130,7 +130,5 @@ private:
|
||||
QVector <QImage> m_images;
|
||||
QVector <QString> m_imageTitles;
|
||||
QVector <QString> m_descriptions;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
+1
-2
@@ -28,7 +28,6 @@ SnapshotDialogModel::SnapshotDialogModel(QObject *parent)
|
||||
tr("File Id"),
|
||||
tr("Image")},
|
||||
parent)
|
||||
, m_logger(getLogger("SnapshotDialogModel"))
|
||||
{}
|
||||
|
||||
bool SnapshotDialogModel::initModel(const std::shared_ptr<MarkerManagement::Interface::Dtc> &dtc,
|
||||
@@ -183,7 +182,7 @@ void SnapshotDialogModel::loadPreview(int fileContentId, int rowId)
|
||||
QByteArray byteArray;
|
||||
if (m_flmGui->loadContent(fileContentId, byteArray, true) && byteArray.size() > 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_previews.insert fileContentId=" << fileContentId
|
||||
DEBUG_LOG() << "m_previews.insert fileContentId=" << fileContentId
|
||||
<< " size Preview=" << byteArray.size();
|
||||
|
||||
QImage img = LtsUtils::getImage(byteArray);
|
||||
|
||||
Reference in new issue
Block a user