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

@@ -43,7 +43,7 @@ bool ConfigAlarmModel::initModel(const std::shared_ptr<AlarmManagement::Interfac
const QMap<qint32, AlarmManagement::AlarmConfig> alarmConfigs = m_dtc->alarmConfigs();
INFO_LOG() << "initModel - #AlarmConfig: " << alarmConfigs.size();
INFO_LOG(m_logger) << "initModel - #AlarmConfig: " << alarmConfigs.size();
connect(m_dtc.get(), &Interface::Dtc::alarmConfigChanged,
this, &ConfigAlarmModel::onAlarmConfigChanged);
@@ -59,7 +59,7 @@ bool ConfigAlarmModel::initModel(const std::shared_ptr<AlarmManagement::Interfac
QVariant ConfigAlarmModel::data(const QModelIndex &index, int role) const
{
DEBUG_LOG() << "AlarmManagementModel::data";
DEBUG_LOG(m_logger) << "AlarmManagementModel::data";
if (role != Qt::DisplayRole || !indexIsValid(index))
return QVariant();
@@ -123,7 +123,7 @@ void ConfigAlarmModel::onAlarmConfigChanged(const AlarmManagement::AlarmConfig &
const int eventTypeId = data.eventTypeId().underlying();
const bool messageWindow = data.messageWindow();
const bool setMarker = data.setMarker();
DEBUG_LOG() << "onAlarmConfigChanged: " << eventTypeId << " messageWindow=" << messageWindow
DEBUG_LOG(m_logger) << "onAlarmConfigChanged: " << eventTypeId << " messageWindow=" << messageWindow
<< "setMarker"<<setMarker;
switch (modType)
@@ -131,7 +131,7 @@ void ConfigAlarmModel::onAlarmConfigChanged(const AlarmManagement::AlarmConfig &
case DataModification::eRemoved:
{
DEBUG_LOG() << "AlarmConfig was removed: " << id;
DEBUG_LOG(m_logger) << "AlarmConfig was removed: " << id;
AlarmManagement::AlarmConfig data1 = data;
data1.messageWindow(false);
data1.setMarker(false);
@@ -141,7 +141,7 @@ void ConfigAlarmModel::onAlarmConfigChanged(const AlarmManagement::AlarmConfig &
}
case DataModification::eModified:
{
DEBUG_LOG() << "DataModification::eModified: ";
DEBUG_LOG(m_logger) << "DataModification::eModified: ";
if (row < 0)
{
@@ -153,7 +153,7 @@ void ConfigAlarmModel::onAlarmConfigChanged(const AlarmManagement::AlarmConfig &
}
case DataModification::eAdded:
{
DEBUG_LOG() << "DataModification::eAdded";
DEBUG_LOG(m_logger) << "DataModification::eAdded";
insertRow(data);
}
break;
@@ -45,6 +45,7 @@ private slots:
void onAlarmConfigChanged(const AlarmManagement::AlarmConfig &data,
const DataModification modType);
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<AlarmManagement::Interface::Dtc> m_dtc;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
AlarmHistoryModel *m_alarmHistoryModel;
@@ -176,7 +176,7 @@ void AlarmHistoryModel::onNotificationChanged(const AlarmManagement::Notificatio
const int global = propertieJsonObj[QStringLiteral("Global")].toInt();
const int friendlyFire = propertieJsonObj[QStringLiteral("FriendlyFire")].toInt();
DEBUG_LOG() << Q_FUNC_INFO
DEBUG_LOG(m_logger) << Q_FUNC_INFO
<< " notification:" << data
<< ", Global: " << global
<< ", FriendlyFire: " << friendlyFire;
@@ -197,7 +197,7 @@ void AlarmHistoryModel::onParticipantChanged(const ParticipantManagement::Partic
QString tacticalIdentifier = QString::fromStdString(participant.tacticalIdentifier());
m_idTactIdentifierMap.insert(participant.id(), tacticalIdentifier);
DEBUG_LOG() << Q_FUNC_INFO << " id=" << participant.id()
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " id=" << participant.id()
<< " designator=" << designator
<< " tacticalIdentifier=" << tacticalIdentifier;
}
@@ -205,7 +205,7 @@ void AlarmHistoryModel::onParticipantChanged(const ParticipantManagement::Partic
int AlarmHistoryModel::participantId2EquipNo(const int participantId) const
{
int ret = m_partId2EquipNoMap.value(participantId, 0);
INFO_LOG() << "participantId2EquipNo participantId=" << participantId
INFO_LOG(m_logger) << "participantId2EquipNo participantId=" << participantId
<< " EquipmentNumber=" << ret;
return ret;
}
@@ -213,7 +213,7 @@ int AlarmHistoryModel::participantId2EquipNo(const int participantId) const
QString AlarmHistoryModel::getDesignator(const int participantId) const
{
QString designator = m_idDesignatorMap.value(participantId);
DEBUG_LOG() << "m_idDesignatorMap.value(participantId)=" << designator;
DEBUG_LOG(m_logger) << "m_idDesignatorMap.value(participantId)=" << designator;
return designator;
}
@@ -221,7 +221,7 @@ QString AlarmHistoryModel::getDesignator(const int participantId) const
QString AlarmHistoryModel::getTactIdentifier(const int participantId) const
{
QString tactIdentifier = m_idTactIdentifierMap.value(participantId);
DEBUG_LOG() << "m_idTactIdentifierMap.value(participantId)=" << tactIdentifier;
DEBUG_LOG(m_logger) << "m_idTactIdentifierMap.value(participantId)=" << tactIdentifier;
return tactIdentifier;
}
@@ -234,7 +234,7 @@ void AlarmHistoryModel::onBCContaminationChanged(const AreaEffectSimulation::BCC
int id = data.id();
QString name = QString::fromStdString(data.name());
m_aesNameMap[id] = name;
DEBUG_LOG() << "onBCContaminationChanged: " << data
DEBUG_LOG(m_logger) << "onBCContaminationChanged: " << data
<< " Name=" << name
<< " id=" << id;
}
@@ -247,7 +247,7 @@ void AlarmHistoryModel::onBoobyTrapChanged(const AreaEffectSimulation::BoobyTrap
int id = data.id();
QString name = QString::fromStdString(data.name());
m_aesNameMap[id] = name;
DEBUG_LOG() << "BoobyTrap: " << data
DEBUG_LOG(m_logger) << "BoobyTrap: " << data
<< " Name=" << name
<< " id=" << id;
}
@@ -260,7 +260,7 @@ void AlarmHistoryModel::onOffRouteMineChanged(const AreaEffectSimulation::OffRou
int id = data.id();
QString name = QString::fromStdString(data.name());
m_aesNameMap[id] = name;
DEBUG_LOG() << "OffRouteMine: " << data
DEBUG_LOG(m_logger) << "OffRouteMine: " << data
<< " Name=" << name
<< " id=" << id;
}
@@ -273,7 +273,7 @@ void AlarmHistoryModel::onAesItemChanged(const AreaEffectSimulation::AesItem &it
QString name = QString::fromStdString(item.name());
int id = item.id();
m_aesNameMap[id] = name;
DEBUG_LOG() << "AreaEffectSimulation::AesItem onAesItemChanged: " << item
DEBUG_LOG(m_logger) << "AreaEffectSimulation::AesItem onAesItemChanged: " << item
<< " Name=" << name
<< " id=" << item.id();
}
@@ -63,6 +63,8 @@ public:
QString getTactIdentifier(const int participantId) const;
protected:
NGL::INGLLogger &m_logger;
bool isFiltered(const NotificationEx &data, DataModification modType) const override;
private slots:
void onNotificationChanged(const AlarmManagement::Notification &data,
@@ -154,7 +154,7 @@ bool AlarmDialog::init(const std::shared_ptr<AlarmManagement::Interface::Ftc> &f
bool global = true;
m_configAlarmModel->initModel(m_dtc, ppmDtc, alarmHistoryModel, global);
INFO_LOG() << "AlarmDialog::init";
INFO_LOG(m_logger) << "AlarmDialog::init";
return true;
}
@@ -170,7 +170,7 @@ void AlarmDialog::onAlarmConfigChanged(const AlarmManagement::AlarmConfig &data,
if (modType == DataModification::eRemoved)
return;
DEBUG_LOG() << "************** onAlarmConfigChanged "
DEBUG_LOG(m_logger) << "************** onAlarmConfigChanged "
<< " id=" << data.id()
<< " operatorId=" << data.operatorId()
<< " m_operatorId=" << m_operatorId
@@ -183,33 +183,33 @@ void AlarmDialog::onAlarmConfigChanged(const AlarmManagement::AlarmConfig &data,
if (data.operatorId() == m_operatorId)
{
DEBUG_LOG() << "************** onAlarmConfig zuweisen ";
DEBUG_LOG(m_logger) << "************** onAlarmConfig zuweisen ";
switch (data.eventTypeId().underlying())
{
case ProjectDataManagement::EventType_def::EnterNuclear:
{
DEBUG_LOG() << "EnterNuclear zuweisen ";
DEBUG_LOG(m_logger) << "EnterNuclear zuweisen ";
m_ui->cbxNMarker->setChecked(setMarker);
m_ui->cbxNMessage->setChecked(messageWindow);
break;
}
case ProjectDataManagement::EventType_def::EnterDangerArea:
{
DEBUG_LOG() << "EnterDangerArea zuweisen ";
DEBUG_LOG(m_logger) << "EnterDangerArea zuweisen ";
m_ui->cbxDanerAreaMarker->setChecked(setMarker);
m_ui->cbxDangerAreaMessage->setChecked(messageWindow);
break;
}
case ProjectDataManagement::EventType_def::EnterMineArea:
{
DEBUG_LOG() << "EnterMineArea zuweisen ";
DEBUG_LOG(m_logger) << "EnterMineArea zuweisen ";
m_ui->cbxMineAreaEntryMarker->setChecked(setMarker);
m_ui->cbxMineAreaEntryMessage->setChecked(messageWindow);
break;
}
case ProjectDataManagement::EventType_def::HitMine:
{
DEBUG_LOG() << "HitMine zuweisen ";
DEBUG_LOG(m_logger) << "HitMine zuweisen ";
m_ui->cbxMineAreaHitMarker->setChecked(setMarker);
m_ui->cbxMineAreaHitMessage->setChecked(messageWindow);
break;
@@ -217,14 +217,14 @@ void AlarmDialog::onAlarmConfigChanged(const AlarmManagement::AlarmConfig &data,
case ProjectDataManagement::EventType_def::Hit:
{
DEBUG_LOG() << "Hit zuweisen ";
DEBUG_LOG(m_logger) << "Hit zuweisen ";
m_ui->cbxDirectFireMarker->setChecked(setMarker);
m_ui->cbxDirectFireMessage->setChecked(messageWindow);
break;
}
case ProjectDataManagement::EventType_def::HitEffectSimulation:
{
DEBUG_LOG() << "HitEffectSimulation zuweisen ";
DEBUG_LOG(m_logger) << "HitEffectSimulation zuweisen ";
m_ui->cbxIndirectFireMarker->setChecked(setMarker);
m_ui->cbxIndirectFireMessage->setChecked(messageWindow);
break;
@@ -232,27 +232,27 @@ void AlarmDialog::onAlarmConfigChanged(const AlarmManagement::AlarmConfig &data,
case ProjectDataManagement::EventType_def::CrossLocalBorderline:
{
DEBUG_LOG() << "CrossLocalBorderline zuweisen ";
DEBUG_LOG(m_logger) << "CrossLocalBorderline zuweisen ";
m_ui->cbxLocalBorderMarker->setChecked(setMarker);
m_ui->cbxLocalBorderMessage->setChecked(messageWindow);
break;
}
case ProjectDataManagement::EventType_def::CrossGlobalBorderline:
{
DEBUG_LOG() << "CrossGlobalBorderline zuweisen ";
DEBUG_LOG(m_logger) << "CrossGlobalBorderline zuweisen ";
m_ui->cbxGlobalBorderMarker->setChecked(setMarker);
m_ui->cbxGlobalBorderMessage->setChecked(messageWindow);
break;
}
case ProjectDataManagement::EventType_def::AirSupport:
{
DEBUG_LOG() << "AirSupport zuweisen ";
DEBUG_LOG(m_logger) << "AirSupport zuweisen ";
m_ui->cbxAirSupportMarker->setChecked(setMarker);
m_ui->cbxAirSupportMessage->setChecked(messageWindow);
break;
}
default:
ERROR_LOG() << "Not possible to set with Operator App!!!";
ERROR_LOG(m_logger) << "Not possible to set with Operator App!!!";
break;
}
}
@@ -272,22 +272,22 @@ std::vector<AlarmManagement::AlarmAction> AlarmDialog::getCheckedValues() const
if (item.checkboxMarker->isChecked())
{
alarmActionDds.setMarker(true);
DEBUG_LOG() << item.name << " setMarker = true";
DEBUG_LOG(m_logger) << item.name << " setMarker = true";
}
else
{
alarmActionDds.setMarker(false);
DEBUG_LOG() << item.name << " setMarker = false";
DEBUG_LOG(m_logger) << item.name << " setMarker = false";
}
if (item.checkboxWindow->isChecked())
{
alarmActionDds.messageWindow(true);
DEBUG_LOG() << item.name << " messageWindow = true";
DEBUG_LOG(m_logger) << item.name << " messageWindow = true";
}
else
{
alarmActionDds.messageWindow(false);
DEBUG_LOG() << item.name << " messageWindow = false";
DEBUG_LOG(m_logger) << item.name << " messageWindow = false";
}
if (alarmActionDds.setMarker() || alarmActionDds.messageWindow())
ret.push_back(alarmActionDds);
@@ -21,7 +21,7 @@ AlarmView::AlarmView(LtsSession::LtsSession *session, QWidget *parent)
, m_session(session)
, m_ui(new Ui::AlarmView)
{
DEBUG_LOG() << Q_FUNC_INFO << " --- AlarmView Konstruktor() ";
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " --- AlarmView Konstruktor() ";
m_ui->setupUi(this);
m_ui->widget->setSelectionMode(QAbstractItemView::MultiSelection);
@@ -50,7 +50,7 @@ AlarmView::AlarmView(LtsSession::LtsSession *session, QWidget *parent)
AlarmView::~AlarmView()
{
INFO_LOG() << "--- AlarmView Destruktor() ";
INFO_LOG(m_logger) << "--- AlarmView Destruktor() ";
m_sitMapGuiIfc = nullptr;
delete m_ui;
}
@@ -65,14 +65,14 @@ void AlarmView::retranslate()
bool AlarmView::init(const std::shared_ptr<AlarmManagement::Interface::Dtc> &dtc,
AlarmHistoryModel *alarmHistoryModel)
{
INFO_LOG() << "--- init() ";
INFO_LOG(m_logger) << "--- init() ";
if (!dtc)
return false;
m_dtc = dtc;
m_alarmHistoryModel = alarmHistoryModel;
DEBUG_LOG() << "--- AlarmView::init ";
DEBUG_LOG(m_logger) << "--- AlarmView::init ";
m_proxyModel = new AlarmHistoryProxyModel(this);
m_proxyModel->setSourceModel(m_alarmHistoryModel);
m_ui->widget->setModel(m_proxyModel);
@@ -101,14 +101,14 @@ void AlarmView::onSelectionChanged()
void AlarmView::onShowAlarm()
{
INFO_LOG() << "--- onShowMAlarm() ";
INFO_LOG(m_logger) << "--- onShowMAlarm() ";
}
void AlarmView::onRemoveAlarm()
{
DEBUG_LOG() << "onRemoveAlarm selectedRows.size"
DEBUG_LOG(m_logger) << "onRemoveAlarm selectedRows.size"
<< m_ui->widget->selectedRows().size();
const QModelIndexList idxList = m_ui->widget->selectedRows();
@@ -124,7 +124,7 @@ void AlarmView::onRemoveAlarm()
void AlarmView::onCenterAlarm()
{
DEBUG_LOG() << "onCenterAlarm";
DEBUG_LOG(m_logger) << "onCenterAlarm";
if (!m_sitMapGuiIfc)
return;
const QModelIndexList indexList = m_ui->widget->selectedRows();
@@ -137,14 +137,14 @@ void AlarmView::onCenterAlarm()
if (!position.isNull())
{
DEBUG_LOG() << Q_FUNC_INFO << " position=" << position.x() << " - " << position.y();
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " position=" << position.x() << " - " << position.y();
m_sitMapGuiIfc->setCenterPoint(position);
}
else
{
const QModelIndex &indexParticipantId = m_alarmHistoryModel->index(index.row(), AlarmHistoryModel::ParticipantId, index.parent());
const int participantId = indexParticipantId.data().toInt();
DEBUG_LOG() << Q_FUNC_INFO << " participantId=" << participantId;
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " participantId=" << participantId;
m_sitMapGuiIfc->centerMapToParticipant(participantId);
}
}
@@ -29,6 +29,8 @@ public:
AlarmHistoryModel *alarmHistoryModel);
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
void onSelectionChanged();
void onShowAlarm();
@@ -99,10 +99,10 @@ bool ConfigParticipantsDialog::init(const std::shared_ptr<ParticipantManagement:
m_ui->equipmentNoContent->setText(equipmentNumbersStr);
DEBUG_LOG() << "current participantId = " << participantData.id();
DEBUG_LOG(m_logger) << "current participantId = " << participantData.id();
m_typeClass = ppmDtc->type(participantData.typeId()).typeClass();
DEBUG_LOG() << "m_typeClass=" << m_typeClass << " TypeId=" << participantData.typeId();
DEBUG_LOG(m_logger) << "m_typeClass=" << m_typeClass << " TypeId=" << participantData.typeId();
fillCbx();
m_almDtc->alarmConfigs([this](const AlarmManagement::AlarmConfig &alarm) { setAlaramData(alarm); });
@@ -111,7 +111,7 @@ bool ConfigParticipantsDialog::init(const std::shared_ptr<ParticipantManagement:
void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig &alarm)
{
DEBUG_LOG() << "setAlaramData:" << alarm;
DEBUG_LOG(m_logger) << "setAlaramData:" << alarm;
if (alarm.operatorId() != m_operatorId ||
alarm.participantId() != m_participantData.id() ||
alarm.global())
@@ -121,7 +121,7 @@ void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig
{
case ProjectDataManagement::EventType_def::Hit:
{
DEBUG_LOG() << "Hit zuweisen ";
DEBUG_LOG(m_logger) << "Hit zuweisen ";
m_ui->cbxDirectFire->setChecked(true);
m_ui->cbxSetMarker->setChecked(alarm.setMarker());
m_ui->cbxMessageWindow->setChecked(alarm.messageWindow());
@@ -135,7 +135,7 @@ void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig
}
case ProjectDataManagement::EventType_def::HitEffectSimulation:
{
DEBUG_LOG() << "HitIndirect zuweisen ";
DEBUG_LOG(m_logger) << "HitIndirect zuweisen ";
m_ui->cbxIndirectFire->setChecked(true);
m_ui->cbxSetMarker->setChecked(alarm.setMarker());
m_ui->cbxMessageWindow->setChecked(alarm.messageWindow());
@@ -143,7 +143,7 @@ void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig
}
case ProjectDataManagement::EventType_def::AirSupport:
{
DEBUG_LOG() << "AirSupport zuweisen ";
DEBUG_LOG(m_logger) << "AirSupport zuweisen ";
m_ui->cbxAirSupport->setChecked(true);
m_ui->cbxSetMarker->setChecked(alarm.setMarker());
m_ui->cbxMessageWindow->setChecked(alarm.messageWindow());
@@ -151,7 +151,7 @@ void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig
}
case ProjectDataManagement::EventType_def::HitMine:
{
DEBUG_LOG() << "HitMine zuweisen ";
DEBUG_LOG(m_logger) << "HitMine zuweisen ";
m_ui->cbxMines->setChecked(true);
m_ui->cbxSetMarker->setChecked(alarm.setMarker());
m_ui->cbxMessageWindow->setChecked(alarm.messageWindow());
@@ -161,7 +161,7 @@ void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig
case ProjectDataManagement::EventType_def::HitN:
case ProjectDataManagement::EventType_def::HitC:
{
DEBUG_LOG() << "Hit N/B/C zuweisen ";
DEBUG_LOG(m_logger) << "Hit N/B/C zuweisen ";
m_ui->cbxNbcAgent->setChecked(true);
m_ui->cbxSetMarker->setChecked(alarm.setMarker());
m_ui->cbxMessageWindow->setChecked(alarm.messageWindow());
@@ -169,7 +169,7 @@ void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig
}
case ProjectDataManagement::EventType_def::FriendlyFire:
{
DEBUG_LOG() << "FriendlyFire zuweisen ";
DEBUG_LOG(m_logger) << "FriendlyFire zuweisen ";
m_ui->cbxFriendlyFire->setChecked(true);
m_ui->cbxSetMarker->setChecked(alarm.setMarker());
m_ui->cbxMessageWindow->setChecked(alarm.messageWindow());
@@ -183,7 +183,7 @@ void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig
}
case ProjectDataManagement::EventType_def::Manipulation:
{
DEBUG_LOG() << "Manipulation zuweisen ";
DEBUG_LOG(m_logger) << "Manipulation zuweisen ";
m_ui->cbxManipulation->setChecked(true);
m_ui->cbxSetMarker->setChecked(alarm.setMarker());
m_ui->cbxMessageWindow->setChecked(alarm.messageWindow());
@@ -191,7 +191,7 @@ void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig
}
case ProjectDataManagement::EventType_def::CrossGlobalBorderline:
{
DEBUG_LOG() << "CrossGlobalBorderline zuweisen ";
DEBUG_LOG(m_logger) << "CrossGlobalBorderline zuweisen ";
m_ui->cbxGlobalBorderLine->setChecked(true);
m_ui->cbxSetMarker->setChecked(alarm.setMarker());
m_ui->cbxMessageWindow->setChecked(alarm.messageWindow());
@@ -199,7 +199,7 @@ void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig
}
case ProjectDataManagement::EventType_def::CrossLocalBorderline:
{
DEBUG_LOG() << "CrossLocalBorderline zuweisen ";
DEBUG_LOG(m_logger) << "CrossLocalBorderline zuweisen ";
m_ui->cbxLocalBorderLine->setChecked(true);
m_ui->cbxSetMarker->setChecked(alarm.setMarker());
m_ui->cbxMessageWindow->setChecked(alarm.messageWindow());
@@ -207,7 +207,7 @@ void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig
}
default:
{
ERROR_LOG() << "Not possible to set with Operator App!!!";
ERROR_LOG(m_logger) << "Not possible to set with Operator App!!!";
}
}
}
@@ -215,7 +215,7 @@ void ConfigParticipantsDialog::setAlaramData(const AlarmManagement::AlarmConfig
std::vector<AlarmManagement::AlarmAction> ConfigParticipantsDialog::getCheckedValues() const
{
AlarmManagement::AlarmAction alarmActionDds;
DEBUG_LOG() << "getCheckedValues";
DEBUG_LOG(m_logger) << "getCheckedValues";
std::vector<AlarmManagement::AlarmAction> alarmsDds;
@@ -289,7 +289,7 @@ std::vector<AlarmManagement::AlarmAction> ConfigParticipantsDialog::getCheckedVa
bool ConfigParticipantsDialog::apply()
{
DEBUG_LOG() << "apply";
DEBUG_LOG(m_logger) << "apply";
AlarmManagement::ConfigureAlarmsRequest req;
req.participantIds(m_participantVector);
req.alarms(getCheckedValues());
@@ -35,6 +35,8 @@ public:
const std::vector<int> &equipmentVector);
protected:
NGL::INGLLogger &m_logger;
void onConfigureAlarmsReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
private:
@@ -112,7 +112,7 @@ bool ParticipantsDialog::init(LtsSession::LtsSession *session,
void ParticipantsDialog::onSelectionChanged()
{
bool configureAlarms = false;
DEBUG_LOG() << "onSelectionChanged";
DEBUG_LOG(m_logger) << "onSelectionChanged";
const QModelIndexList currentlySelectedParticipants = m_ui->dvParticipants->selectedRows();
for (const QModelIndex &index : currentlySelectedParticipants)
@@ -121,7 +121,7 @@ void ParticipantsDialog::onSelectionChanged()
if ((data.equipmentNumber().is_set() && data.equipmentNumber().get() > 0) ||
m_ppmDtc->type(data.typeId()).typeClass() == ParticipantManagement::TypeClass_def::Unit)
configureAlarms = true;
DEBUG_LOG() << "setChildrenSelected row =" << index.row() << " column=" << index.column();
DEBUG_LOG(m_logger) << "setChildrenSelected row =" << index.row() << " column=" << index.column();
}
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Edit, configureAlarms);
@@ -141,7 +141,7 @@ void ParticipantsDialog::onCbPartyChanged()
void ParticipantsDialog::onAddButtonClicked()
{
DEBUG_LOG() << "onAddButtonClicked";
DEBUG_LOG(m_logger) << "onAddButtonClicked";
m_participantVector.clear();
m_equipmentVector.clear();
@@ -151,14 +151,14 @@ void ParticipantsDialog::onAddButtonClicked()
for (const QModelIndex &index : currentlySelectedParticipants)
{
DEBUG_LOG() << "setChildrenSelected: " << index.row() << " column=" << index.column();
DEBUG_LOG(m_logger) << "setChildrenSelected: " << index.row() << " column=" << index.column();
setChildrenSelected(index);
}
}
QModelIndex participantIndex = m_ui->dvParticipants->currentIndex();
ParticipantManagement::ParticipantData data = m_participantModel->getParticipantData(participantIndex);
DEBUG_LOG() << "current participantId = " << data.id();
DEBUG_LOG(m_logger) << "current participantId = " << data.id();
m_participantVector.push_back(data.id());
const auto partData = m_participantModel->getParticipantData(participantIndex);
@@ -186,16 +186,16 @@ void ParticipantsDialog::setChildrenSelected(const QModelIndex &parent)
if (m_participantModel->hasChildren(childIndex))
setChildrenSelected(childIndex);
DEBUG_LOG() << "Setting row "
DEBUG_LOG(m_logger) << "Setting row "
<< childIndex.row()
<< " selected";
ParticipantManagement::ParticipantData data = m_participantModel->getParticipantData(childIndex);
DEBUG_LOG() << "append participantId = " << data.id();
DEBUG_LOG(m_logger) << "append participantId = " << data.id();
m_participantVector.push_back(data.id());
if (data.equipmentNumber().is_set())
{
DEBUG_LOG() << "append equipmentNumber = " << data.equipmentNumber().get();
DEBUG_LOG(m_logger) << "append equipmentNumber = " << data.equipmentNumber().get();
m_equipmentVector.push_back(data.equipmentNumber().get());
}
@@ -211,7 +211,7 @@ void ParticipantsDialog::tableColumnOrganiserSetting()
void ParticipantsDialog::onConfigureAlarmsReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG() << "onConfigureAlarmsReply" << replyObject.str();
DEBUG_LOG(m_logger) << "onConfigureAlarmsReply" << replyObject.str();
m_requestHelper->requestReply(replyObject);
}
@@ -220,7 +220,7 @@ void ParticipantsDialog::onDoubleClicked()
if (!m_buttonBox->isButtonEnabled(LtsWidgets::DialogButton::Edit))
return;
DEBUG_LOG() << "onDoubleClicked";
DEBUG_LOG(m_logger) << "onDoubleClicked";
onAddButtonClicked();
}
@@ -45,6 +45,8 @@ public:
const std::shared_ptr<ParticipantManagement::ForeignGuiComboboxInterface> &ppmGuiCbxIfc);
protected:
NGL::INGLLogger &m_logger;
void onConfigureAlarmsReply(const Core::FunctionReplyObject &replyObject) override final;
private slots:
@@ -19,7 +19,7 @@ ParticipantAlarmModel::ParticipantAlarmModel(QObject *parent,
{
m_titles += tr("Alarm Assignable");
DEBUG_LOG() << "ParticipantAlarmModel::ParticipantAlarmModel";
DEBUG_LOG(m_logger) << "ParticipantAlarmModel::ParticipantAlarmModel";
}
QVariant ParticipantAlarmModel::data(const QModelIndex &index, int role) const
@@ -42,7 +42,7 @@ void ParticipantAlarmModel::onParticipantChanged(const ParticipantManagement::Pa
if (data.partyId() != partyId())
return;
INFO_LOG() << "onParticipantChanged isSimulated=" << data.isSimulated();
INFO_LOG(m_logger) << "onParticipantChanged isSimulated=" << data.isSimulated();
onReinitModel(partyId());
emit newData();
}
@@ -56,7 +56,7 @@ bool ParticipantAlarmModel::isSelectableByAlarm(const QModelIndex &index, bool *
m_dtc->type(data.typeId()).typeClass() == ParticipantManagement::TypeClass_def::Unit)
isSimulatable = true;
DEBUG_LOG() << "ParticipantId: " << data.id()
DEBUG_LOG(m_logger) << "ParticipantId: " << data.id()
<< " isSimulated:" << data.isSimulated()
<< " equipmentNo:" << data.equipmentNumber()
<< " typeId=" << data.typeId()
@@ -21,6 +21,8 @@ signals:
void newData();
private:
NGL::INGLLogger &m_logger;
void onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType);
bool isSelectableByAlarm(const QModelIndex &index, bool *bIsSimulated = nullptr) const;
};
@@ -23,7 +23,7 @@ ParticipantShowConfigView::ParticipantShowConfigView(LtsSession::LtsSession *ses
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(AlarmManagement::getLogger("ParticipantShowConfigView"))
{
DEBUG_LOG() << "--- ParticipantShowConfigView Konstruktor() ";
DEBUG_LOG(m_logger) << "--- ParticipantShowConfigView Konstruktor() ";
m_ui->setupUi(this);
m_ui->widget->setSelectionMode(QAbstractItemView::SingleSelection);
@@ -47,7 +47,7 @@ ParticipantShowConfigView::ParticipantShowConfigView(LtsSession::LtsSession *ses
ParticipantShowConfigView::~ParticipantShowConfigView()
{
INFO_LOG() << "--- ParticipantShowConfigView Destruktor() ";
INFO_LOG(m_logger) << "--- ParticipantShowConfigView Destruktor() ";
delete m_ui;
}
@@ -62,7 +62,7 @@ bool ParticipantShowConfigView::init(const std::shared_ptr<AlarmManagement::Inte
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc,
const std::shared_ptr<AreaEffectSimulation::Interface::Dtc> &aesDtc)
{
INFO_LOG() << "--- init() ";
INFO_LOG(m_logger) << "--- init() ";
if (!dtc || !ftc)
return false;
@@ -71,7 +71,7 @@ bool ParticipantShowConfigView::init(const std::shared_ptr<AlarmManagement::Inte
m_alarmHistoryModel = new AlarmManagement::AlarmHistoryModel(this);
m_alarmHistoryModel->initModel(dtc, ppmDtc, aesDtc);
DEBUG_LOG() << "--- ParticipantShowConfigView::init ";
DEBUG_LOG(m_logger) << "--- ParticipantShowConfigView::init ";
m_configAlarmModel = new AlarmManagement::ConfigAlarmModel(this);
m_configAlarmModel->initModel(m_dtc, ppmDtc, m_alarmHistoryModel, false);
m_ui->widget->setModel(m_configAlarmModel);
@@ -92,7 +92,7 @@ void ParticipantShowConfigView::onSelectionChanged()
void ParticipantShowConfigView::onConfigureAlarmsReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG()<<"onConfigureAlarmsReply"<<replyObject.str();
DEBUG_LOG(m_logger)<<"onConfigureAlarmsReply"<<replyObject.str();
m_requestHelper->requestReply(replyObject);
}
@@ -104,14 +104,14 @@ void ParticipantShowConfigView::tableColumnOrganiserSetting()
void ParticipantShowConfigView::onShowAlarm()
{
INFO_LOG() << "--- onShowAlarm() ";
INFO_LOG(m_logger) << "--- onShowAlarm() ";
}
void ParticipantShowConfigView::onRemoveAlarm()
{
DEBUG_LOG() << "onRemoveAlarm"
DEBUG_LOG(m_logger) << "onRemoveAlarm"
<< " id = "<< m_configAlarmModel->getRowData(m_ui->widget->currentIndex().row()).id()
<< " eventTypeId = "<< m_configAlarmModel->getRowData(m_ui->widget->currentIndex().row()).eventTypeId()
<< " operatorId = "<< m_configAlarmModel->getRowData(m_ui->widget->currentIndex().row()).operatorId()
@@ -42,6 +42,8 @@ private Q_SLOTS:
void onPrint();
protected:
NGL::INGLLogger &m_logger;
void onConfigureAlarmsReply(const Core::FunctionReplyObject &replyObject) override final;
private:
@@ -41,9 +41,9 @@ bool EmergencyCallDialog::init(const std::shared_ptr<AlarmManagement::Interface:
const std::shared_ptr<OperatorManagement::Interface::Dtc> &opmDtc,
LtsSession::LtsSession *session)
{
TRACE_LOG() << Q_FUNC_INFO << " START ";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START ";
if (!ftc || !dtc || !session){
ERROR_LOG()<<" init Emergency call dialog failed !!";
ERROR_LOG(m_logger)<<" init Emergency call dialog failed !!";
return false;
}
@@ -99,8 +99,8 @@ bool EmergencyCallDialog::init(const std::shared_ptr<AlarmManagement::Interface:
m_ui->emergencyCallView->hideColumn(EmergencyCallModel::EXPIRED);
#endif
INFO_LOG() << "EmergencyCallDialog::init done";
TRACE_LOG() << Q_FUNC_INFO << " END";
INFO_LOG(m_logger) << "EmergencyCallDialog::init done";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
return true;
}
@@ -172,14 +172,14 @@ void EmergencyCallDialog::setAcknowledgeUi()
void EmergencyCallDialog::onEditBtCliked()
{
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
const AlmEmergencyCall &sos = getSelectedSOS();
if (sos.id() <= 0)
return;
setAcknowledgeUi();
TRACE_LOG() << Q_FUNC_INFO << " END";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
}
@@ -222,7 +222,7 @@ void EmergencyCallDialog::onEmergencyIndexDoubleClicked(const QModelIndex &index
void EmergencyCallDialog::sendAcknowledgeEmergency(const QString &comment)
{
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
const AlmEmergencyCall &sos = getSelectedSOS();
if (sos.id() <= 0 || sos.expired())
@@ -243,7 +243,7 @@ void EmergencyCallDialog::sendAcknowledgeEmergency(const QString &comment)
});
enaDisa();
TRACE_LOG() << Q_FUNC_INFO << " END";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
}
void EmergencyCallDialog::tableColumnOrganiserSetting()
@@ -71,10 +71,10 @@ bool EmergencyCallInfoDialog::init(const std::shared_ptr<Interface::Ftc> &ftc,
const std::shared_ptr<SituationMap::ForeignGuiInterface> &sitMapGuiIfc,
const std::shared_ptr<OperatorManagement::Interface::Dtc>&opmDtc)
{
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
if (!ftc || !dtc)
{
ERROR_LOG()<<" init Emergency call Info dialog failed !!";
ERROR_LOG(m_logger)<<" init Emergency call Info dialog failed !!";
return false;
}
@@ -94,7 +94,7 @@ bool EmergencyCallInfoDialog::init(const std::shared_ptr<Interface::Ftc> &ftc,
connect(m_ui->pbAckEmergency, &QPushButton::clicked, this, &EmergencyCallInfoDialog::onPbAckEmergencyClicked );
connect(m_ui->pbEmergencyCallFindOnMap, &QPushButton::clicked, this, &EmergencyCallInfoDialog::onFindEmergencyOnMap);
TRACE_LOG() << Q_FUNC_INFO << " END";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
return true;
}
@@ -109,10 +109,10 @@ QString EmergencyCallInfoDialog::emergencyIdentifier() const
bool EmergencyCallInfoDialog::setUiValues()
{
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
if (!m_dtc || !m_ftc || m_emergency.id() < 0)
{
ERROR_LOG()<<" >> unabled to init EmergencyCallInfoDialog";
ERROR_LOG(m_logger)<<" >> unabled to init EmergencyCallInfoDialog";
return false;
}
@@ -133,7 +133,7 @@ bool EmergencyCallInfoDialog::setUiValues()
QPixmap iconPixmap = QPixmap::fromImage(renderEmergencySymbol(m_emergency.expired()));
m_ui->lblIcon->setPixmap(iconPixmap);
TRACE_LOG() << Q_FUNC_INFO << " END";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
return true;
}
@@ -141,7 +141,7 @@ bool EmergencyCallInfoDialog::setUiValues()
void EmergencyCallInfoDialog::onEmergencyCallChanged(AlarmManagement::AlmEmergencyCall data, DataModification modType)
{
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
if (data.id() != m_emergency.id() || data.id() == 0)
return;
@@ -157,7 +157,7 @@ void EmergencyCallInfoDialog::onEmergencyCallChanged(AlarmManagement::AlmEmergen
setUiValues();
}
TRACE_LOG() << Q_FUNC_INFO << " END";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
}
@@ -171,7 +171,7 @@ void EmergencyCallInfoDialog::onFindEmergencyOnMap()
void EmergencyCallInfoDialog::onPbAckEmergencyClicked()
{
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
LtsWidgets::LtsFramelessDialog *popup = new LtsWidgets::LtsFramelessDialog(this, LtsWidgets::Behaviour::Popup);
LtsWidgets::LtsDialogButtonBox *btnBox = new LtsWidgets::LtsDialogButtonBox(popup);
@@ -203,7 +203,7 @@ void EmergencyCallInfoDialog::onPbAckEmergencyClicked()
popup->setMinimumWidth(350);
popup->show();
le->setFocus();
TRACE_LOG() << Q_FUNC_INFO << " END";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
}
@@ -40,6 +40,7 @@ public:
private slots:
void onAlarmEmergencyCallChanged(const AlarmManagement::AlmEmergencyCall &data, const DataModification modType);
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<AlarmManagement::Interface::Dtc> m_dtc;
std::shared_ptr<OperatorManagement::Interface::Dtc> m_opmDtc;
friend class EmergencyCallProxyModel;