Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+2
@@ -55,6 +55,8 @@ public:
|
||||
void onCallBiteReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
void addLabel(const QString &text, int row, int column, LabelType labelType = LabelType::Normal);
|
||||
int checkArguments(bool available, bool statusOk, qint64 bitValue, int i);
|
||||
|
||||
+1
-1
@@ -346,7 +346,7 @@ void ParticipantConfigDialog::onSelectionChanged()
|
||||
|
||||
for (const QModelIndex &index : currentlySelectedParticipants)
|
||||
{
|
||||
DEBUG_LOG() << "setChildrenSelected row =" << index.row() << " column=" << index.column();
|
||||
DEBUG_LOG(m_logger) << "setChildrenSelected row =" << index.row() << " column=" << index.column();
|
||||
ParticipantManagement::ParticipantData data = m_model->getParticipantData(index);
|
||||
TypeClass tc = m_dtc->type(data.typeId()).typeClass();
|
||||
if (tc != TypeClass::Human && tc != TypeClass::Unit)
|
||||
|
||||
+2
@@ -61,6 +61,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onModifyStateReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
void onInitParticipantReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
void onSendMessageReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
@@ -80,6 +81,7 @@ private slots:
|
||||
void onSelectionChanged();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool apply() override final;
|
||||
void changeLabelText(QLabel *label, int value);
|
||||
|
||||
|
||||
+5
-5
@@ -370,7 +370,7 @@ bool ParticipantConfigModel::canDropMimeData(const QMimeData *data,
|
||||
if (!isUnitType(parentItem->participant.typeId()))
|
||||
return false;
|
||||
|
||||
DEBUG_LOG() << "can drop on " << row << ", " << column << ", parent: "
|
||||
DEBUG_LOG(m_logger) << "can drop on " << row << ", " << column << ", parent: "
|
||||
<< parent.row() << "," << parent.column() << ", " << parent.isValid()
|
||||
<< ", action: " << action;
|
||||
|
||||
@@ -399,7 +399,7 @@ bool ParticipantConfigModel::canDropMimeData(const QMimeData *data,
|
||||
|
||||
if (idSource != 0 && isParentOf(parentItem, idSource))
|
||||
{
|
||||
DEBUG_LOG() << "isParentOf() for idSource: " << idSource << " is true - no drop";
|
||||
DEBUG_LOG(m_logger) << "isParentOf() for idSource: " << idSource << " is true - no drop";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -759,7 +759,7 @@ void ParticipantConfigModel::insertChildrenOf(int parentId,
|
||||
auto it = tmap.constFind(childId);
|
||||
if (it == tmap.constEnd())
|
||||
{
|
||||
WARNING_LOG() << "Can not find participant with id " << childId << " - ignoring";
|
||||
WARNING_LOG(m_logger) << "Can not find participant with id " << childId << " - ignoring";
|
||||
continue;
|
||||
}
|
||||
const ParticipantData &data = it.value();
|
||||
@@ -784,7 +784,7 @@ void ParticipantConfigModel::insertChildrenOf(int parentId,
|
||||
childItem->participant = data;
|
||||
childItem->bIsChecked = isChecked(checkedParticipants.contains(data.id()), cs);
|
||||
|
||||
DEBUG_LOG() << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
|
||||
DEBUG_LOG(m_logger) << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
|
||||
<< ") to parent " << parent << " at pos " << insertPos;
|
||||
insertRow(insertPos, parentIdx, childItem);
|
||||
tryRenderSymbol(QString::fromStdString(data.symbol()), childItem);
|
||||
@@ -1074,7 +1074,7 @@ void ParticipantConfigModel::onParticipantChanged(const ParticipantManagement::P
|
||||
|
||||
CheckedTreeItem *childItem = static_cast<CheckedTreeItem *>(createItem(QVariant(), QIcon()));
|
||||
childItem->participant = m_dtc->convertParticipantToParticipantData(data);
|
||||
DEBUG_LOG() << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
|
||||
DEBUG_LOG(m_logger) << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
|
||||
<< ") to parent " << ctiParent << " at pos " << insertPos;
|
||||
insertRow(insertPos, indexFromItem(ctiParent), childItem);
|
||||
tryRenderSymbol(QString::fromStdString(data.symbol()), childItem);
|
||||
|
||||
+4
@@ -103,6 +103,7 @@ public:
|
||||
QString getHierarchyFromIndex(const QModelIndex &index) const;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void gatherParticipants(QHash<int, ParticipantData> &tmap,
|
||||
QHash<int, QSet<int>> &parentId2id) const;
|
||||
|
||||
@@ -151,6 +152,7 @@ signals:
|
||||
void internalDataChanged();
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_partyId;
|
||||
bool m_bRowsAreCheckable;
|
||||
bool m_bUnitsSelectable;
|
||||
@@ -178,6 +180,7 @@ public:
|
||||
int partyId() const { return m_sourceModel ? m_sourceModel->partyId() : -1; }
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override;
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
|
||||
|
||||
@@ -251,6 +254,7 @@ public:
|
||||
SortData sortData() const { return m_sortData; }
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override;
|
||||
bool filterAcceptsColumn(int source_column, const QModelIndex &source_parent) const override;
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
|
||||
|
||||
+11
-11
@@ -55,7 +55,7 @@ bool ParticipantFollowDialog::init(LtsSession::LtsSession *session,
|
||||
const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
const std::shared_ptr<ForeignParticipantInfoGuiInterface> &ppmGuiIfc)
|
||||
{
|
||||
DEBUG_LOG() << "ParticipantFollowDialog::init";
|
||||
DEBUG_LOG(m_logger) << "ParticipantFollowDialog::init";
|
||||
m_dtc = dtc;
|
||||
m_ppmGuiIfc = ppmGuiIfc;
|
||||
enadisa();
|
||||
@@ -227,7 +227,7 @@ void ParticipantFollowDialog::onDoubleClicked()
|
||||
m_followParticipantId = data.id();
|
||||
m_followEquipmentNo = getEquipmentNumber(m_followParticipantId);
|
||||
enadisa();
|
||||
DEBUG_LOG() << "onDoubleClicked follow Participant Id =" << m_followParticipantId
|
||||
DEBUG_LOG(m_logger) << "onDoubleClicked follow Participant Id =" << m_followParticipantId
|
||||
<< " m_followEquipmentNo=" << m_followEquipmentNo;
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ void ParticipantFollowDialog::fillParticipantMapFromTree(const QModelIndex &pare
|
||||
|
||||
int ParticipantFollowDialog::getEquipmentNumber(const int participantId)
|
||||
{
|
||||
DEBUG_LOG() << "getEquipmentNumber(" << participantId << ")";
|
||||
DEBUG_LOG(m_logger) << "getEquipmentNumber(" << participantId << ")";
|
||||
int equipmentNumber = 0;
|
||||
|
||||
QMapIterator<int, int> iter(m_participantMap);
|
||||
@@ -345,10 +345,10 @@ int ParticipantFollowDialog::getEquipmentNumber(const int participantId)
|
||||
while (iter.hasNext())
|
||||
{
|
||||
iter.next();
|
||||
DEBUG_LOG() << iter.key() << " : " << iter.value();
|
||||
DEBUG_LOG(m_logger) << iter.key() << " : " << iter.value();
|
||||
if (iter.value() == participantId)
|
||||
{
|
||||
DEBUG_LOG() << "return: " << iter.key();
|
||||
DEBUG_LOG(m_logger) << "return: " << iter.key();
|
||||
return (iter.key());
|
||||
}
|
||||
}
|
||||
@@ -358,13 +358,13 @@ int ParticipantFollowDialog::getEquipmentNumber(const int participantId)
|
||||
void ParticipantFollowDialog::onStartFollowClicked()
|
||||
{
|
||||
int participantId = m_participantMap.value(m_equipNo);
|
||||
DEBUG_LOG() << "Follow Participant id=" << participantId << " on Map";
|
||||
DEBUG_LOG(m_logger) << "Follow Participant id=" << participantId << " on Map";
|
||||
|
||||
if (!m_ui->cbAll->isChecked())
|
||||
onDoubleClicked();
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "Start Follow Participant id=" << participantId << " on Map";
|
||||
DEBUG_LOG(m_logger) << "Start Follow Participant id=" << participantId << " on Map";
|
||||
m_followParticipantId = participantId;
|
||||
m_followEquipmentNo = m_equipNo;
|
||||
}
|
||||
@@ -373,7 +373,7 @@ void ParticipantFollowDialog::onStartFollowClicked()
|
||||
|
||||
void ParticipantFollowDialog::onStopFollowClicked()
|
||||
{
|
||||
DEBUG_LOG() << "Stop Follow Participant id=" << m_followParticipantId << " on Map";
|
||||
DEBUG_LOG(m_logger) << "Stop Follow Participant id=" << m_followParticipantId << " on Map";
|
||||
m_followParticipantId = 0;
|
||||
m_followEquipmentNo = 0;
|
||||
enadisa();
|
||||
@@ -408,9 +408,9 @@ void ParticipantFollowDialog::enadisa()
|
||||
labelText.append(QStringLiteral(")"));
|
||||
}
|
||||
m_ui->lbFollow->setText(labelText);
|
||||
DEBUG_LOG() << "labelText=" << labelText;
|
||||
DEBUG_LOG() << " m_ui->lbFollow->getText()" << m_ui->lbFollow->text();
|
||||
DEBUG_LOG() << "newFollowEquipment(" << m_followEquipmentNo << ", "
|
||||
DEBUG_LOG(m_logger) << "labelText=" << labelText;
|
||||
DEBUG_LOG(m_logger) << " m_ui->lbFollow->getText()" << m_ui->lbFollow->text();
|
||||
DEBUG_LOG(m_logger) << "newFollowEquipment(" << m_followEquipmentNo << ", "
|
||||
<< m_followParticipantId << ")";
|
||||
emit newFollowEquipment(m_followEquipmentNo,m_followParticipantId );
|
||||
}
|
||||
|
||||
+3
-3
@@ -64,13 +64,13 @@ bool ParticipantGearRestock::init(LtsSession::LtsSession *session, bool showAllO
|
||||
|
||||
if (!m_pdmDtc->canRestock(m_gearTypeId) && m_dialogMode == DialogMode::DM_Restock)
|
||||
{
|
||||
WARNING_LOG() << "Not possible to restock gearTypeId = " << m_gearTypeId;
|
||||
WARNING_LOG(m_logger) << "Not possible to restock gearTypeId = " << m_gearTypeId;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_pdmDtc->canSetDefaults(m_gearTypeId) && m_dialogMode == DialogMode::DM_SetRestockDefaults)
|
||||
{
|
||||
WARNING_LOG() << "Not possible to set restock defaults gearTypeId = " << m_gearTypeId;
|
||||
WARNING_LOG(m_logger) << "Not possible to set restock defaults gearTypeId = " << m_gearTypeId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ bool ParticipantGearRestock::init(LtsSession::LtsSession *session, bool showAllO
|
||||
int chargeTypeId = gearType2ChargeType.chargeTypeId();
|
||||
int maxCharge = m_pdmDtc->maxCharge(m_gearTypeId, chargeTypeId);
|
||||
|
||||
DEBUG_LOG() << "maxCharge = " << maxCharge;
|
||||
DEBUG_LOG(m_logger) << "maxCharge = " << maxCharge;
|
||||
|
||||
ParticipantGearRestockCharge* pgrc = new ParticipantGearRestockCharge(m_ui->scrollArea, showAllOptions);
|
||||
pgrc->init(chargeTypeId, m_pdmDtc->trChargeTypeShortName(chargeTypeId, true), m_pdmDtc->factoryDefault(m_gearTypeId, chargeTypeId), maxCharge);
|
||||
|
||||
+2
@@ -47,6 +47,7 @@ public:
|
||||
bool init(LtsSession::LtsSession *session, bool showAllOptions = false);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
bool apply() override final;
|
||||
void onSelectiveReammunitionReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
@@ -55,6 +56,7 @@ private slots:
|
||||
void validate(int newVal);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
LtsSession::LtsSession *m_session;
|
||||
|
||||
|
||||
+2
@@ -36,6 +36,8 @@ public:
|
||||
const std::shared_ptr<AreaEffectSimulation::Interface::Dtc> &aesDtc);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
|
||||
int m_ddsId;
|
||||
|
||||
+2
@@ -43,6 +43,8 @@ private Q_SLOTS:
|
||||
void onDynamicParticipantDataChanged(const DynamicParticipantData &data, DataModification modType);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void reinitModel(const std::vector<StateInformation> &newData);
|
||||
QVariant dataInternal(const QModelIndex &index) const;
|
||||
|
||||
|
||||
+3
-3
@@ -69,7 +69,7 @@ bool HitLineInfoDialog::init(const std::shared_ptr<ParticipantManagement::Interf
|
||||
{
|
||||
if (data.id() == m_hitLineId)
|
||||
{
|
||||
DEBUG_LOG() << "Found HitLine Id: " << data.id();
|
||||
DEBUG_LOG(m_logger) << "Found HitLine Id: " << data.id();
|
||||
m_hitLineInfo = data;
|
||||
|
||||
|
||||
@@ -81,14 +81,14 @@ bool HitLineInfoDialog::init(const std::shared_ptr<ParticipantManagement::Interf
|
||||
});
|
||||
|
||||
if (!m_isInitialized)
|
||||
WARNING_LOG() << "Non HitLineInfo data found for id: " << m_hitLineId;
|
||||
WARNING_LOG(m_logger) << "Non HitLineInfo data found for id: " << m_hitLineId;
|
||||
return m_isInitialized;
|
||||
}
|
||||
|
||||
|
||||
void HitLineInfoDialog::showHitLineInfos()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " id:" << m_hitLineId;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " id:" << m_hitLineId;
|
||||
|
||||
if (m_participantOriginator.id() <= 0 || m_participantInjury.id() <= 0)
|
||||
return;
|
||||
|
||||
+2
@@ -41,6 +41,8 @@ public:
|
||||
const std::shared_ptr<SituationMap::ForeignGuiInterface> &sitMapGuiIfc);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
void showHitLineInfos();
|
||||
void findOnMap(int id);
|
||||
|
||||
+32
-32
@@ -144,7 +144,7 @@ bool ParticipantInfoDialog::init(LtsSession::LtsSession *session,
|
||||
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface> &asbInterface,
|
||||
const std::shared_ptr<ForeignParticipantInfoGuiInterface> &ppmGuiIfc)
|
||||
{
|
||||
DEBUG_LOG()<< "ParticipantInfoDialog::init";
|
||||
DEBUG_LOG(m_logger)<< "ParticipantInfoDialog::init";
|
||||
m_session = session;
|
||||
m_dtc = dtc;
|
||||
m_ftc = ftc;
|
||||
@@ -187,7 +187,7 @@ bool ParticipantInfoDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
});
|
||||
|
||||
DEBUG_LOG()<< "Vor setUiValues";
|
||||
DEBUG_LOG(m_logger)<< "Vor setUiValues";
|
||||
return setUiValues();
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ bool ParticipantInfoDialog::setUiValues()
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG() << "------------------setUiValues-----------------";
|
||||
DEBUG_LOG(m_logger) << "------------------setUiValues-----------------";
|
||||
|
||||
if (!m_dtc || !m_ftc || m_participant.id() < 0)
|
||||
return false;
|
||||
@@ -224,7 +224,7 @@ bool ParticipantInfoDialog::setUiValues()
|
||||
|
||||
|
||||
const bool isUas = m_dtc->isTypeUas(participantData.typeId());
|
||||
DEBUG_LOG() << "------------------UAS-----------------"
|
||||
DEBUG_LOG(m_logger) << "------------------UAS-----------------"
|
||||
<< " isTypeUas" << isUas
|
||||
<< " participantId=" <<participantData.id()
|
||||
<< " typeId=" << participantData.typeId();
|
||||
@@ -348,7 +348,7 @@ bool ParticipantInfoDialog::setUiValues()
|
||||
}
|
||||
case TypeClass::Vessel:
|
||||
case TypeClass::Unknown:
|
||||
ERROR_LOG() << Q_FUNC_INFO << m_typeClass;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << m_typeClass;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ bool ParticipantInfoDialog::setUiValues()
|
||||
setOnlineHelpFilename(QStringLiteral("Info_Dialog-Unit"));
|
||||
break;
|
||||
case TypeClass::Unknown:
|
||||
ERROR_LOG() << Q_FUNC_INFO << m_typeClass;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << m_typeClass;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -520,7 +520,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
|
||||
youngestState.stateTime(0);
|
||||
for (const StateInformation &si : history)
|
||||
{
|
||||
DEBUG_LOG() << "StateInformation "
|
||||
DEBUG_LOG(m_logger) << "StateInformation "
|
||||
<< " time=" << si.stateTime()
|
||||
<< " vulnerabilityBits=" << si.vulnerabilityBits()
|
||||
<< " vulnerabilityKindId=" << si.vulnerabilityKindId();
|
||||
@@ -533,7 +533,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
|
||||
|
||||
m_ui->lblStatus->setText(ProjectDataManagement::toString(lastState.vulnerabilityState(), vc));
|
||||
|
||||
DEBUG_LOG()<<" >>> last state: "<<lastState.vitality() << "last kind: " <<lastState.vulnerabilityKindId();
|
||||
DEBUG_LOG(m_logger)<<" >>> last state: "<<lastState.vitality() << "last kind: " <<lastState.vulnerabilityKindId();
|
||||
m_ui->lblVitality->setText(QString::number(lastState.vitality()) + QStringLiteral("%"));
|
||||
|
||||
|
||||
@@ -541,7 +541,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
|
||||
const int BCONTAMINATION = 0x8000;
|
||||
const int CCONTAMINATION = 0x10000;
|
||||
QStringList contaminationList;
|
||||
DEBUG_LOG() << "Set Contamination"
|
||||
DEBUG_LOG(m_logger) << "Set Contamination"
|
||||
<< " time=" << youngestState.stateTime()
|
||||
<< " vulnerabilityKindId=" << youngestState.vulnerabilityKindId()
|
||||
<< " vulnerabilityBits=" << youngestState.vulnerabilityBits()
|
||||
@@ -549,7 +549,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
|
||||
|
||||
if ( youngestState.vulnerabilityBits() & NCONTAMINATION)
|
||||
{
|
||||
DEBUG_LOG() << "append N";
|
||||
DEBUG_LOG(m_logger) << "append N";
|
||||
|
||||
const ProjectDataManagement::VulnerabilityState vs(static_cast<ProjectDataManagement::VulnerabilityState_def::type>(14));
|
||||
QString fullName = ProjectDataManagement::toString(vs);
|
||||
@@ -560,7 +560,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
|
||||
}
|
||||
if ( youngestState.vulnerabilityBits() & BCONTAMINATION)
|
||||
{
|
||||
DEBUG_LOG() << "append B";
|
||||
DEBUG_LOG(m_logger) << "append B";
|
||||
|
||||
const ProjectDataManagement::VulnerabilityState vs(static_cast<ProjectDataManagement::VulnerabilityState_def::type>(15));
|
||||
QString fullName = ProjectDataManagement::toString(vs);
|
||||
@@ -571,7 +571,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
|
||||
}
|
||||
if ( youngestState.vulnerabilityBits() & CCONTAMINATION)
|
||||
{
|
||||
DEBUG_LOG() << "append C";
|
||||
DEBUG_LOG(m_logger) << "append C";
|
||||
|
||||
const ProjectDataManagement::VulnerabilityState vs(static_cast<ProjectDataManagement::VulnerabilityState_def::type>(16));
|
||||
QString fullName = ProjectDataManagement::toString(vs);
|
||||
@@ -615,7 +615,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
|
||||
m_ui->lbContamination->setHidden(contaminationListIsEmpty);
|
||||
m_ui->lblContamination->setHidden(contaminationListIsEmpty);
|
||||
|
||||
DEBUG_LOG()<< "setBackgroundColor ="<< data.manipulation().size();
|
||||
DEBUG_LOG(m_logger)<< "setBackgroundColor ="<< data.manipulation().size();
|
||||
setBackgroundColor(m_ui->lblEquipNr, Qt::red, data.manipulation().size());
|
||||
|
||||
|
||||
@@ -791,11 +791,11 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
|
||||
{
|
||||
m_ui->twGear->hide();
|
||||
}
|
||||
DEBUG_LOG() << "### m_sanMatStock: " << m_sanMatStock.size();
|
||||
DEBUG_LOG(m_logger) << "### m_sanMatStock: " << m_sanMatStock.size();
|
||||
|
||||
DEBUG_LOG() << "### data.sanitationMaterialStock(): " << data.sanitationMaterialStock().size();
|
||||
DEBUG_LOG() << "### data.participantId(): " << data.participantId();
|
||||
DEBUG_LOG() << "### data.sampleTime(): " << data.sampleTime();
|
||||
DEBUG_LOG(m_logger) << "### data.sanitationMaterialStock(): " << data.sanitationMaterialStock().size();
|
||||
DEBUG_LOG(m_logger) << "### data.participantId(): " << data.participantId();
|
||||
DEBUG_LOG(m_logger) << "### data.sampleTime(): " << data.sampleTime();
|
||||
|
||||
|
||||
if (data.sanitationMaterialStock().size() == 0)
|
||||
@@ -806,8 +806,8 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
|
||||
}
|
||||
else if (data.sanitationMaterialStock() != m_sanMatStock)
|
||||
{
|
||||
DEBUG_LOG() << "### data.qualification(): " << data.qualification();
|
||||
DEBUG_LOG() << "### data.sanitationUniqueId(): " << data.sanitationUniqueId();
|
||||
DEBUG_LOG(m_logger) << "### data.qualification(): " << data.qualification();
|
||||
DEBUG_LOG(m_logger) << "### data.sanitationUniqueId(): " << data.sanitationUniqueId();
|
||||
|
||||
m_ui->gbSanitation->show();
|
||||
m_ui->lblSanAssignState->setText(ParticipantManagement::toString(data.qualification().underlying()));
|
||||
@@ -1008,7 +1008,7 @@ void ParticipantInfoDialog::onPositionChanged(const ParticipantPosition &positio
|
||||
isOpsBuildingSource = true;
|
||||
|
||||
|
||||
DEBUG_LOG() << "reportingSource = OpsBuilding true" ;
|
||||
DEBUG_LOG(m_logger) << "reportingSource = OpsBuilding true" ;
|
||||
setBackgroundColor(m_ui->lblPositionData, Qt::lightGray, isOpsBuildingSource );
|
||||
|
||||
onUpdatePosition(position.participantId(), position.pos(), position.sampleTime());
|
||||
@@ -1214,7 +1214,7 @@ void ParticipantInfoDialog::setSanitationLabelColor(SanitationResult proceduresD
|
||||
case SanitationResult::deprecatedNA:
|
||||
break;
|
||||
}
|
||||
DEBUG_LOG() << "Set Color to: " << proceduresDone.underlying();
|
||||
DEBUG_LOG(m_logger) << "Set Color to: " << proceduresDone.underlying();
|
||||
m_ui->lblKind->setPalette(pal);
|
||||
m_ui->lblKind->setAutoFillBackground(true);
|
||||
m_ui->lblKind->setToolTip(toolTip);
|
||||
@@ -1406,7 +1406,7 @@ void ParticipantInfoDialog::onPartitionTimeChanged(qint64 newPartitionTime)
|
||||
{
|
||||
if (LtsUtils::isPositionTimeOutdated(newPartitionTime, m_lastPositionMSec) )
|
||||
{
|
||||
DEBUG_LOG()<< "setBackgroundColor ="<< LtsUtils::isPositionTimeOutdated(newPartitionTime, m_lastPositionMSec);
|
||||
DEBUG_LOG(m_logger)<< "setBackgroundColor ="<< LtsUtils::isPositionTimeOutdated(newPartitionTime, m_lastPositionMSec);
|
||||
setBackgroundColor(m_ui->lblPositionData, Qt::red, true);
|
||||
}
|
||||
qint64 lastPosSec = (newPartitionTime - m_lastPositionMSec) / 1000;
|
||||
@@ -1502,7 +1502,7 @@ void ParticipantInfoDialog::onTargetConfig()
|
||||
{
|
||||
if (!m_tgtFtc)
|
||||
return;
|
||||
INFO_LOG() << "onTargetConfig send TargetConfigRequest";
|
||||
INFO_LOG(m_logger) << "onTargetConfig send TargetConfigRequest";
|
||||
|
||||
TargetManagement::ConfigureTargetRequest request;
|
||||
|
||||
@@ -1521,7 +1521,7 @@ void ParticipantInfoDialog::onTargetConfigChanged(const TargetManagement::Target
|
||||
{
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
INFO_LOG() << "onTargetConfigChanged participantId = " << m_participant.id()
|
||||
INFO_LOG(m_logger) << "onTargetConfigChanged participantId = " << m_participant.id()
|
||||
<< " data.participantId = " << data.participantId();
|
||||
if (data.participantId() != m_participant.id())
|
||||
return;
|
||||
@@ -1538,7 +1538,7 @@ void ParticipantInfoDialog::onTargetModeChangeed()
|
||||
{
|
||||
if (!m_tgtFtc)
|
||||
return;
|
||||
INFO_LOG() << "onTargetModeChangeed";
|
||||
INFO_LOG(m_logger) << "onTargetModeChangeed";
|
||||
TargetManagement::ConfigureTargetRequest request;
|
||||
|
||||
request.id(0);
|
||||
@@ -1546,7 +1546,7 @@ void ParticipantInfoDialog::onTargetModeChangeed()
|
||||
request.tgtCommand(TargetManagement::TgtCommand_def::SetMode);
|
||||
int modeInt = m_ui->cbTargetMode->currentData().toInt();
|
||||
TargetManagement::Mode mode = static_cast <TargetManagement::Mode_def::type>(modeInt);
|
||||
INFO_LOG() << "onTargetModeChangeed=" << mode;
|
||||
INFO_LOG(m_logger) << "onTargetModeChangeed=" << mode;
|
||||
request.mode(mode);
|
||||
|
||||
auto cb = [request, this]()
|
||||
@@ -1566,7 +1566,7 @@ void ParticipantInfoDialog::onTargetWeaponChanged()
|
||||
request.participantId(m_participant.id());
|
||||
request.tgtCommand(TargetManagement::TgtCommand_def::SetWeapon);
|
||||
request.weapon(m_ui->cbTargetWeapon->currentData().toInt());
|
||||
INFO_LOG() << "onTargetWeaponChangeed = " << request.weapon();
|
||||
INFO_LOG(m_logger) << "onTargetWeaponChangeed = " << request.weapon();
|
||||
|
||||
auto cb = [request, this]()
|
||||
{
|
||||
@@ -1594,8 +1594,8 @@ void ParticipantInfoDialog::onContextMenuRequested(const QPoint &position)
|
||||
|
||||
GearInformation &gear = m_gearList[pointedItem->row()];
|
||||
|
||||
DEBUG_LOG() << "gear type selected = " << gear.gearTypeId();
|
||||
DEBUG_LOG() << "gear Id = " << gear.gearId();
|
||||
DEBUG_LOG(m_logger) << "gear type selected = " << gear.gearTypeId();
|
||||
DEBUG_LOG(m_logger) << "gear Id = " << gear.gearId();
|
||||
|
||||
QList<QAction*> actions;
|
||||
|
||||
@@ -1677,16 +1677,16 @@ void ParticipantInfoDialog::onUnlockUAS()
|
||||
{
|
||||
UAS uas = m_dtc->getUasByParticipantId(m_participant.id(), m_session->exerciseId());
|
||||
m_uasId = uas.id();
|
||||
DEBUG_LOG()<<" -- onUnlockUAS uasId: "<< uas.id() <<" /// participantId: "<<uas.participantId()<<" /// equipmentNumber: "<<m_participant.equipmentNumber();
|
||||
DEBUG_LOG(m_logger)<<" -- onUnlockUAS uasId: "<< uas.id() <<" /// participantId: "<<uas.participantId()<<" /// equipmentNumber: "<<m_participant.equipmentNumber();
|
||||
|
||||
if (uas.id() <= 0 )
|
||||
{
|
||||
ERROR_LOG()<<" -- onUnlockUAS invalid uasId: "<<uas.id()<<" !!!";
|
||||
ERROR_LOG(m_logger)<<" -- onUnlockUAS invalid uasId: "<<uas.id()<<" !!!";
|
||||
return;
|
||||
}
|
||||
if (!m_participant.equipmentNumber().is_set())
|
||||
{
|
||||
ERROR_LOG()<<" -- onUnlockUAS invalid EquipmentNumber for UAS: "<<uas.id()<<" !!!";
|
||||
ERROR_LOG(m_logger)<<" -- onUnlockUAS invalid EquipmentNumber for UAS: "<<uas.id()<<" !!!";
|
||||
return;
|
||||
}
|
||||
ModifyUasStateRequest req;
|
||||
|
||||
+2
@@ -85,6 +85,7 @@ signals:
|
||||
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
bool setUiValues();
|
||||
static void setBackgroundColor(QWidget *w, Qt::GlobalColor color, bool bSetColor);
|
||||
@@ -146,6 +147,7 @@ private Q_SLOTS:
|
||||
void onOpenTargetConfigurationL400();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
Participant m_participant;
|
||||
int m_uasId;
|
||||
qint64 m_lastPositionMSec;
|
||||
|
||||
+7
-8
@@ -11,16 +11,15 @@
|
||||
namespace ParticipantManagement
|
||||
{
|
||||
|
||||
ParticipantInfoLtdGearComponent::ParticipantInfoLtdGearComponent(QTableWidget *tableWidget)
|
||||
: m_tableWidget(tableWidget)
|
||||
{
|
||||
ParticipantInfoLtdGearComponent::ParticipantInfoLtdGearComponent(QTableWidget *tableWidget) : m_tableWidget(tableWidget),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
if (!m_tableWidget)
|
||||
ERROR_LOG() << "Got invalid table widget.";
|
||||
ERROR_LOG(m_logger) << "Got invalid table widget.";
|
||||
}
|
||||
|
||||
void ParticipantInfoLtdGearComponent::updateData(const std::vector<LaserDesignation> &newData)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO;
|
||||
|
||||
if (!m_tableWidget)
|
||||
return;
|
||||
@@ -36,7 +35,7 @@ void ParticipantInfoLtdGearComponent::updateData(const std::vector<LaserDesignat
|
||||
|
||||
void ParticipantInfoLtdGearComponent::addGear(int gearId, int row)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO;
|
||||
|
||||
if (!m_tableWidget)
|
||||
return;
|
||||
@@ -60,7 +59,7 @@ void ParticipantInfoLtdGearComponent::clear()
|
||||
|
||||
void ParticipantInfoLtdGearComponent::updateRow(const LaserDesignation &laserDesignation)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << ": " << laserDesignation;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << ": " << laserDesignation;
|
||||
|
||||
if (!m_rowPerGearId.contains(laserDesignation.gearId()) || !m_rowPerGearId.value(laserDesignation.gearId()).isValid())
|
||||
return;
|
||||
@@ -71,7 +70,7 @@ void ParticipantInfoLtdGearComponent::updateRow(const LaserDesignation &laserDes
|
||||
|
||||
void ParticipantInfoLtdGearComponent::removeOutdatedData(const std::vector<LaserDesignation> &newData)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO;
|
||||
|
||||
if (!m_tableWidget)
|
||||
return;
|
||||
|
||||
+1
@@ -33,6 +33,7 @@ public:
|
||||
|
||||
static const int LTD_ID {1043};
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
struct LtdRow
|
||||
{
|
||||
QTableWidgetItem *chargeType {nullptr} ;
|
||||
|
||||
+5
-5
@@ -52,7 +52,7 @@ void ParticipantInfoTableDialog::retranslate()
|
||||
bool ParticipantInfoTableDialog::init(LtsSession::LtsSession *session,
|
||||
const std::shared_ptr<Interface::Dtc> &dtc)
|
||||
{
|
||||
DEBUG_LOG() << "**** init";
|
||||
DEBUG_LOG(m_logger) << "**** init";
|
||||
|
||||
m_session = session;
|
||||
m_dtc = dtc;
|
||||
@@ -104,7 +104,7 @@ void ParticipantInfoTableDialog::onColumnContextMenu(const QPoint &position)
|
||||
|
||||
void ParticipantInfoTableDialog::onAddClicked()
|
||||
{
|
||||
DEBUG_LOG() << "**** onAddClicked() ";
|
||||
DEBUG_LOG(m_logger) << "**** onAddClicked() ";
|
||||
InfoTableAddDialog *addParticipantsDialog = new InfoTableAddDialog(this);
|
||||
addParticipantsDialog->init(m_session, m_dtc);
|
||||
|
||||
@@ -118,7 +118,7 @@ void ParticipantInfoTableDialog::onAddClicked()
|
||||
|
||||
void ParticipantInfoTableDialog::onRemoveClicked()
|
||||
{
|
||||
DEBUG_LOG() << "**** onRemoveClicked() ";
|
||||
DEBUG_LOG(m_logger) << "**** onRemoveClicked() ";
|
||||
const QModelIndexList selectedRows = m_ui->tvParticipant->selectionModel()->selectedRows();
|
||||
|
||||
if (!selectedRows.count())
|
||||
@@ -138,7 +138,7 @@ void ParticipantInfoTableDialog::onRemoveClicked()
|
||||
void ParticipantInfoTableDialog::onSelectionChanged(const QItemSelection &selected,
|
||||
const QItemSelection &deselected)
|
||||
{
|
||||
DEBUG_LOG() << "onSelectionChanged";
|
||||
DEBUG_LOG(m_logger) << "onSelectionChanged";
|
||||
Q_UNUSED(selected);
|
||||
Q_UNUSED(deselected);
|
||||
|
||||
@@ -148,7 +148,7 @@ void ParticipantInfoTableDialog::onSelectionChanged(const QItemSelection &select
|
||||
|
||||
void ParticipantInfoTableDialog::onShowTlnInfo(const QModelIndex &idx)
|
||||
{
|
||||
DEBUG_LOG() << "onDoubleClick --> showTlnInfo";
|
||||
DEBUG_LOG(m_logger) << "onDoubleClick --> showTlnInfo";
|
||||
QModelIndex realIdx = m_sortFilterProxyModel->mapToSource(idx);
|
||||
|
||||
const int id = m_infoTableModel->getRowData(realIdx.row()).id();
|
||||
|
||||
+2
-2
@@ -42,7 +42,7 @@ bool ParticipantInfoTableModel::initModel(LtsSession::LtsSession *session,
|
||||
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc,
|
||||
bool bWithPositionandBiteResult)
|
||||
{
|
||||
DEBUG_LOG() << "**** initModel";
|
||||
DEBUG_LOG(m_logger) << "**** initModel";
|
||||
|
||||
m_session = session;
|
||||
m_ppmDtc = ppmDtc;
|
||||
@@ -210,7 +210,7 @@ void ParticipantInfoTableModel::updateDataView(const QSet<int> &participantIds)
|
||||
void ParticipantInfoTableModel::onParticipantChanged(const ParticipantManagement::DynamicParticipantData &data,
|
||||
DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "**** participantDataChanged";
|
||||
DEBUG_LOG(m_logger) << "**** participantDataChanged";
|
||||
|
||||
const int row = findRowForId(data.participantId());
|
||||
if (row < 0)
|
||||
|
||||
+1
@@ -74,6 +74,7 @@ protected Q_SLOTS:
|
||||
void onTimeoutCheck();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
ParticipantInfo setInfoData(const ParticipantManagement::Participant &part) const;
|
||||
void fillParticipantContent(ParticipantInfo &info,
|
||||
const DynamicParticipantData &data) const;
|
||||
|
||||
+2
@@ -56,6 +56,8 @@ private slots:
|
||||
void leaveEvent(QEvent *e) override;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
int changeLabelText(int value);
|
||||
void onClicked();
|
||||
|
||||
+7
-7
@@ -175,7 +175,7 @@ void ParticipantSetInjuryDialog::setOldData(const DynamicParticipantData &data)
|
||||
|
||||
int index = m_ui->cbState->findData(lastState.vulnerabilityState().underlying());
|
||||
|
||||
DEBUG_LOG() << "Old vulnerability state = " << index;
|
||||
DEBUG_LOG(m_logger) << "Old vulnerability state = " << index;
|
||||
|
||||
if (index > 0)
|
||||
m_ui->cbState->setCurrentIndex(index);
|
||||
@@ -188,10 +188,10 @@ uint32_t ParticipantSetInjuryDialog::getInjuryBit()
|
||||
|
||||
int side = m_bgSide->button(1)->isEnabled() ? m_bgSide->checkedId() : 0;
|
||||
|
||||
DEBUG_LOG() << "getInjuryBit() -------------- ";
|
||||
DEBUG_LOG() << "Injury = " << m_bgInjury->checkedId();
|
||||
DEBUG_LOG() << "Body = " << m_bgBodypart->checkedId();
|
||||
DEBUG_LOG() << "Side = " << side;
|
||||
DEBUG_LOG(m_logger) << "getInjuryBit() -------------- ";
|
||||
DEBUG_LOG(m_logger) << "Injury = " << m_bgInjury->checkedId();
|
||||
DEBUG_LOG(m_logger) << "Body = " << m_bgBodypart->checkedId();
|
||||
DEBUG_LOG(m_logger) << "Side = " << side;
|
||||
|
||||
return (((((m_bgInjury->checkedId() * 16) + m_bgBodypart->checkedId()) * 4) + side) + 2048);
|
||||
|
||||
@@ -328,8 +328,8 @@ bool ParticipantSetInjuryDialog::apply()
|
||||
req.participantIds({m_participantId});
|
||||
req.vulnerabilityKind(getInjuryBit());
|
||||
|
||||
DEBUG_LOG() << "Saving vulnerability state = " << req.vulnerabilityState();
|
||||
DEBUG_LOG() << "Saving vulnerability kind = " << req.vulnerabilityKind();
|
||||
DEBUG_LOG(m_logger) << "Saving vulnerability state = " << req.vulnerabilityState();
|
||||
DEBUG_LOG(m_logger) << "Saving vulnerability kind = " << req.vulnerabilityKind();
|
||||
|
||||
return m_requestHelper->startSingleRequest([req, this]()
|
||||
{
|
||||
|
||||
+3
@@ -78,6 +78,7 @@ public:
|
||||
~ParticipantSetInjuryDialog();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onModifyStateReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
void retranslate() override;
|
||||
|
||||
@@ -93,9 +94,11 @@ private slots:
|
||||
void resetRadioStates(bool onlySides = false);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool apply() override final;
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_participantId;
|
||||
int m_eqId;
|
||||
LtsSession::LtsSession *m_session;
|
||||
|
||||
+2
-2
@@ -197,8 +197,8 @@ bool ParticipantSetSanitationDialog::apply()
|
||||
sanDat.originatorEquipmentNumber(0);
|
||||
req.data(sanDat);
|
||||
|
||||
DEBUG_LOG() << "Medic treatment: qualification = " << sanDat.qualification();
|
||||
DEBUG_LOG() << "Medic treatment: procedures = " << sanDat.sanitationProceduresTaken();
|
||||
DEBUG_LOG(m_logger) << "Medic treatment: qualification = " << sanDat.qualification();
|
||||
DEBUG_LOG(m_logger) << "Medic treatment: procedures = " << sanDat.sanitationProceduresTaken();
|
||||
|
||||
return m_requestHelper->startSingleRequest([req, this]()
|
||||
{
|
||||
|
||||
+2
@@ -46,6 +46,7 @@ public:
|
||||
private slots:
|
||||
void onQualificationChanged();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void fillCb();
|
||||
void setCbxName();
|
||||
qint64 getProcedures();
|
||||
@@ -56,6 +57,7 @@ private:
|
||||
void onSetSanitationReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
int m_participantId;
|
||||
int m_eqId{-1};
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ parent)
|
||||
bool AreaModel::initModel(const TargetInformation &targetInformation)
|
||||
{
|
||||
|
||||
INFO_LOG() << "initModel - #AreaModel: " << targetInformation.shootbackAreas().size();
|
||||
INFO_LOG(m_logger) << "initModel - #AreaModel: " << targetInformation.shootbackAreas().size();
|
||||
|
||||
for (auto singleArea : std::as_const(targetInformation.shootbackAreas()))
|
||||
onShootbackAreaChanged(singleArea, DataModification::eAdded);
|
||||
@@ -79,7 +79,7 @@ QVariant AreaModel::headerData(int section, Qt::Orientation orientation, int rol
|
||||
|
||||
QVariant AreaModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " role=" << role
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " role=" << role
|
||||
<< " index = " << index.column();
|
||||
|
||||
if (!indexIsValid(index))
|
||||
|
||||
+47
-48
@@ -36,16 +36,16 @@ ParticipantTargetConfigurationDialog::ParticipantTargetConfigurationDialog(QWidg
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_ui(new Ui::ParticipantTargetConfigurationDialog)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_ui->setupUi(this);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
ParticipantTargetConfigurationDialog::~ParticipantTargetConfigurationDialog()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void ParticipantTargetConfigurationDialog::retranslate()
|
||||
@@ -58,14 +58,14 @@ void ParticipantTargetConfigurationDialog::retranslate()
|
||||
|
||||
bool ParticipantTargetConfigurationDialog::apply()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
ModifyTargetInformationRequest req;
|
||||
req.targetInfo(m_targetInformation);
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " update m_targetInformation: " << m_targetInformation;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " update m_targetInformation: " << m_targetInformation;
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return m_requestHelper->startSingleRequest([req, this]()
|
||||
{
|
||||
return m_ftc->modifyTargetInformationRequest(req, this);
|
||||
@@ -77,11 +77,11 @@ bool ParticipantTargetConfigurationDialog::init(int participantId,
|
||||
const std::shared_ptr<Interface::Ftc> &ftc,
|
||||
const std::shared_ptr<SituationMap::ForeignGuiInterface> &sitMapGuiIfc)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_participantId = participantId;
|
||||
if (m_participantId <= 0)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " participant invalid, participantId = " << m_participantId;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " participant invalid, participantId = " << m_participantId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ bool ParticipantTargetConfigurationDialog::init(int participantId,
|
||||
{
|
||||
onTargetInformationChanged(m_targetInformation, DataModification::eAdded);
|
||||
} else {
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " targetInformation not found for participantId = " << m_participantId
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " targetInformation not found for participantId = " << m_participantId
|
||||
<< " - use default.";
|
||||
m_targetInformation.participantId(m_participantId);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ bool ParticipantTargetConfigurationDialog::init(int participantId,
|
||||
|
||||
m_ui->cb_showOnMap->setChecked(true);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -190,8 +190,8 @@ void ParticipantTargetConfigurationDialog::onDynamicParticipantDataChanged(const
|
||||
const ProjectDataManagement::VulnerabilityState_def::type vulStateType = vulState.underlying();
|
||||
|
||||
int idx = m_ui->cb_status->findData(vulStateType);
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " cb_status: vulState=" << vulState;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " cb_status: setCurrentIndex idx=" << idx;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " cb_status: vulState=" << vulState;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " cb_status: setCurrentIndex idx=" << idx;
|
||||
m_ui->cb_status->setCurrentIndex(idx);
|
||||
m_ui->cb_status->setEnabled(true);
|
||||
}
|
||||
@@ -213,7 +213,7 @@ void ParticipantTargetConfigurationDialog::onTargetInformationChanged(const Targ
|
||||
case DataModification::eAdded:
|
||||
case DataModification::eModified:
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " got new targetInformation from dds: " << data;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " got new targetInformation from dds: " << data;
|
||||
m_targetInformation = data;
|
||||
}
|
||||
break;
|
||||
@@ -224,7 +224,7 @@ void ParticipantTargetConfigurationDialog::onTargetInformationChanged(const Targ
|
||||
|
||||
void ParticipantTargetConfigurationDialog::onStatusChanged()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
m_ui->cb_status->setEnabled(false);
|
||||
|
||||
@@ -293,7 +293,7 @@ void ParticipantTargetConfigurationDialog::onStatusChanged()
|
||||
|
||||
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@ bool updateValue(ProjectDataManagement::VulnerabilityState& oldValueRef, Project
|
||||
|
||||
void ParticipantTargetConfigurationDialog::onGuiChanged()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
bool hasChanged = false;
|
||||
@@ -417,26 +417,26 @@ void ParticipantTargetConfigurationDialog::onGuiChanged()
|
||||
hasChanged |= updateValue(m_targetInformation.takedownEffect(), static_cast<ProjectDataManagement::VulnerabilityState_def::type>(m_ui->cb_takeDownEffect->currentData().toInt()) );
|
||||
hasChanged |= updateValue(m_targetInformation.takedownInterval(), m_ui->sb_takeDownInterval->value());
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " hasChanged=" << hasChanged;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " hasChanged=" << hasChanged;
|
||||
|
||||
|
||||
const std::vector<ParticipantManagement::ShootbackArea> &modelAreasStdVec = m_areaModel.getDataStdVector();
|
||||
if (modelAreasStdVec != m_targetInformation.shootbackAreas())
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " hasChanged=" << hasChanged;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " hasChanged=" << hasChanged;
|
||||
hasChanged = true;
|
||||
m_targetInformation.shootbackAreas(modelAreasStdVec);
|
||||
}
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " slotChangesMade sChanged=" << hasChanged;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " slotChangesMade sChanged=" << hasChanged;
|
||||
this->slotChangesMade();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void ParticipantTargetConfigurationDialog::onDataChanged()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, m_targetInformation=" << m_targetInformation;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, m_targetInformation=" << m_targetInformation;
|
||||
|
||||
int idx;
|
||||
|
||||
@@ -461,12 +461,12 @@ void ParticipantTargetConfigurationDialog::onDataChanged()
|
||||
QVector<ShootbackArea> qVec = QVector<ShootbackArea>(areas.begin(), areas.end());
|
||||
m_areaModel.setData(qVec);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void ParticipantTargetConfigurationDialog::onAddBtnClicked()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (!m_sitMapGuiIfc)
|
||||
return;
|
||||
|
||||
@@ -477,7 +477,7 @@ void ParticipantTargetConfigurationDialog::onAddBtnClicked()
|
||||
s_minPoints,
|
||||
s_maxPoints);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
QPolygonF areaToPolygon(const ShootbackArea &area)
|
||||
@@ -506,14 +506,14 @@ QPolygonF areaToPolygon(const ShootbackArea &area)
|
||||
|
||||
void ParticipantTargetConfigurationDialog::onEditBtnClicked()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (!m_sitMapGuiIfc)
|
||||
return;
|
||||
|
||||
const QModelIndex curIdx = m_ui->ltsDataView->currentIndex();
|
||||
if (!curIdx.isValid())
|
||||
return;
|
||||
INFO_LOG() << " edit...";
|
||||
INFO_LOG(m_logger) << " edit...";
|
||||
|
||||
const ShootbackArea &area = m_areaModel.getRowData(curIdx.row());
|
||||
|
||||
@@ -531,24 +531,24 @@ void ParticipantTargetConfigurationDialog::onEditBtnClicked()
|
||||
-1,
|
||||
coordinates);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void ParticipantTargetConfigurationDialog::onRemoveBtnClicked()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
const QModelIndex curIdx = m_ui->ltsDataView->currentIndex();
|
||||
if (!curIdx.isValid())
|
||||
return;
|
||||
INFO_LOG() << " remove...";
|
||||
INFO_LOG(m_logger) << " remove...";
|
||||
|
||||
m_areaModel.removeRow(curIdx.row());
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void ParticipantTargetConfigurationDialog::onShowOnMapChanged(int)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (!m_sitMapGuiIfc)
|
||||
return;
|
||||
@@ -562,7 +562,7 @@ void ParticipantTargetConfigurationDialog::onShowOnMapChanged(int)
|
||||
for (int row = 0; row < rowCount; ++row)
|
||||
{
|
||||
const ShootbackArea ¤tArea = m_areaModel.getRowData(row);
|
||||
INFO_LOG() << " row=" << row << " ; currentArea " << currentArea;
|
||||
INFO_LOG(m_logger) << " row=" << row << " ; currentArea " << currentArea;
|
||||
const QPolygonF &poly = areaToPolygon(currentArea);
|
||||
polyVec.append(poly);
|
||||
}
|
||||
@@ -571,7 +571,7 @@ void ParticipantTargetConfigurationDialog::onShowOnMapChanged(int)
|
||||
} else {
|
||||
m_sitMapGuiIfc->removePreviewObject();
|
||||
}
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void ParticipantTargetConfigurationDialog::onSelectionChanged()
|
||||
@@ -592,7 +592,7 @@ void ParticipantTargetConfigurationDialog::onSelectionChanged()
|
||||
int row = curIdx.row();
|
||||
|
||||
ShootbackArea currentArea = m_areaModel.getRowData(row);
|
||||
INFO_LOG() << " currentArea "<< currentArea;
|
||||
INFO_LOG(m_logger) << " currentArea "<< currentArea;
|
||||
m_previewPolygon = areaToPolygon(currentArea);
|
||||
|
||||
|
||||
@@ -602,11 +602,11 @@ void ParticipantTargetConfigurationDialog::onSelectionChanged()
|
||||
|
||||
void ParticipantTargetConfigurationDialog::onPolygonData(const QPolygonF &poly)
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " START";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
if (poly.size() < 3)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " polygon insufficiant, size=" << poly.size();
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " polygon insufficiant, size=" << poly.size();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -627,13 +627,13 @@ void ParticipantTargetConfigurationDialog::onPolygonData(const QPolygonF &poly)
|
||||
return;
|
||||
ShootbackArea temp = m_areaModel.getRowData(curIdx.row());
|
||||
newArea.identifier(temp.identifier());
|
||||
DEBUG_LOG() << Q_FUNC_INFO << "updating newArea = " << newArea;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << "updating newArea = " << newArea;
|
||||
m_areaModel.setRowData(curIdx.row(), newArea);
|
||||
} else {
|
||||
|
||||
int size = m_areaModel.rowCount();
|
||||
newArea.identifier(QString(QStringLiteral("Area_%1")).arg(size).toStdString());
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " adding tempArea = " << newArea;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " adding tempArea = " << newArea;
|
||||
m_areaModel.insertRow(newArea);
|
||||
|
||||
QModelIndex mi = m_areaModel.index(size, 0);
|
||||
@@ -649,22 +649,21 @@ void ParticipantTargetConfigurationDialog::onPolygonData(const QPolygonF &poly)
|
||||
|
||||
void ParticipantTargetConfigurationDialog::showPreviewObject()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (!m_sitMapGuiIfc || m_previewPolygon.isEmpty())
|
||||
return;
|
||||
m_sitMapGuiIfc->displayPreviewObject(this, m_previewPolygon, true);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EditNameDelegate::EditNameDelegate(QWidget *parent)
|
||||
: QItemDelegate(parent)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
EditNameDelegate::EditNameDelegate(QWidget *parent) : QItemDelegate(parent),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
QWidget *EditNameDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option,
|
||||
@@ -691,7 +690,7 @@ void EditNameDelegate::setEditorData(QWidget *editor, const QModelIndex &index)
|
||||
QVariant v = index.data(Qt::EditRole);
|
||||
le->setText(v.toString());
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " rox/column: " << index.row() << "/" << index.column()
|
||||
<< " Input: " << v.toString();
|
||||
}
|
||||
@@ -704,7 +703,7 @@ void EditNameDelegate::setModelData(QWidget *editor,
|
||||
if (!le)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " rox/column: " << index.row() << "/" << index.column()
|
||||
<< " setData... Input: " << le->text();
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ void ParticipantsMountedTableDialog::onShowTlnInfo()
|
||||
if (!m_ppmGuiIfc)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "onDoubleClick --> showTlnInfo";
|
||||
DEBUG_LOG(m_logger) << "onDoubleClick --> showTlnInfo";
|
||||
const QModelIndex idx = m_ui->tvMountedParticipants->currentIndex();
|
||||
const int id = m_mountedTableModel->getRowData(idx.row()).id();
|
||||
m_ppmGuiIfc->showParticipantInfoWindow(id);
|
||||
|
||||
Reference in new issue
Block a user