Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -59,7 +59,7 @@ AbstractAttributeWidget *EditingModeUI::createAttributeUIWidget(DetailData *deta
if (!minb || !maxb)
{
WARNING_LOG() << "createAttributeUIWidget: !minb (" << minb << ") || !maxb (" << maxb << ")";
WARNING_LOG(m_logger) << "createAttributeUIWidget: !minb (" << minb << ") || !maxb (" << maxb << ")";
break;
}
@@ -90,7 +90,7 @@ AbstractAttributeWidget *EditingModeUI::createAttributeUIWidget(DetailData *deta
break;
}
WARNING_LOG() << "DetailData::ATTRIBUTE_UI_TYPE_RAD_RANGE_WIDGET: errorious values!";
WARNING_LOG(m_logger) << "DetailData::ATTRIBUTE_UI_TYPE_RAD_RANGE_WIDGET: errorious values!";
break;
}
@@ -115,7 +115,7 @@ AbstractAttributeWidget *EditingModeUI::createAttributeUIWidget(DetailData *deta
break;
}
WARNING_LOG() << "DetailData::ATTRIBUTE_UI_TYPE_AREA_RANGE_WIDGET: errorious values!";
WARNING_LOG(m_logger) << "DetailData::ATTRIBUTE_UI_TYPE_AREA_RANGE_WIDGET: errorious values!";
break;
}
@@ -137,7 +137,7 @@ AbstractAttributeWidget *EditingModeUI::createAttributeUIWidget(DetailData *deta
default:
{
WARNING_LOG() << "createAttributeUIWidget: invalid attribute type #" << attributeUIType << "!";
WARNING_LOG(m_logger) << "createAttributeUIWidget: invalid attribute type #" << attributeUIType << "!";
break;
}
@@ -155,7 +155,7 @@ void EditingModeUI::addAttributeContainer(int eventType, const QString &initialV
if (attributeUIWidget == nullptr)
{
DEBUG_LOG() << "addAttributeContainer: !attributeUIWidget";
DEBUG_LOG(m_logger) << "addAttributeContainer: !attributeUIWidget";
return;
}
@@ -166,11 +166,10 @@ void EditingModeUI::addAttributeContainer(int eventType, const QString &initialV
attributeUIWidget->setFocus();
}
EditingModeUI::EditingModeUI(DetailData *detailData, const QString &attributeType, QWidget *parent)
: QWidget(parent)
EditingModeUI::EditingModeUI(DetailData *detailData, const QString &attributeType, QWidget *parent) : QWidget(parent)
, attributeType(attributeType)
, m_detailData(detailData)
{
, m_detailData(detailData),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
QVBoxLayout *editingModeLayout = new QVBoxLayout;
QWidget *filterTextWidget = new QWidget;
@@ -30,6 +30,8 @@ public:
QPushButton *pbAddAttributeContainer;
private:
NGL::INGLLogger &m_logger;
Timeline::AbstractAttributeWidget *createAttributeUIWidget(DetailData *detailData, const QString &attributeType,
int eventType, const QString &initialValue);
@@ -30,7 +30,7 @@ QComboBox *SelectionModeUI::createAttributesComboBox(int eventType)
if (cbAttribute.isEmpty())
{
WARNING_LOG() << "SelectionModeUI::createAttributesComboBox: event type " << eventType << " has no attribute text for attribute " << attributeKey << " for attribute event lookup - not added";
WARNING_LOG(m_logger) << "SelectionModeUI::createAttributesComboBox: event type " << eventType << " has no attribute text for attribute " << attributeKey << " for attribute event lookup - not added";
}
else
{
@@ -42,10 +42,9 @@ QComboBox *SelectionModeUI::createAttributesComboBox(int eventType)
}
SelectionModeUI::SelectionModeUI(DetailData *detailData, const int eventType)
: eventType(eventType)
, m_detailData(detailData)
{
SelectionModeUI::SelectionModeUI(DetailData *detailData, const int eventType) : eventType(eventType)
, m_detailData(detailData),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
selectionModeWidget = new QWidget();
selectionModeLayout = new QHBoxLayout();
@@ -21,6 +21,7 @@ class SelectionModeUI : public QObject
{
Q_OBJECT
private:
NGL::INGLLogger &m_logger;
SelectionModeUI &operator=(const SelectionModeUI &);
public:
@@ -18,8 +18,7 @@
namespace Timeline
{
FilterTableEntry::FilterTableEntry(DetailData *detailData, const int &eventType, const bool &active, QWidget *parent)
: QGroupBox(parent)
FilterTableEntry::FilterTableEntry(DetailData *detailData, const int &eventType, const bool &active, QWidget *parent) : QGroupBox(parent)
, m_eventType(eventType)
@@ -32,8 +31,8 @@ FilterTableEntry::FilterTableEntry(DetailData *detailData, const int &eventType,
, m_pbFilterActive(new QPushButton(tr("Active")))
, m_pbOK(new QPushButton(tr("OK")))
, m_lbSelectText(new QLabel(tr("Select event type to filter:")))
, m_detailData(detailData)
{
, m_detailData(detailData),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
m_cbEventSelector = getEventTypesComboBox();
m_pbDelete->setPalette(QPalette(QColor("red")));
@@ -104,7 +103,7 @@ void FilterTableEntry::updateData()
if (!ftec)
{
WARNING_LOG() << "FilterTableEntry::filterText(): !ftec";
WARNING_LOG(m_logger) << "FilterTableEntry::filterText(): !ftec";
continue;
}
@@ -130,7 +129,7 @@ const QJsonObject FilterTableEntry::filter(bool typeSafe) const
if (m_eventType == -1)
{
WARNING_LOG() << "FilterTableEntry has no event type.";
WARNING_LOG(m_logger) << "FilterTableEntry has no event type.";
return {};
}
@@ -165,7 +164,7 @@ const QJsonObject FilterTableEntry::filter(bool typeSafe) const
if (!ftec)
{
WARNING_LOG() << "FilterTableEntry::filterText(): !ftec";
WARNING_LOG(m_logger) << "FilterTableEntry::filterText(): !ftec";
continue;
}
@@ -209,7 +208,7 @@ void FilterTableEntry::slotSelectEventType()
if (m_eventType == -1)
{
WARNING_LOG() << "slotSelectEventType: m_eventType == -1";
WARNING_LOG(m_logger) << "slotSelectEventType: m_eventType == -1";
return;
}
@@ -36,6 +36,7 @@ public:
private:
NGL::INGLLogger &m_logger;
QComboBox *getEventTypesComboBox();
int m_eventType;
@@ -16,15 +16,14 @@
namespace Timeline
{
FilterTableEntryAttribute::FilterTableEntryAttribute(DetailData *detailData, int eventType, const QString &attributeType, QWidget *parent)
: QGroupBox(parent)
FilterTableEntryAttribute::FilterTableEntryAttribute(DetailData *detailData, int eventType, const QString &attributeType, QWidget *parent) : QGroupBox(parent)
, m_eventType(eventType)
, m_attributeType(attributeType)
, m_selectionModeUI(nullptr)
, m_editionModeUI(nullptr)
, m_attributesLayout(new QVBoxLayout())
, m_detailData(detailData)
{
, m_detailData(detailData),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
this->setTitle(QString());
@@ -76,7 +75,7 @@ const QJsonObject FilterTableEntryAttribute::filter(bool typeSafe) const
{
if (m_attributeType.isEmpty())
{
WARNING_LOG() << "filterText: m_attributeType == -1";
WARNING_LOG(m_logger) << "filterText: m_attributeType == -1";
return QJsonObject();
}
@@ -93,7 +92,7 @@ const QJsonObject FilterTableEntryAttribute::filter(bool typeSafe) const
if (attributeTypeName.isEmpty())
{
WARNING_LOG() << "filterText: !attributeTypeName.length()";
WARNING_LOG(m_logger) << "filterText: !attributeTypeName.length()";
return QJsonObject();
}
@@ -174,7 +173,7 @@ void FilterTableEntryAttribute::slotAddEditingMode(bool createBlankContainer)
if (m_attributeType.isEmpty())
{
WARNING_LOG() << "slotAddEditingMode: invalid attribute type string!";
WARNING_LOG(m_logger) << "slotAddEditingMode: invalid attribute type string!";
return;
}
@@ -41,6 +41,7 @@ signals:
void attributeChanged(const bool &hasAttribute);
private:
NGL::INGLLogger &m_logger;
private slots:
void slotAddAttributeContainer();
void slotDeleteAttributeContainer();
@@ -30,14 +30,13 @@ namespace Timeline
FilterWindow::FilterWindow(DetailData *detailData,
const std::shared_ptr<FileManagement::ForeignGuiInterface> &flmIfc,
LtsSession::LtsSession *session,
QWidget *parent)
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
QWidget *parent) : LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
, m_flmIfc(flmIfc)
, m_ui(new Ui::FilterWindow)
, updateTimer(new QTimer(this))
, m_detailData(detailData)
, m_session(session)
{
, m_session(session),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
m_ui->setupUi(this);
setMinimumSize(1500, 800);
@@ -100,11 +99,11 @@ void FilterWindow::slotSave()
filterToDoc(exportFilter()));
if (fileId > 0)
{
DEBUG_LOG() << "Saved file with id = " << fileId;
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
__unchange__();
}
else
ERROR_LOG() << "Could not save file in library ";
ERROR_LOG(m_logger) << "Could not save file in library ";
}
@@ -44,6 +44,7 @@ public:
bool loadFilters(const QJsonArray &filter);
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
bool apply() override;
void aboutToClose() override;
@@ -11,11 +11,10 @@ namespace Timeline
{
ComboBox::ComboBox(DetailData *detailData, const QString &attributeType, int eventType, const QString &initialValue, QWidget* parent)
: AbstractAttributeWidget(parent)
ComboBox::ComboBox(DetailData *detailData, const QString &attributeType, int eventType, const QString &initialValue, QWidget* parent) : AbstractAttributeWidget(parent)
, m_cbValues(new QComboBox())
, m_eventType(eventType)
{
, m_eventType(eventType),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
connect(m_cbValues, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ComboBox::signalChanges);
addCustomWidget(m_cbValues);
@@ -32,7 +31,7 @@ ComboBox::ComboBox(DetailData *detailData, const QString &attributeType, int eve
if (initialValueKey < 0 || !k)
{
WARNING_LOG() << "ComboBox::c_tor: initialValueKey < 0 (" << initialValueKey << ")" << "initialValue: " << initialValue;
WARNING_LOG(m_logger) << "ComboBox::c_tor: initialValueKey < 0 (" << initialValueKey << ")" << "initialValue: " << initialValue;
return;
}
@@ -73,7 +72,7 @@ void ComboBox::updateData(DetailData *detailData)
m_cbValues->setCurrentIndex(m_cbValues->findData(lastSelectedKey, Qt::UserRole));
DEBUG_LOG() << "ComboBox: no initial item index found for value id" << lastSelectedKey;
DEBUG_LOG(m_logger) << "ComboBox: no initial item index found for value id" << lastSelectedKey;
}
@@ -25,6 +25,7 @@ public:
void updateData(DetailData *detailData) override;
private:
NGL::INGLLogger &m_logger;
QComboBox *m_cbValues;
int m_eventType;
QString m_concreteAttributeType;
@@ -13,11 +13,10 @@
namespace Timeline
{
DefaultRangeWidget::DefaultRangeWidget(unsigned int min, unsigned int max, const QString &prefix, const QString &suffix, const QString &initialValue, QWidget *parent)
: AbstractAttributeWidget(parent)
DefaultRangeWidget::DefaultRangeWidget(unsigned int min, unsigned int max, const QString &prefix, const QString &suffix, const QString &initialValue, QWidget *parent) : AbstractAttributeWidget(parent)
, box1(new QSpinBox())
, box2(new QSpinBox())
{
, box2(new QSpinBox()),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
connect(box1, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &DefaultRangeWidget::signalChanges);
connect(box2, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &DefaultRangeWidget::signalChanges);
@@ -56,7 +55,7 @@ DefaultRangeWidget::DefaultRangeWidget(unsigned int min, unsigned int max, const
if (valueList.count() != 2)
{
WARNING_LOG() << "DefaultRangeWidget: invalid initial value '" << initialValue << "'";
WARNING_LOG(m_logger) << "DefaultRangeWidget: invalid initial value '" << initialValue << "'";
return;
}
@@ -68,7 +67,7 @@ DefaultRangeWidget::DefaultRangeWidget(unsigned int min, unsigned int max, const
if (!k1 || !k2)
{
WARNING_LOG() << "DefaultRangeWidget: initial value is not numeric '" << initialValue << "'";
WARNING_LOG(m_logger) << "DefaultRangeWidget: initial value is not numeric '" << initialValue << "'";
return;
}
@@ -30,6 +30,7 @@ public:
void updateData(DetailData *detailData) override;
private:
NGL::INGLLogger &m_logger;
QSpinBox* box1;
QSpinBox* box2;
};
@@ -16,11 +16,10 @@
namespace Timeline
{
TimeRangeWidget::TimeRangeWidget(DetailData *detailData, const QString &initialValue, QWidget *parent)
: AbstractAttributeWidget(parent)
TimeRangeWidget::TimeRangeWidget(DetailData *detailData, const QString &initialValue, QWidget *parent) : AbstractAttributeWidget(parent)
, m_edit1(new LtsWidgets::LtsDateTimeEdit(this))
, m_edit2(new LtsWidgets::LtsDateTimeEdit(this))
{
, m_edit2(new LtsWidgets::LtsDateTimeEdit(this)),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
connect(m_edit1, &LtsWidgets::LtsDateTimeEdit::dateTimeChanged, this, &TimeRangeWidget::signalChanges);
connect(m_edit2, &LtsWidgets::LtsDateTimeEdit::dateTimeChanged, this, &TimeRangeWidget::signalChanges);
@@ -55,7 +54,7 @@ TimeRangeWidget::TimeRangeWidget(DetailData *detailData, const QString &initialV
if (initialTimeRange.count() != 2)
{
WARNING_LOG() << "invalid initial time range value: " << initialValue;
WARNING_LOG(m_logger) << "invalid initial time range value: " << initialValue;
return;
}
@@ -64,7 +63,7 @@ TimeRangeWidget::TimeRangeWidget(DetailData *detailData, const QString &initialV
time *= 1000;
if (!k)
WARNING_LOG() << "invalid initial time range start value: " << initialTimeRange.at(0).toString();
WARNING_LOG(m_logger) << "invalid initial time range start value: " << initialTimeRange.at(0).toString();
else
m_edit1->setMsecsSinceEpoch(time);
@@ -73,7 +72,7 @@ TimeRangeWidget::TimeRangeWidget(DetailData *detailData, const QString &initialV
time *= 1000;
if (!k)
WARNING_LOG() << "invalid initial time range start value: " << initialTimeRange.at(1).toString();
WARNING_LOG(m_logger) << "invalid initial time range start value: " << initialTimeRange.at(1).toString();
else
m_edit2->setMsecsSinceEpoch(time);
}
@@ -26,6 +26,7 @@ public:
void updateData(DetailData *detailData) override;
private:
NGL::INGLLogger &m_logger;
public:
LtsWidgets::LtsDateTimeEdit *m_edit1;
LtsWidgets::LtsDateTimeEdit *m_edit2;
@@ -63,6 +63,7 @@ public:
AttributeValueMap getAttributeValueMap(int eventType) const override;
QString getValueStringFromValueId(int attributeValueId) const override;
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_dtc;
};
@@ -396,7 +396,7 @@ DetailData::GetDetailDataResultList DetailData::getDetailData(const LtsTimelineC
const QJsonObject &root = event->detailData();
for (auto i = root.constBegin(); i != root.constEnd(); ++i)
{
DEBUG_LOG() << "Adding Detail Data for: " << i.key();
DEBUG_LOG(m_logger) << "Adding Detail Data for: " << i.key();
result.append(getDetailDataForAttribute(i.key(), *i));
}
@@ -416,7 +416,7 @@ DetailData::GetDetailDataForAttributeResult DetailData::getDetailDataForAttribut
if (attribute.isNull() || attribute.isUndefined())
{
WARNING_LOG() << "DetailData::getDetailDataForAttribute: no attribute type " << attributeType
WARNING_LOG(m_logger) << "DetailData::getDetailDataForAttribute: no attribute type " << attributeType
<< " in " << QJsonDocument(root).toJson();
result.requestResult = DetailData::RequestResult::InvalidAttributeType;
@@ -461,7 +461,7 @@ DetailData::GetDetailDataForAttributeResult DetailData::getDetailDataForAttribut
case QJsonValue::Null:
case QJsonValue::Undefined:
{
WARNING_LOG() << "Timeline: DetailData::getDetailDataForAttribute: attribute value is null or undefined! " << attributeValueJson.toString();
WARNING_LOG(m_logger) << "Timeline: DetailData::getDetailDataForAttribute: attribute value is null or undefined! " << attributeValueJson.toString();
result.requestResult = DetailData::RequestResult::InvalidAttributeTypeJson;
return result;
}
@@ -497,7 +497,7 @@ DetailData::GetDetailDataForAttributeResult DetailData::getDetailDataForAttribut
default:
{
WARNING_LOG() << "Timeline: DetailData::getDetailDataForAttribute: attribute value cannot be handled. Type " << attributeValueJson.type() << attributeValueJson.toString();
WARNING_LOG(m_logger) << "Timeline: DetailData::getDetailDataForAttribute: attribute value cannot be handled. Type " << attributeValueJson.type() << attributeValueJson.toString();
result.requestResult = DetailData::RequestResult::InvalidAttributeType;
return result;
}
@@ -547,7 +547,7 @@ DetailData::GetDetailDataForAttributeResult DetailData::getDetailDataForAttribut
if (concreteAttributeType == attributeType)
{
ERROR_LOG() << "getDetailDataForAttribute: attribute type " << attributeType << " does not have an UiType !!!";
ERROR_LOG(m_logger) << "getDetailDataForAttribute: attribute type " << attributeType << " does not have an UiType !!!";
result.requestResult = DetailData::RequestResult::NoUiTypeForAttribute;
}
else
@@ -691,7 +691,7 @@ QString DetailData::AttributeTypeLookup::getAttributeType(const QString &attribu
return i.key();
}
WARNING_LOG() << "getAttributeType: attribute type not found by text '" << attributeText << "'";
WARNING_LOG(m_logger) << "getAttributeType: attribute type not found by text '" << attributeText << "'";
return QString();
}
@@ -721,7 +721,7 @@ void DetailData::AttributeParameterLookup::addParameter(const QString &attribute
{
if (!parameterMap.count())
{
WARNING_LOG() << "addParameter: parameter map is empty!";
WARNING_LOG(m_logger) << "addParameter: parameter map is empty!";
return;
}
@@ -144,6 +144,7 @@ public:
explicit LookupBase(const QString &lookupClassName);
protected:
NGL::INGLLogger &m_logger;
QString m_lookupClassName;
};
@@ -273,7 +273,7 @@ bool TimelineViewDialog::init(const std::shared_ptr<TimeLineManagement::ForeignD
if (!m_model->init(eemForeign, mrkDtc, exmDtc, ppmDtc, pdmDtc, ismDtc, session, m_detailData, m_streamNameMapping))
{
ERROR_LOG() << "model init failed";
ERROR_LOG(m_logger) << "model init failed";
return false;
}
@@ -402,7 +402,7 @@ bool TimelineViewDialog::init(const std::shared_ptr<TimeLineManagement::ForeignD
{
WARNING_LOG() << "reimpl me!!";
WARNING_LOG(m_logger) << "reimpl me!!";
});
cacheDialog->setAttribute(Qt::WA_DeleteOnClose, true);
@@ -429,7 +429,7 @@ bool TimelineViewDialog::init(const std::shared_ptr<TimeLineManagement::ForeignD
if (!m_model->hasActiveEventTypes())
{
DEBUG_LOG() << "range changed, but no active event types! not arming timer..";
DEBUG_LOG(m_logger) << "range changed, but no active event types! not arming timer..";
return;
}
@@ -469,7 +469,7 @@ bool TimelineViewDialog::init(const std::shared_ptr<TimeLineManagement::ForeignD
if (m_exerciseStart < 1)
{
LtsWidgets::LtsMessageDialog::showMessage(m_session->baseLayout(), tr("Exercise data not available or exercise not started yet."), tr("Cannot open timeline"));
ERROR_LOG() << "exercise data not available - exercise start: " << m_exerciseStart;
ERROR_LOG(m_logger) << "exercise data not available - exercise start: " << m_exerciseStart;
return false;
}
@@ -623,7 +623,7 @@ void TimelineViewDialog::slotStartReplaySituation()
if (rp.id() == 0)
{
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Error trying to create a replay session in stage 1."));
WARNING_LOG() << "[timeout] Error while trying to create a replay session: domainId: " << m_session->domainId() <<
WARNING_LOG(m_logger) << "[timeout] Error while trying to create a replay session: domainId: " << m_session->domainId() <<
" - replay partition does not exist - replay id: " << m_requestHelper->getRepliedId() <<
" - url " << m_session->tcpConnectionUrl().toString();
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Import, true);
@@ -637,7 +637,7 @@ void TimelineViewDialog::slotStartReplaySituation()
if (m_replayApp == nullptr)
{
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Error trying to create a replay session in stage 2."));
WARNING_LOG() << "Error while trying to create a replay session: domainId: " << m_session->domainId() <<
WARNING_LOG(m_logger) << "Error while trying to create a replay session: domainId: " << m_session->domainId() <<
" - partition create reply (failed) - replay id: " << m_requestHelper->getRepliedId() <<
" - url: " << m_session->tcpConnectionUrl().toString();
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Import, true);
@@ -989,12 +989,12 @@ void TimelineViewDialog::slotWaitForReady()
if (partitionTime < ex.beginTime())
{
LtsWidgets::LtsMessageDialog::showMessage(this, tr("The current time is outside of the Exercise's period.<br>Events are only recorded in Exercise period boundaries."), tr("No Events available"));
WARNING_LOG() << "Partition time was " << partitionTime << ", exercise begin time: " << ex.beginTime();
WARNING_LOG(m_logger) << "Partition time was " << partitionTime << ", exercise begin time: " << ex.beginTime();
}
}
else
{
WARNING_LOG() << "TimelineViewDialog::init: could not check exercise's boundaries!";
WARNING_LOG(m_logger) << "TimelineViewDialog::init: could not check exercise's boundaries!";
}
LtsWidgets::LtsGlobalWaitDialog::getInstance()->done();
@@ -110,6 +110,8 @@ signals:
void signalInitEventList();
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
void onReplayPartitionCreateReply(const Core::FunctionReplyObject &reply) override { m_requestHelper->requestReply(reply); }
qint64 currentSpanTime() const;
@@ -175,14 +175,14 @@ void DDSTimelineModel::slotAddLiveEvent(const ExerciseEventManagement::Event &ev
QJsonObject root(getDetailData(event));
ev->setEndT(root[QStringLiteral("endTime")].toDouble());
ev->setDetailData(root);
DEBUG_LOG() << "live event not added - already exists - modified instead - end";
DEBUG_LOG(m_logger) << "live event not added - already exists - modified instead - end";
return;
}
if (!isLive())
{
DEBUG_LOG() << "not adding live event because we're not live";
DEBUG_LOG(m_logger) << "not adding live event because we're not live";
return;
}
@@ -191,7 +191,7 @@ void DDSTimelineModel::slotAddLiveEvent(const ExerciseEventManagement::Event &ev
int eventType = static_cast<int>(event.eventTypeId().underlying());
if (!m_activeEventTypeIds.contains(eventType))
{
DEBUG_LOG() << "live event not added - event type ("<<eventType<<") inactive";
DEBUG_LOG(m_logger) << "live event not added - event type ("<<eventType<<") inactive";
return;
}
@@ -199,7 +199,7 @@ void DDSTimelineModel::slotAddLiveEvent(const ExerciseEventManagement::Event &ev
if (m_liveCache.events.count() > m_cacheSize)
{
DEBUG_LOG() << "more than " << m_cacheSize << " live events - archiving and clearing";
DEBUG_LOG(m_logger) << "more than " << m_cacheSize << " live events - archiving and clearing";
saveAndClearLiveCache();
}
@@ -219,7 +219,7 @@ void DDSTimelineModel::slotAddLiveEvent(const ExerciseEventManagement::Event &ev
rebuildTimelineKnownRanges();
#ifdef LTS_DEBUG
DEBUG_LOG() << "added live event at " << eventTime << " - cache: " << start << " " << end << ", " << m_liveCache.events.count() << " events";
DEBUG_LOG(m_logger) << "added live event at " << eventTime << " - cache: " << start << " " << end << ", " << m_liveCache.events.count() << " events";
#endif
addEventAndFilter(ltsEvent);
@@ -279,7 +279,7 @@ void DDSTimelineModel::addCacheRange(const LtsTimelineClassic::Range &range, con
rebuildTimelineKnownRanges();
}
DEBUG_LOG() << "added cache for " << range.start << " to " << range.end << " - event count now: " << m_eventCount;
DEBUG_LOG(m_logger) << "added cache for " << range.start << " to " << range.end << " - event count now: " << m_eventCount;
}
@@ -302,7 +302,7 @@ void DDSTimelineModel::_uncache(const CacheRange &cr)
void DDSTimelineModel::uncache(CacheRange &cr)
{
QString hash(QStringLiteral("<%1:%2:%3>").arg(cr.start).arg(cr.end).arg(cr.events.count()));
DEBUG_LOG() << "uncaching " << QString::number(qHash(hash), 16) << " " << cr.start << " "<< cr.end;
DEBUG_LOG(m_logger) << "uncaching " << QString::number(qHash(hash), 16) << " " << cr.start << " "<< cr.end;
cr.visible = false;
_uncache(cr);
@@ -343,7 +343,7 @@ void DDSTimelineModel::forceUncache()
uncache(cr);
m_eventCount -= cr.events.count();
m_cachedEvents.erase(i);
DEBUG_LOG() << "removed an invisible & incomplete cache - event count now: " << m_eventCount;
DEBUG_LOG(m_logger) << "removed an invisible & incomplete cache - event count now: " << m_eventCount;
return;
}
}
@@ -357,7 +357,7 @@ void DDSTimelineModel::forceUncache()
uncache(cr);
m_eventCount -= cr.events.count();
m_cachedEvents.erase(i);
DEBUG_LOG() << "removed an invisible cache - event count now: " << m_eventCount;
DEBUG_LOG(m_logger) << "removed an invisible cache - event count now: " << m_eventCount;
return;
}
}
@@ -396,7 +396,7 @@ void DDSTimelineModel::forceUncache()
m_cachedEvents.erase(lowestEnd);
}
WARNING_LOG() << "force-removing a visible cache ... - event count now: " << m_eventCount;
WARNING_LOG(m_logger) << "force-removing a visible cache ... - event count now: " << m_eventCount;
}
@@ -434,7 +434,7 @@ void DDSTimelineModel::processEventList(qint64 &highest, bool &incomplete, QVect
count++;
if (count > m_cacheSize)
{
WARNING_LOG() << "max cache exceeded - not adding more than " << m_cacheSize << " events";
WARNING_LOG(m_logger) << "max cache exceeded - not adding more than " << m_cacheSize << " events";
incomplete = true;
emit signalTooMuchEvents();
break;
@@ -459,12 +459,12 @@ void DDSTimelineModel::receivedEvents(const LtsTimelineClassic::Range &range, QV
if (isCacheFull())
{
DEBUG_LOG() << "receivedEvents: cache full - force uncache";
DEBUG_LOG(m_logger) << "receivedEvents: cache full - force uncache";
forceUncache();
}
#ifdef LTS_DEBUG
DEBUG_LOG() << "received events count: " << receivedEventsList.count();
DEBUG_LOG(m_logger) << "received events count: " << receivedEventsList.count();
#endif
qint64 highest = 0;
@@ -474,7 +474,7 @@ void DDSTimelineModel::receivedEvents(const LtsTimelineClassic::Range &range, QV
processEventList(highest, incomplete, cachedEvents, receivedEventsList);
addCacheRange(range, cachedEvents, incomplete ? highest : 0);
DEBUG_LOG() << "receivedEvents: loading done";
DEBUG_LOG(m_logger) << "receivedEvents: loading done";
emit signalLoadingDone();
}
@@ -505,7 +505,7 @@ void DDSTimelineModel::slotRequestMessageReceived(const QString &message)
EventRequest *er = qobject_cast<EventRequest *>(sender());
if (er == nullptr)
{
DEBUG_LOG() << "not an EventRequest: " << sender();
DEBUG_LOG(m_logger) << "not an EventRequest: " << sender();
return;
}
@@ -538,7 +538,7 @@ void DDSTimelineModel::slotRequestMessageReceived(const QString &message)
if (err.error != QJsonParseError::NoError)
{
ERROR_LOG() << "Event #" << id << " with event type id " << eventTypeId << " and start time " << startTime << " json detail data cannot be parsed: " << err.errorString() << " at offset " << err.offset;
ERROR_LOG(m_logger) << "Event #" << id << " with event type id " << eventTypeId << " and start time " << startTime << " json detail data cannot be parsed: " << err.errorString() << " at offset " << err.offset;
continue;
}
@@ -618,7 +618,7 @@ void DDSTimelineModel::slotRequestMessageReceived(const QString &message)
path, paintFunc, color, root, -1, pos, m_session);
#ifdef LTS_DEBUG
DEBUG_LOG() << "Event #" << event->uniqueId() << " with event type id " << event->typeId() << " and start time " << event->startTime() << " created";
DEBUG_LOG(m_logger) << "Event #" << event->uniqueId() << " with event type id " << event->typeId() << " and start time " << event->startTime() << " created";
#endif
er->append(event);
@@ -628,13 +628,13 @@ void DDSTimelineModel::slotRequestMessageReceived(const QString &message)
void DDSTimelineModel::requestEvents(const LtsTimelineClassic::Range &range)
{
DEBUG_LOG() << "requesting events from " << QDateTime::fromMSecsSinceEpoch(range.start).toString()
DEBUG_LOG(m_logger) << "requesting events from " << QDateTime::fromMSecsSinceEpoch(range.start).toString()
<< " to " << QDateTime::fromMSecsSinceEpoch(range.end).toString();
if (m_createFakeEvents)
DEBUG_LOG() << "requesting fake events ..";
DEBUG_LOG(m_logger) << "requesting fake events ..";
else
DEBUG_LOG() << "requesting real events ..";
DEBUG_LOG(m_logger) << "requesting real events ..";
EventRequest *request = new EventRequest(m_createFakeEvents ? QUrl(QStringLiteral("ws://127.0.0.1:10090")) : m_eemForeign->eemUrl(),
range.start, range.end, m_activeEventTypeIds, m_cacheSize);
@@ -643,7 +643,7 @@ void DDSTimelineModel::requestEvents(const LtsTimelineClassic::Range &range)
this, [this, range, request]()
{
QVector<LtsTimelineClassic::Event *> eventList = request->eventList();
DEBUG_LOG() << ".. received real events! " << range.start << " - " << range.end;
DEBUG_LOG(m_logger) << ".. received real events! " << range.start << " - " << range.end;
receivedEvents(range, eventList);
request->deleteLater();
@@ -652,7 +652,7 @@ void DDSTimelineModel::requestEvents(const LtsTimelineClassic::Range &range)
connect(request, &EventRequest::signalRequestFailed,
this, [this, request](const QString &errorString)
{
ERROR_LOG() << ".. event request from " << request->start() << " to " << request->end() << " failed! '" << errorString << "'";
ERROR_LOG(m_logger) << ".. event request from " << request->start() << " to " << request->end() << " failed! '" << errorString << "'";
emit signalLoadingDone();
});
@@ -704,12 +704,12 @@ bool DDSTimelineModel::splitLowest(qint64 &rangeMin , qint64 rangeMax , qint64
requestMin = rangeMin;
requestMax = lowestCache.start - 1;
DEBUG_LOG() << "splitLowest: there is an uncached range before the lowest cache, adding this uncached range to the request " << requestMin << " - " << requestMax << " and set rangeMin now to " << rangeMin << " while rangeMax keeps being " << rangeMax;
DEBUG_LOG(m_logger) << "splitLowest: there is an uncached range before the lowest cache, adding this uncached range to the request " << requestMin << " - " << requestMax << " and set rangeMin now to " << rangeMin << " while rangeMax keeps being " << rangeMax;
}
else
{
DEBUG_LOG() << "splitLowest: no uncached range at the start of the requested range, no need to request events here - skipping";
DEBUG_LOG(m_logger) << "splitLowest: no uncached range at the start of the requested range, no need to request events here - skipping";
}
@@ -717,11 +717,11 @@ bool DDSTimelineModel::splitLowest(qint64 &rangeMin , qint64 rangeMax , qint64
if (rangeMin > rangeMax)
{
DEBUG_LOG() << "splitLowest: rangeMin > rangeMax - lowestCache.end " << lowestCache.end;
DEBUG_LOG(m_logger) << "splitLowest: rangeMin > rangeMax - lowestCache.end " << lowestCache.end;
rangeMin = rangeMax;
}
DEBUG_LOG() << "splitLowest: space? " << spaceBeforeCache << " | requestMin" << requestMin << " - requestMax " << requestMax << " | oldRangeMin " << oldRangeMin << " - rangeMin " << rangeMin;
DEBUG_LOG(m_logger) << "splitLowest: space? " << spaceBeforeCache << " | requestMin" << requestMin << " - requestMax " << requestMax << " | oldRangeMin " << oldRangeMin << " - rangeMin " << rangeMin;
return spaceBeforeCache;
}
@@ -759,27 +759,27 @@ void DDSTimelineModel::getAllEventsOfType(const QSet<int> &eventTypeIds)
if (icr == m_cachedEvents.end())
{
WARNING_LOG() << "cr after request for crId " << crId << " not available anymore";
WARNING_LOG(m_logger) << "cr after request for crId " << crId << " not available anymore";
return;
}
CacheRange &cr = icr->second;
QVector<LtsTimelineClassic::Event *> eventList = request->eventList();
DEBUG_LOG() << "getAllEventsOfType: .. received real events! " << cr.start << " - " << cr.end;
DEBUG_LOG(m_logger) << "getAllEventsOfType: .. received real events! " << cr.start << " - " << cr.end;
if (isCacheFull())
{
DEBUG_LOG() << "getAllEventsOfType: receivedEvents: cache full - not adding new events";
DEBUG_LOG(m_logger) << "getAllEventsOfType: receivedEvents: cache full - not adding new events";
cr.incomplete = true;
return;
}
#ifdef LTS_DEBUG
DEBUG_LOG() << "getAllEventsOfType: received events count: " << eventList.count();
DEBUG_LOG(m_logger) << "getAllEventsOfType: received events count: " << eventList.count();
#endif
qint64 highest = 0;
@@ -817,14 +817,14 @@ void DDSTimelineModel::getAllEventsOfType(const QSet<int> &eventTypeIds)
rebuildTimelineKnownRanges();
DEBUG_LOG() << "getAllEventsOfType: receivedEvents: loading done";
DEBUG_LOG(m_logger) << "getAllEventsOfType: receivedEvents: loading done";
request->deleteLater();
});
connect(request, &EventRequest::signalRequestFailed,
this, [this, request](const QString &errorString)
{
ERROR_LOG() << "getAllEventsOfType: event request from " << request->start() << " to " << request->end() << " failed! '" << errorString << "'";
ERROR_LOG(m_logger) << "getAllEventsOfType: event request from " << request->start() << " to " << request->end() << " failed! '" << errorString << "'";
emit signalLoadingDone();
});
@@ -836,17 +836,17 @@ void DDSTimelineModel::getAllEventsOfType(const QSet<int> &eventTypeIds)
void DDSTimelineModel::getEvents(qint64 rangeMin, qint64 rangeMax)
{
DEBUG_LOG() << "getEvents: requesting events from " << QDateTime::fromMSecsSinceEpoch(rangeMin).toString() << rangeMin << " to " << QDateTime::fromMSecsSinceEpoch(rangeMax).toString() << rangeMax;
DEBUG_LOG(m_logger) << "getEvents: requesting events from " << QDateTime::fromMSecsSinceEpoch(rangeMin).toString() << rangeMin << " to " << QDateTime::fromMSecsSinceEpoch(rangeMax).toString() << rangeMax;
if (!hasActiveEventTypes())
{
DEBUG_LOG() << "no active event types selected";
DEBUG_LOG(m_logger) << "no active event types selected";
return;
}
if (m_liveCache.start != 0 && rangeMax > m_liveCache.start)
{
DEBUG_LOG() << "live cache active & in range - limited range max from " << rangeMax << " to " << m_liveCache.start - 1;
DEBUG_LOG(m_logger) << "live cache active & in range - limited range max from " << rangeMax << " to " << m_liveCache.start - 1;
rangeMax = m_liveCache.start - 1;
}
@@ -855,17 +855,17 @@ void DDSTimelineModel::getEvents(qint64 rangeMin, qint64 rangeMax)
for (auto &it : m_cachedEvents)
{
CacheRange &cr = it.second;
DEBUG_LOG() << "> start " << cr.start << " end " << cr.end;
DEBUG_LOG(m_logger) << "> start " << cr.start << " end " << cr.end;
bool inside = isInsideCachedRange(cr, rangeMin, rangeMax);
if (!inside)
continue;
DEBUG_LOG() << "found range that was cached, using it instead of requesting new events";
DEBUG_LOG(m_logger) << "found range that was cached, using it instead of requesting new events";
if (!cr.visible)
{
DEBUG_LOG() << "found range that was cached AND not visible, showing it again";
DEBUG_LOG(m_logger) << "found range that was cached AND not visible, showing it again";
showCached(cr);
}
@@ -900,18 +900,18 @@ void DDSTimelineModel::getEvents(qint64 rangeMin, qint64 rangeMax)
if (rangeMin < rangeMax)
{
DEBUG_LOG() << "adding request for leftovers from " << rangeMin << " - " << rangeMax;
DEBUG_LOG(m_logger) << "adding request for leftovers from " << rangeMin << " - " << rangeMax;
requestRanges.append(Range(rangeMin, rangeMax));
}
int requestRangesCount = requestRanges.count();
DEBUG_LOG() << "requestRanges: " << requestRangesCount;
DEBUG_LOG(m_logger) << "requestRanges: " << requestRangesCount;
for (const auto &range : std::as_const(requestRanges))
requestEvents(range);
if (requestRangesCount < 1)
DEBUG_LOG() << "nothing requested (requestRangesCount empty)";
DEBUG_LOG(m_logger) << "nothing requested (requestRangesCount empty)";
}
@@ -1090,7 +1090,7 @@ QJsonObject DDSTimelineModel::createMarkerDetailData(const MarkerManagement::Mar
}
default:
{
WARNING_LOG() << "Marker " << data.id() << "'s description has an invalid marker type: " << (int)md.markerType().underlying();
WARNING_LOG(m_logger) << "Marker " << data.id() << "'s description has an invalid marker type: " << (int)md.markerType().underlying();
break;
}
}
@@ -1184,7 +1184,7 @@ void DDSTimelineModel::addMarkerManagementMarker(const MarkerManagement::Marker
m_session));
#ifdef LTS_DEBUG
DEBUG_LOG() << "marker added! uniqueId " << data.id() << ", startTime " << data.timeStamp();
DEBUG_LOG(m_logger) << "marker added! uniqueId " << data.id() << ", startTime " << data.timeStamp();
#endif
}
@@ -1218,7 +1218,7 @@ const QJsonObject DDSTimelineModel::getDetailData(const QByteArray &data, int id
QJsonDocument doc(QJsonDocument::fromJson(data, &err));
if (err.error != QJsonParseError::NoError)
{
ERROR_LOG() << "getDetailData: Event #" << id << " with event type id " << type << " and start time " << startTime << " json detail data cannot be parsed: " << err.errorString() << " at offset " << err.offset;
ERROR_LOG(m_logger) << "getDetailData: Event #" << id << " with event type id " << type << " and start time " << startTime << " json detail data cannot be parsed: " << err.errorString() << " at offset " << err.offset;
return QJsonObject();
}
@@ -1317,7 +1317,7 @@ LtsTimelineClassic::Event *DDSTimelineModel::createEvent(const ExerciseEventMana
#ifdef LTS_DEBUG
DEBUG_LOG() << "Event #" << event->uniqueId() << " with event type id " << event->typeId() << " and start time " << event->startTime() << " created";
DEBUG_LOG(m_logger) << "Event #" << event->uniqueId() << " with event type id " << event->typeId() << " and start time " << event->startTime() << " created";
#endif
return event;
@@ -1370,7 +1370,7 @@ QStringList DDSTimelineModel::getPathForAvsEvents(const QString &type, const QJs
QStringList result;
int buildingId = obj[QStringLiteral("MainStructureElementId")].toInt();
DEBUG_LOG() << "Building Id = " << buildingId;
DEBUG_LOG(m_logger) << "Building Id = " << buildingId;
if (buildingId > 0)
{
const QString buildingName = m_ismDtc->getBuildingDisplayName(buildingId);
@@ -1397,7 +1397,7 @@ QStringList DDSTimelineModel::getPathForBuildingEvents(const QString &type, cons
QString buildingName;
int buildingId = obj[QStringLiteral("MainStructureElementId")].toInt();
DEBUG_LOG() << "Building Id = " << buildingId;
DEBUG_LOG(m_logger) << "Building Id = " << buildingId;
if (buildingId > 0)
{
buildingName = m_ismDtc->getBuildingDisplayName(buildingId);
@@ -1416,7 +1416,7 @@ QStringList DDSTimelineModel::getPathForAesEvents(const QString &type, const QJs
result << type;
QString aesName = obj[QStringLiteral("AesName")].toString();
DEBUG_LOG() << "AesName = " << aesName;
DEBUG_LOG(m_logger) << "AesName = " << aesName;
result << aesName;
return result;
@@ -1436,7 +1436,7 @@ void DDSTimelineModel::removeEvent(int eventId)
}
}
WARNING_LOG() << "removeEvent: event "<<eventId<<" not found !!";
WARNING_LOG(m_logger) << "removeEvent: event "<<eventId<<" not found !!";
}
@@ -1622,11 +1622,10 @@ QVector<LtsTimelineClassic::Event *> DDSTimelineModel::createTestEvents(qint64 t
EventRequest::EventRequest(const QUrl &url, qint64 start, qint64 end, const QSet<int> &eventTypes, int limit)
: m_start(start)
EventRequest::EventRequest(const QUrl &url, qint64 start, qint64 end, const QSet<int> &eventTypes, int limit) : m_start(start)
, m_end(end)
, m_timeoutTimer(new QTimer(this))
{
, m_timeoutTimer(new QTimer(this)),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
QUrl realUrl(url);
realUrl.setPath(QStringLiteral("/request"));
@@ -78,6 +78,9 @@ public:
private:
NGL::INGLLogger &m_logger;
qint64 currentTime() const override;
QStringList getPathForAvsEvents(const QString &type, const QJsonObject &obj) const;
@@ -74,7 +74,7 @@ EventListDialog::EventListDialog(const QString &menuGroup,
EventListDialog::~EventListDialog()
{
DEBUG_LOG() << "~EventListDialog";
DEBUG_LOG(m_logger) << "~EventListDialog";
if (m_proxyModel != nullptr)
m_proxyModel->setInvalid();
m_model->setInvalid();
@@ -139,10 +139,10 @@ void EventListDialog::initColumns()
columnInfos.reserve(colCount);
const auto header = m_ui->ltsDataView->searchView()->header();
DEBUG_LOG() << "concealed count: " << m_concealedColumns.length();
DEBUG_LOG(m_logger) << "concealed count: " << m_concealedColumns.length();
for (int visualIndex = 0; visualIndex < colCount; ++visualIndex)
{
DEBUG_LOG() << visualIndex << " concealed? " << m_concealedColumns.contains(visualIndex);
DEBUG_LOG(m_logger) << visualIndex << " concealed? " << m_concealedColumns.contains(visualIndex);
if (m_concealedColumns.contains(visualIndex))
continue;
@@ -153,7 +153,7 @@ void EventListDialog::initColumns()
ci.visible = !header->isSectionHidden(ci.logicalIndex);
ci.name = m_model->headerData(ci.logicalIndex, Qt::Orientation::Horizontal, Qt::DisplayRole).toString();
DEBUG_LOG() << "InitColumns: Adding column " << ci.name <<
DEBUG_LOG(m_logger) << "InitColumns: Adding column " << ci.name <<
" with visual index = " << ci.visualIndex <<
", logical index = " << ci.logicalIndex;
@@ -237,7 +237,7 @@ void EventListDialog::showColumns()
{
int oldVisualIndex = header->visualIndex(ci.logicalIndex);
DEBUG_LOG() << "ShowColumns: Column " << ci.name
DEBUG_LOG(m_logger) << "ShowColumns: Column " << ci.name
<< ", colVisible: " << ci.visible
<< ", logical index: " << ci.logicalIndex
<< ", old index: " << oldVisualIndex
@@ -264,8 +264,8 @@ void EventListDialog::reInitEventList(const LtsTimelineClassic::EventList &event
newEventList += e;
}
DEBUG_LOG() << "reInitEventList size = " << eventList.size();
DEBUG_LOG() << "reInitEventList new size = " << newEventList.size();
DEBUG_LOG(m_logger) << "reInitEventList size = " << eventList.size();
DEBUG_LOG(m_logger) << "reInitEventList new size = " << newEventList.size();
m_model->clear();
m_model->setData(newEventList);
}
@@ -49,6 +49,8 @@ public:
void reInitEventList(const LtsTimelineClassic::EventList &eventList, qint64 startTime, qint64 endTime);
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
void initColumns();
void addConcealedColumns(const QVector<int> &concealedColumns);
@@ -146,14 +146,14 @@ void EventListColumns::loadColumns(const QJsonArray &cols)
if (elc)
{
ERROR_LOG() << "Modifed Column: " << ci.visualIndex
ERROR_LOG(m_logger) << "Modifed Column: " << ci.visualIndex
<< ", " << ci.logicalIndex << ", " << ci.name
<< ", " << ci.visible << ", " << objName;
elc->setChecked(ci.visible);
}
else
{
ERROR_LOG() << "New Column: " << ci.visualIndex
ERROR_LOG(m_logger) << "New Column: " << ci.visualIndex
<< ", " << ci.logicalIndex << ", " << ci.name
<< ", " << ci.visible << ", " << objName;
elc = new EventListColumn(ci);
@@ -167,9 +167,9 @@ bool EventListColumns::save()
{
int fileId = m_flmIfc->saveFileContent(this, FileManagement::FileType::Xml, 0, columnsToDoc(exportColumns()));
if (fileId > 0)
DEBUG_LOG() << "Saved file with id = " << fileId;
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
else
ERROR_LOG() << "Could not save file in library ";
ERROR_LOG(m_logger) << "Could not save file in library ";
return (fileId > 0);
}
@@ -190,7 +190,7 @@ const QJsonArray EventListColumns::exportColumns() const
for (const EventListColumn *elc : children)
{
const auto &ci = elc->columnInfo();
DEBUG_LOG() << "Saving column: " << ci.visualIndex << ", " << elc->text() << ", " << elc->isChecked();
DEBUG_LOG(m_logger) << "Saving column: " << ci.visualIndex << ", " << elc->text() << ", " << elc->isChecked();
QJsonObject elcObj;
elcObj[QStringLiteral("visualIndex")] = ci.visualIndex;
elcObj[QStringLiteral("logicalIndex")] = ci.logicalIndex;
@@ -44,6 +44,8 @@ public:
const ColumnInfo &columnInfo() const { return m_ci; }
private:
NGL::INGLLogger &m_logger;
ColumnInfo m_ci;
};
@@ -59,6 +59,8 @@ public slots:
void appendEventList(const QVector<LtsTimelineClassic::Event *> &eventList);
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
@@ -72,7 +72,7 @@ void TimelineLegendDialog::setActiveEventTypeIds(const QSet<int> &activeEventTyp
if (cb != nullptr)
cb->setChecked(true);
else
WARNING_LOG() << "cb for event type " << activeEventType << " not found!";
WARNING_LOG(m_logger) << "cb for event type " << activeEventType << " not found!";
}
setUnchangeable(false);
@@ -255,7 +255,7 @@ bool TimelineLegendDialog::init(DDSTimelineModel *model, const QSet<int> &active
if (paintFunc == nullptr)
{
WARNING_LOG() << "No draw function for event " << eventType;
WARNING_LOG(m_logger) << "No draw function for event " << eventType;
Q_ASSERT(false);
continue;
}
@@ -35,6 +35,8 @@ signals:
void signalEventTypesChanged(const QSet<int> &activeEventTypeIds);
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
static QString checkBoxName(int eventTypeId) { return QStringLiteral("CheckBoxEvent%1").arg(eventTypeId); }
@@ -82,7 +82,7 @@ void ShowDetailsDialog::slotFocusOnMap()
{
if (m_replayAppSession == nullptr)
{
WARNING_LOG() << "ShowDetailsDialog::init: no replay app, no focus";
WARNING_LOG(m_logger) << "ShowDetailsDialog::init: no replay app, no focus";
return;
}
@@ -90,13 +90,13 @@ void ShowDetailsDialog::slotFocusOnMap()
if (!m_replayAppSession->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(sitMapIfc))
{
WARNING_LOG() << "no sitMapIfc, no focusing on replay in Show Details Dialog 1";
WARNING_LOG(m_logger) << "no sitMapIfc, no focusing on replay in Show Details Dialog 1";
return;
}
if (!sitMapIfc)
{
WARNING_LOG() << "no sitMapIfc, no focusing on replay in Show Details Dialog 2";
WARNING_LOG(m_logger) << "no sitMapIfc, no focusing on replay in Show Details Dialog 2";
return;
}
@@ -104,7 +104,7 @@ void ShowDetailsDialog::slotFocusOnMap()
{
if (!m_event->positionValid())
{
WARNING_LOG() << "event has no valid position, skip focusOnMap";
WARNING_LOG(m_logger) << "event has no valid position, skip focusOnMap";
return;
}
@@ -124,7 +124,7 @@ void ShowDetailsDialog::slotFocusOnMap()
MarkerManagement::MarkerManagementApplyFilter applyFilter(m_replayAppSession, m_fltParticipantIfc, m_fltAesIfc, m_fltBuildingComponentIfc);
if (!applyFilter.applyFilter(filterSettings.toObject()))
{
WARNING_LOG() << "filters from event #"<<m_event->uniqueId()<<" could not be applied";
WARNING_LOG(m_logger) << "filters from event #"<<m_event->uniqueId()<<" could not be applied";
return;
}
}
@@ -153,14 +153,14 @@ bool ShowDetailsDialog::getStreamNameAndEndTime(QString &streamName, qint64 &end
if (_streamName.isEmpty())
{
if (!silent)
ERROR_LOG() << "ShowDetailsDialog::slotStartVideo(): stream name is empty " << QJsonDocument(m_event->detailData()).toJson();
ERROR_LOG(m_logger) << "ShowDetailsDialog::slotStartVideo(): stream name is empty " << QJsonDocument(m_event->detailData()).toJson();
return false;
}
qint64 _endTime = root[QStringLiteral("endTime")].toDouble(0);
if (_endTime == 0 && !silent)
WARNING_LOG() << "ShowDetailsDialog::slotStartPlayback: event " << m_event->uniqueId() << " has no end time!";
WARNING_LOG(m_logger) << "ShowDetailsDialog::slotStartPlayback: event " << m_event->uniqueId() << " has no end time!";
streamName = _streamName;
endTime = _endTime;
@@ -189,7 +189,7 @@ void ShowDetailsDialog::slotStartReplay()
{
if (m_replayAppSession == nullptr)
{
ERROR_LOG() << "ShowDetailsDialog::slotStartReplay: no replay app, no replay";
ERROR_LOG(m_logger) << "ShowDetailsDialog::slotStartReplay: no replay app, no replay";
return;
}
@@ -197,7 +197,7 @@ void ShowDetailsDialog::slotStartReplay()
if (!m_replayAppSession->getForeignGuiInterface<SituationReplay::ForeignGuiInterface>(srpIfc))
{
ERROR_LOG() << "ShowDetailsDialog::slotStartReplay: no srp, no replay in Show Details Dialog";
ERROR_LOG(m_logger) << "ShowDetailsDialog::slotStartReplay: no srp, no replay in Show Details Dialog";
return;
}
@@ -287,7 +287,7 @@ bool ShowDetailsDialog::init(DetailData *detailData, const LtsTimelineClassic::E
std::shared_ptr<SituationReplay::ForeignGuiInterface> srpIfc;
std::shared_ptr<SituationMap::ForeignGuiInterface> sitMapIfc;
if (!m_session->getDtc<MarkerManagement::DataInterface>(m_mrkDtc))
WARNING_LOG() << "!m_session->getDtc<MarkerManagement::DataInterface>(m_mrkDtc)";
WARNING_LOG(m_logger) << "!m_session->getDtc<MarkerManagement::DataInterface>(m_mrkDtc)";
m_mrkDtc->enableMarker();
@@ -307,10 +307,10 @@ bool ShowDetailsDialog::init(DetailData *detailData, const LtsTimelineClassic::E
});
if (!replayAppSession->getForeignGuiInterface<SituationReplay::ForeignGuiInterface>(srpIfc))
WARNING_LOG() << "ShowDetailsDialog::init: no srp, no replay in Show Details Dialog";
WARNING_LOG(m_logger) << "ShowDetailsDialog::init: no srp, no replay in Show Details Dialog";
if (!replayAppSession->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(sitMapIfc))
WARNING_LOG() << "ShowDetailsDialog::init: no sitMapIfc, no focusing on replay in Show Details Dialog";
WARNING_LOG(m_logger) << "ShowDetailsDialog::init: no sitMapIfc, no focusing on replay in Show Details Dialog";
}
m_avmIfc = avmIfc;
@@ -321,22 +321,22 @@ bool ShowDetailsDialog::init(DetailData *detailData, const LtsTimelineClassic::E
m_streamNameMapping = streamNameMapping;
if (m_avmIfc == nullptr)
WARNING_LOG() << "ShowDetailsDialog::init: no avm ifc given";
WARNING_LOG(m_logger) << "ShowDetailsDialog::init: no avm ifc given";
if (m_mrkIfc == nullptr)
WARNING_LOG() << "ShowDetailsDialog::init: no mrk ifc given";
WARNING_LOG(m_logger) << "ShowDetailsDialog::init: no mrk ifc given";
if (m_fltParticipantIfc == nullptr)
WARNING_LOG() << "ShowDetailsDialog::init: no flt Part ifc given";
WARNING_LOG(m_logger) << "ShowDetailsDialog::init: no flt Part ifc given";
if (m_fltAesIfc == nullptr)
WARNING_LOG() << "ShowDetailsDialog::init: no flt Aes ifc given";
WARNING_LOG(m_logger) << "ShowDetailsDialog::init: no flt Aes ifc given";
if (m_fltBuildingComponentIfc == nullptr)
WARNING_LOG() << "ShowDetailsDialog::init: no flt buildingComponent ifc given";
WARNING_LOG(m_logger) << "ShowDetailsDialog::init: no flt buildingComponent ifc given";
if (m_streamNameMapping == nullptr)
WARNING_LOG() << "ShowDetailsDialog::init: no stream name mapping given";
WARNING_LOG(m_logger) << "ShowDetailsDialog::init: no stream name mapping given";
m_event = event;
int eventTypeId = event->typeId();
@@ -423,7 +423,7 @@ bool ShowDetailsDialog::init(DetailData *detailData, const LtsTimelineClassic::E
else if (attributeDetail.requestResult == DetailData::RequestResult::InvalidAttributeType)
{
DEBUG_LOG() << "Unhandled attribute " << attributeDetail.attributeTypeId << " - skipping";
DEBUG_LOG(m_logger) << "Unhandled attribute " << attributeDetail.attributeTypeId << " - skipping";
continue;
}
else
@@ -431,7 +431,7 @@ bool ShowDetailsDialog::init(DetailData *detailData, const LtsTimelineClassic::E
attributeTypeText = QStringLiteral("%1 (%2)").arg(tr("<unknown>"), attributeDetail.attributeTypeId);
attributeValueText = tr("<type unknown>");
WARNING_LOG() << "getDetailData failed with message id " << (int)attributeDetail.requestResult << " for attribute " << attributeDetail.attributeTypeId;
WARNING_LOG(m_logger) << "getDetailData failed with message id " << (int)attributeDetail.requestResult << " for attribute " << attributeDetail.attributeTypeId;
continue;
}
}
@@ -475,9 +475,9 @@ bool ShowDetailsDialog::init(DetailData *detailData, const LtsTimelineClassic::E
QLabel *attributeValueTextLabel = new QLabel(attributeValueText);
DEBUG_LOG() << "attributeValueText=" << attributeValueText;
DEBUG_LOG(m_logger) << "attributeValueText=" << attributeValueText;
attributeValueTextLabel->setTextInteractionFlags(attributeValueTextLabel->textInteractionFlags() | Qt::TextInteractionFlag::TextSelectableByMouse);
DEBUG_LOG() << "attributeTypeText=" << attributeTypeText
DEBUG_LOG(m_logger) << "attributeTypeText=" << attributeTypeText
<< " attributeValueTextLabel=" << attributeValueTextLabel;
m_ui->formLayout->addRow(new QLabel(attributeTypeText), attributeValueTextLabel);
}
@@ -496,7 +496,7 @@ bool ShowDetailsDialog::init(DetailData *detailData, const LtsTimelineClassic::E
void ShowDetailsDialog::updateMarker()
{
DEBUG_LOG() << "ShowDetailsDialog::updateMarker";
DEBUG_LOG(m_logger) << "ShowDetailsDialog::updateMarker";
}
@@ -60,6 +60,8 @@ private slots:
void updateMarker();
private:
NGL::INGLLogger &m_logger;
bool hasNameAndEndTime() const;
bool getStreamNameAndEndTime(QString &streamName, qint64 &endTime, bool silent = false) const;
void setButtonDisabled(QPushButton *button, QToolButton *warningButton, const QString &reasonMessage, bool hide = false);