Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen

- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung
- 44 Export-Header Include-Pfade korrigiert (_export.h)
- 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h)
- INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros
- Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits)
- FATAL_LOG Makro hinzugefügt
- InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h)
- FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h)
- AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp)
- SymbolAppearance Klasse vollständig definiert mit content() Methode
- BuildingComponentFilter Klasse definiert mit Copy-Konstruktor
- Ftc Factory: nullptr Return (abstract class)
- AesFilter Klasse in aes.hpp hinzugefügt
- Dtc Klasse in ppm.hpp mit participantChanged Signal
- AesType Enum: alle 15 At* Werte definiert
- AesEffectState_def: EsReceived hinzugefügt
- DataModification Enum: eAdded/eModified/eRemoved
- function_reply_object.h → core_types.h Include-Pfad (72 Dateien)
- Enum-Class-Streaming Template-Operator in INGLLogger.h
- ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen
- ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge
- QRegExp → QRegularExpression in tpm_js_parser.cpp
- .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert
- Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-19 06:06:24 +02:00
1 parent 010f91928a
commit b774f4035c
2785 files changed
+18754 -18316

No files matched your search

@@ -3,7 +3,7 @@
#pragma once
#include <LtsWidgets/lts_frameless_dialog.h>
#include "zwmsmsdl_export.h"
#include "ppmcommon_export.h"
#include <QMap>
#include <memory>
@@ -2,7 +2,7 @@
#pragma once
#include <Common/ppmcommon_export.h>
#include "ppmcommon_export.h"
class QTreeView;
@@ -2,7 +2,7 @@
#pragma once
#include <Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <Lts/Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <QString>
#include <QRegularExpression>
@@ -2,7 +2,7 @@
#pragma once
#include <Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <Lts/Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <Services/ParticipantManagement/ppm.hpp>
#include <Services/ParticipantManagement/ppm_dtc.h>
#include <Services/ParticipantManagement/ppm_ftc.h>
@@ -35,7 +35,6 @@ ParticipantEditItemWidgetBase::ParticipantEditItemWidgetBase(bool asSupportServi
, m_ppmGuiCbxIfc(nullptr)
, m_session(session)
, m_ui(new Ui::ParticipantEditItemWidgetBase)
, m_logger(getLogger("ParticipantEditItemWidgetBase"))
{
m_ui->setupUi(this);
setWindowTitle(tr("Edit Participant"));
@@ -107,7 +106,7 @@ bool ParticipantEditItemWidgetBase::init(const std::shared_ptr<ParticipantManage
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface> &asb,
const bool addItem)
{
DEBUG_LOG(m_logger) << "init addItem=" << addItem
DEBUG_LOG() << "init addItem=" << addItem
<< " m_bEditMode=" << m_bEditMode;
if (!dtc || !ppmGuiCbxIfc)
return false;
@@ -122,7 +121,7 @@ bool ParticipantEditItemWidgetBase::init(const std::shared_ptr<ParticipantManage
slotRetranslate();
if (addItem)
{
DEBUG_LOG(m_logger) << "setDesignatorData()";
DEBUG_LOG() << "setDesignatorData()";
setDesignatorData();
m_ui->cbTypeClass->setCurrentIndex(m_ui->cbTypeClass->findData(s_lastTypeClassUsed));
const int idx = m_ui->cbType->findData(s_lastTypeUsed);
@@ -132,7 +131,7 @@ bool ParticipantEditItemWidgetBase::init(const std::shared_ptr<ParticipantManage
else if (m_bEditMode)
{
DEBUG_LOG(m_logger) << "setData()";
DEBUG_LOG() << "setData()";
setData();
}
return true;
@@ -224,7 +223,7 @@ void ParticipantEditItemWidgetBase::onSymbolConfig()
void ParticipantEditItemWidgetBase::onChangeSymbol(const QString &sidc)
{
TRACE_LOG(m_logger) << LOGFUNCTION << ", Changing symbol to " << sidc;
TRACE_LOG() << Q_FUNC_INFO << ", Changing symbol to " << sidc;
if (!m_asbfc || sidc == m_sidc)
return;
@@ -251,7 +250,7 @@ void ParticipantEditItemWidgetBase::onChangeSymbol(const QString &sidc)
}
else
{
ERROR_LOG(m_logger) << LOGFUNCTION << " sidc is not encoded, sidc = '" << sidc << "'";
ERROR_LOG() << Q_FUNC_INFO << " sidc is not encoded, sidc = '" << sidc << "'";
m_ui->pbSymbolConfig->setEnabled(false);
}
@@ -261,7 +260,7 @@ void ParticipantEditItemWidgetBase::onChangeSymbol(const QString &sidc)
m_symbolConfig = nullptr;
}
DEBUG_LOG(m_logger) << "Changing symbol to " << sidc << " is in progress";
DEBUG_LOG() << "Changing symbol to " << sidc << " is in progress";
}
ParticipantManagement::TypeClass ParticipantEditItemWidgetBase::typeClassIdFromTypeId(int typeId) const
@@ -84,8 +84,6 @@ protected:
QSet<int> m_disabledTypeIds;
Ui::ParticipantEditItemWidgetBase *m_ui;
LOGGER_T m_logger;
};
}
@@ -360,7 +360,7 @@ bool ParticipantEditModel::canDropMimeData(const QMimeData *data,
if (!isUnitType(parentItem->participant.typeId()))
return false;
DEBUG_LOG(m_logger) << "can drop on " << row << ", " << column << ", parent: "
DEBUG_LOG() << "can drop on " << row << ", " << column << ", parent: "
<< parent.row() << "," << parent.column() << ", " << parent.isValid()
<< ", action: " << action;
@@ -389,7 +389,7 @@ bool ParticipantEditModel::canDropMimeData(const QMimeData *data,
if (idSource != 0 && isParentOf(parentItem, idSource))
{
DEBUG_LOG(m_logger) << "isParentOf() for idSource: " << idSource << " is true - no drop";
DEBUG_LOG() << "isParentOf() for idSource: " << idSource << " is true - no drop";
return false;
}
}
@@ -802,7 +802,7 @@ void ParticipantEditModel::insertChildrenOf(int parentId,
auto it = tmap.constFind(childId);
if (it == tmap.constEnd())
{
WARNING_LOG(m_logger) << "Can not find participant with id " << childId << " - ignoring";
WARNING_LOG() << "Can not find participant with id " << childId << " - ignoring";
continue;
}
const ParticipantData &data = it.value();
@@ -827,11 +827,11 @@ void ParticipantEditModel::insertChildrenOf(int parentId,
childItem->participant = data;
childItem->bIsChecked = isChecked(checkedParticipants.contains(data.id()), cs);
DEBUG_LOG(m_logger) << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
DEBUG_LOG() << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
<< ") to parent " << parent << " at pos " << insertPos;
if ( data.id() == 0 && data.hierarchyNumber() == 0)
{
WARNING_LOG(m_logger) << "avoid endless loop in recursion";
WARNING_LOG() << "avoid endless loop in recursion";
return;
}
insertRow(insertPos, parentIdx, childItem);
@@ -1086,7 +1086,7 @@ void ParticipantEditModel::onParticipantChanged(const ParticipantManagement::Par
CheckedTreeItem *childItem = static_cast<CheckedTreeItem *>(createItem(QVariant(), QIcon()));
childItem->participant = m_dtc->convertParticipantToParticipantData(data);
DEBUG_LOG(m_logger) << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
DEBUG_LOG() << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
<< ") to parent " << ctiParent << " at pos " << insertPos;
insertRow(insertPos, indexFromItem(ctiParent), childItem);
tryRenderSymbol(QString::fromStdString(data.symbol()), childItem);
@@ -5,7 +5,7 @@
#include "participant_icon_model_base.h"
#include <ParticipantManagement/logger.h>
#include <Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <Lts/Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <nglwidgets/ngltreeitem.h>
#include <LtsWidgets/lts_column_filter_proxy_model.h>
@@ -277,8 +277,6 @@ private:
SortData m_sortData;
ParticipantEditModel *m_sourceModel{nullptr};
NGL::INGLLogger &m_logger;
};
}
@@ -76,7 +76,7 @@ void ParticipantIconModelBase::tryRenderSymbol(const QString &symbol, NGLTreeIte
{
AdvancedSymbology::SymbolDataToRender symDataToRender(symbol);
symDataToRender.role = m_partyRole;
DEBUG_LOG(m_logger) << "Rendering symbol '" << symbol << "' for item " << item;
DEBUG_LOG() << "Rendering symbol '" << symbol << "' for item " << item;
if (m_partyColor.isValid())
{
symDataToRender.fillColor = m_partyColor;
@@ -93,7 +93,7 @@ void ParticipantIconModelBase::tryRenderSymbol(const QString &symbol, NGLTreeIte
AdvancedSymbology::SymbolResult *symResPtr = symRes.data();
if (!symResPtr)
{
WARNING_LOG(m_logger) << "Can not render symbol for sidc '" << symbol << "'";
WARNING_LOG() << "Can not render symbol for sidc '" << symbol << "'";
return;
}
@@ -139,11 +139,11 @@ void ParticipantIconModelBase::symbolRendered(AdvancedSymbology::SymbolResult *s
const QIcon icon(QPixmap::fromImage(symResData.result->symbolImage().image()));
for (NGLTreeItem *item : symResData.treeItems)
{
DEBUG_LOG(m_logger) << "Symbol for " << item << " ready";
DEBUG_LOG() << "Symbol for " << item << " ready";
if (!updateIcon(QModelIndex(), item, icon))
WARNING_LOG(m_logger) << "updateIcon failed for item " << item;
WARNING_LOG() << "updateIcon failed for item " << item;
}
m_symbolResultMapping.erase(it);
@@ -3,7 +3,7 @@
#pragma once
#include <Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <Lts/Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <ParticipantManagement/ppm_dtc.h>
#include <nglwidgets/ngltreemodel.h>
@@ -71,8 +71,6 @@ protected:
QHash<AdvancedSymbology::SymbolResult *, SymbolResultData> m_symbolResultMapping;
AdvancedSymbology::Role m_partyRole;
QColor m_partyColor;
NGL::INGLLogger &m_logger;
};
}
@@ -2,7 +2,7 @@
#pragma once
#include <Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <Lts/Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <LtsWidgets/lts_frameless_dialog.h>
#include <QMap>
#include <memory>
@@ -6,7 +6,7 @@
#include <memory>
#include <LtsDataView/lts_data_view.h>
#include <Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <Lts/Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <ParticipantManagement/ppm_dtc.h>
#include <ParticipantManagement/ppm_ftc.h>
@@ -72,7 +72,7 @@ INSTALL_SHARED_FILES(zwmsmsdl_SRCS
)
NGL_WRAP_UI(zwmsmsdl_SRCS ${zwmsmsdl_UICS})
NGL_ADD_LIBRARY(WS zwmsmsdl SHARED ${zwmsmsdl_SRCS} ${zwmsmsdl_UICS} ${zwmsmsdl_IDLS})
NGL_ADD_LIBRARY2(WS zwmsmsdl SHARED ${zwmsmsdl_SRCS} ${zwmsmsdl_UICS} ${zwmsmsdl_IDLS})
NGL_TARGET_INCLUDE_DIRECTORIES(zwmsmsdl
PRIVATE
${XSD_INCLUDE_DIR}
@@ -29,7 +29,6 @@ MSDLEdit::MSDLEdit(LtsSession::LtsSession *session, QWidget *parent)
, m_pModelSystem(nullptr)
, m_pModelImport(nullptr)
, m_ui(new Ui::MSDLDialog)
, m_logger(getLogger("MSDLEdit"))
{
m_ui->setupUi(this);
@@ -75,7 +75,6 @@ private:
ParticipantEditModel *m_pModelImport;
Ui::MSDLDialog *m_ui;
NGL::INGLLogger &m_logger;
};
}
@@ -23,7 +23,6 @@ ParticipantShow::ParticipantShow(LtsSession::LtsSession *session,
, m_session(session)
, m_model(nullptr)
, m_ui(new Ui::ParticipantShow)
, m_logger(getLogger("ParticipantShow"))
{
m_ui->setupUi(this);
@@ -64,7 +64,6 @@ private:
ParticipantPlanningModel *m_model;
Ui::ParticipantShow *m_ui;
NGL::INGLLogger &m_logger;
};
}
@@ -12,7 +12,6 @@ PartyModel::PartyModel(QObject *parent)
: LtsWidgets::LtsAbstractTableModel<PartyData>({tr("Id"),
tr("Name")}, parent)
, m_dtc(nullptr)
, m_logger(getLogger("PartyModel"))
{}
bool PartyModel::initModel(const std::shared_ptr<ParticipantManagement::Interface::Dtc> &dtc)
@@ -44,6 +44,5 @@ public:
protected:
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtc;
LOGGER_T m_logger;
};
}
@@ -22,7 +22,6 @@ PartyView::PartyView(const QString &menuGroup, LtsSession::LtsSession *session,
, m_ftc(nullptr)
, m_session(session)
, m_ui(new Ui::PartyView)
, m_logger(getLogger("PartyView"))
{
m_ui->setupUi(this);
m_ui->widget->setSelectionMode(QAbstractItemView::SingleSelection);
@@ -57,9 +57,6 @@ private:
LtsSession::LtsSession *m_session;
Ui::PartyView *m_ui;
LOGGER_T m_logger;
};
}
@@ -13,11 +13,10 @@ ParticipantPlanningModel::ParticipantPlanningModel(QObject *parent,
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc,
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface> &asbIfc)
: ParticipantManagement::ParticipantEditModel(parent, ppmDtc, asbIfc)
, m_logger(getLogger("ParticipantPlanningModel"))
{
m_titles += tr("Hierarchy");
DEBUG_LOG(m_logger) << "ParticipantPlanningModel::ParticipantPlanningModel";
DEBUG_LOG() << "ParticipantPlanningModel::ParticipantPlanningModel";
}
QVariant ParticipantPlanningModel::data(const QModelIndex &index, int role) const
@@ -28,8 +28,5 @@ signals:
void newData();
private:
NGL::INGLLogger &m_logger;
};
}
@@ -41,7 +41,6 @@ ParticipantEdit::ParticipantEdit(LtsSession::LtsSession *session, bool asSupport
, m_pbTreeViewDummy(new QPushButton(m_pbTreeView->text()))
, m_pbTableViewDummy(new QPushButton(m_pbTableView->text()))
, m_ui(new Ui::ParticipantEdit)
, m_logger(getLogger("ParticipantEdit"))
{
m_ui->setupUi(this);
@@ -235,17 +234,17 @@ void ParticipantEdit::showIsSimulated()
void ParticipantEdit::lock()
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " START";
DEBUG_LOG() << Q_FUNC_INFO << " START";
m_ui->cbParty->setEnabled(true);
DEBUG_LOG(m_logger) << LOGFUNCTION << " END";
DEBUG_LOG() << Q_FUNC_INFO << " END";
}
void ParticipantEdit::unlock()
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " START";
DEBUG_LOG() << Q_FUNC_INFO << " START";
m_ui->cbParty->setEnabled(true);
DEBUG_LOG(m_logger) << LOGFUNCTION << " END";
DEBUG_LOG() << Q_FUNC_INFO << " END";
}
void ParticipantEdit::onPartyChanged()
@@ -321,7 +320,7 @@ void ParticipantEdit::onEnaDisa()
{
if (m_dtc->isAdlerVerbund(m_pTreehandler->getSelectedData().typeId()))
{
DEBUG_LOG(m_logger) << "Can't Edit Adler SAA Participants";
DEBUG_LOG() << "Can't Edit Adler SAA Participants";
enableEdit = true;
}
else
@@ -118,7 +118,6 @@ private:
FiringUnitValidator *m_firingUnitValidator{nullptr};
Ui::ParticipantEdit *m_ui;
NGL::INGLLogger &m_logger;
};
}
@@ -38,7 +38,6 @@ ParticipantOrganisationDialog::ParticipantOrganisationDialog(LtsSession::LtsSess
, m_session(session)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_ui(new Ui::ParticipantOrganisation)
, m_logger(getLogger("ParticipantOrganisation"))
{
m_ui->setupUi(this);
m_ui->splitter->setStretchFactor(0, 1);
@@ -79,7 +78,7 @@ void ParticipantOrganisationDialog::retranslate()
void ParticipantOrganisationDialog::lock()
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " START";
DEBUG_LOG() << Q_FUNC_INFO << " START";
m_ui->cbParty->setEnabled(true);
@@ -91,12 +90,12 @@ void ParticipantOrganisationDialog::lock()
m_ui->tvDetached->setEnabled(false);
DEBUG_LOG(m_logger) << LOGFUNCTION << " END";
DEBUG_LOG() << Q_FUNC_INFO << " END";
}
void ParticipantOrganisationDialog::unlock()
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " START";
DEBUG_LOG() << Q_FUNC_INFO << " START";
m_ui->cbParty->setEnabled(true);
@@ -104,7 +103,7 @@ void ParticipantOrganisationDialog::unlock()
m_ui->tvAttached->setEnabled(true);
m_ui->tvCooperate->setEnabled(true);
m_ui->tvDetached->setEnabled(true);
DEBUG_LOG(m_logger) << LOGFUNCTION << " END";
DEBUG_LOG() << Q_FUNC_INFO << " END";
}
bool ParticipantOrganisationDialog::init(const std::shared_ptr<ParticipantManagement::Interface::Dtc> &dtc,
@@ -357,7 +356,7 @@ void ParticipantOrganisationDialog::onPartyChanged()
s_preselectedParty = curPartyId;
DEBUG_LOG(m_logger) << LOGFUNCTION << " START, curPartyId" << curPartyId
DEBUG_LOG() << Q_FUNC_INFO << " START, curPartyId" << curPartyId
<< ", m_asSupportService=" << m_asSupportService;
@@ -105,7 +105,6 @@ private:
static int s_preselectedParty;
Ui::ParticipantOrganisation *m_ui;
NGL::INGLLogger &m_logger;
};
@@ -28,7 +28,6 @@ ParticipantPoolModel::ParticipantPoolModel(QObject *parent,
, AdvancedSymbology::TableModelSymbolRenderer<ParticipantPoolModel>(ColDesignatorIdentifier)
, m_asSupportService(asSupportService)
, m_dtc(dtc)
, m_logger(getLogger("ParticipantPoolModel"))
{
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> asb;
@@ -154,7 +153,7 @@ bool ParticipantPoolModel::dropMimeData(const QMimeData *data, Qt::DropAction ac
if (action != Qt::CopyAction && action != Qt::MoveAction)
return false;
DEBUG_LOG(m_logger) << "dropMimeData: " << data->formats().join(QLatin1Char(','));
DEBUG_LOG() << "dropMimeData: " << data->formats().join(QLatin1Char(','));
if (!data->hasFormat(ParticipantTemplateRoot) &&
!data->hasFormat(ParticipantPartyRoot) &&
@@ -251,7 +250,7 @@ void ParticipantPoolModel::onParticipantDataChanged(const Participant &data, Dat
const ParticipantData &part = m_vecData.at(i);
if (part.id() == data.id())
{
DEBUG_LOG(m_logger) << "Modifed participant " << data.id() << ", old party: " << part.partyId() << ", new: " << data.partyId();
DEBUG_LOG() << "Modifed participant " << data.id() << ", old party: " << part.partyId() << ", new: " << data.partyId();
if (data.partyId() != poolPartyId())
{
@@ -302,7 +301,7 @@ void ParticipantPoolModel::onParticipantOrganisationChanged(const ParticipantOrg
bool ParticipantPoolModel::moveFromPartyToPool(int rootParticipantId, const QString &mimeType)
{
ERROR_LOG(m_logger) << "Moving participant " << rootParticipantId << " from party to root with mime type " << mimeType;
ERROR_LOG() << "Moving participant " << rootParticipantId << " from party to root with mime type " << mimeType;
const Participant part = m_dtc->participant(rootParticipantId);
const QVector<Participant> newParticipants = getSuperiorParticipants(part.id());
@@ -401,7 +400,7 @@ void ParticipantPoolModel::tryRemoveParticipantFromModel(int participantId)
const ParticipantData &part = m_vecData.at(i);
if (part.id() == participantId)
{
DEBUG_LOG(m_logger) << "Removing participant " << participantId;
DEBUG_LOG() << "Removing participant " << participantId;
LtsWidgets::LtsAbstractTableModel<ParticipantManagement::ParticipantData>::removeRow(i);
break;
@@ -79,9 +79,6 @@ private:
QVector<ParticipantData> m_dataToDelete;
QHash<int, ParticipantOrganisation> m_participantOrganization;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtc;
NGL::INGLLogger &m_logger;
};
}
@@ -14,7 +14,6 @@ ParticipantUnitNamer::ParticipantUnitNamer(const QString &designator, const QStr
: LtsWidgets::LtsFramelessDialog(parent, LtsWidgets::Behaviour::Modal)
, m_ui(new Ui::ParticipantUnitNamer)
, m_validator(new QRegularExpressionValidator(QRegularExpression(QStringLiteral("[^,;\"'´`]*")), this))
, m_logger(getLogger("ParticipantTemplateChooser"))
{
m_ui->setupUi(this);
@@ -30,7 +30,6 @@ Q_SIGNALS:
private:
Ui::ParticipantUnitNamer *m_ui;
QValidator *m_validator;
LOGGER_T m_logger;
};
}
@@ -28,7 +28,6 @@ TacticalOrganisation::TacticalOrganisation(LtsSession::LtsSession *session, QWid
, m_tvContextMenu(nullptr)
, m_newItemDlg(nullptr)
, m_ui(new Ui::TacticalOrganisation)
, m_logger(getLogger("TacticalOrganisation"))
{
m_ui->setupUi(this);
connect(m_addEquipmentNumberAction, &QAction::triggered,
@@ -64,7 +63,7 @@ bool TacticalOrganisation::init(const std::shared_ptr<ParticipantManagement::Int
if (!m_session->createTopicClient<Core::Interface::Ftc>(m_coreFtc))
{
ERROR_LOG(m_logger) << LOGFUNCTION << " create coreFtc failed";
ERROR_LOG() << Q_FUNC_INFO << " create coreFtc failed";
return false;
}
@@ -151,7 +150,7 @@ void TacticalOrganisation::onReinitLeft()
s_preselectedPartyLeft = partyId;
auto *model = modelForParty(partyId, true);
INFO_LOG(m_logger) << "Set model left: " << model;
INFO_LOG() << "Set model left: " << model;
m_ui->dvPartyLeft->setModel(model);
#ifndef LTS_DEBUG
m_ui->dvPartyLeft->setColumnHidden(ParticipantEditModel::ColParticipantId, true);
@@ -165,7 +164,7 @@ void TacticalOrganisation::onReinitRight()
s_preselectedPartyRight = partyId;
auto *model = modelForParty(partyId, false);
INFO_LOG(m_logger) << "Set model right: " << model;
INFO_LOG() << "Set model right: " << model;
m_ui->dvPartyRight->setModel(model);
#ifndef LTS_DEBUG
m_ui->dvPartyRight->setColumnHidden(ParticipantEditModel::ColParticipantId, true);
@@ -90,6 +90,5 @@ private:
int32_t m_unlockId {0};
Ui::TacticalOrganisation *m_ui;
NGL::INGLLogger &m_logger;
};
}
@@ -22,7 +22,6 @@ ParticipantBiteDialog::ParticipantBiteDialog(int ddsId, QWidget *parent)
, m_requestHelper(nullptr)
, m_layout(nullptr)
, m_ui(new Ui::ParticipantBiteDialog)
, m_logger(getLogger("ParticipantBiteDialog"))
, m_ccsMap()
, m_bctMap()
{
@@ -80,7 +80,6 @@ private:
QVector<QWidget *> m_internalWidgets;
Ui::ParticipantBiteDialog *m_ui;
LOGGER_T m_logger;
QMap<int, ProjectDataManagement::CanComponentString> m_ccsMap;
QMap<int, ProjectDataManagement::BiteComponentText> m_bctMap;
};
@@ -33,7 +33,6 @@ ParticipantConfigDialog::ParticipantConfigDialog(int ddsId, DialogType type, QWi
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_ui(new Ui::ParticipantConfigDialog)
, m_isTarget(false)
, m_logger(getLogger("ParticipantConfigDialog"))
{
m_ui->setupUi(this);
connect(m_ui->cbStatus, &LtsWidgets::LtsComboBox::currentTextChanged, this, &ParticipantConfigDialog::onStateAreaChanged);
@@ -347,7 +346,7 @@ void ParticipantConfigDialog::onSelectionChanged()
for (const QModelIndex &index : currentlySelectedParticipants)
{
DEBUG_LOG(m_logger) << "setChildrenSelected row =" << index.row() << " column=" << index.column();
DEBUG_LOG() << "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)
@@ -109,8 +109,6 @@ private:
Ui::ParticipantConfigDialog *m_ui;
bool m_isTarget;
LOGGER_T m_logger;
};
}
@@ -370,7 +370,7 @@ bool ParticipantConfigModel::canDropMimeData(const QMimeData *data,
if (!isUnitType(parentItem->participant.typeId()))
return false;
DEBUG_LOG(m_logger) << "can drop on " << row << ", " << column << ", parent: "
DEBUG_LOG() << "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(m_logger) << "isParentOf() for idSource: " << idSource << " is true - no drop";
DEBUG_LOG() << "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(m_logger) << "Can not find participant with id " << childId << " - ignoring";
WARNING_LOG() << "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(m_logger) << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
DEBUG_LOG() << "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(m_logger) << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
DEBUG_LOG() << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
<< ") to parent " << ctiParent << " at pos " << insertPos;
insertRow(insertPos, indexFromItem(ctiParent), childItem);
tryRenderSymbol(QString::fromStdString(data.symbol()), childItem);
@@ -278,8 +278,6 @@ private:
SortData m_sortData;
ParticipantConfigModel *m_sourceModel{nullptr};
NGL::INGLLogger &m_logger;
};
}
@@ -21,7 +21,6 @@ ParticipantFollowDialog::ParticipantFollowDialog(QWidget *parent)
, m_ui(new Ui::ParticipantFollowDialog)
, m_followParticipantId(-1)
, m_followEquipmentNo(-1)
, m_logger(getLogger("ParticipantFollowDialog"))
{
m_ui->setupUi(this);
m_ui->leEquipNo->setValidator(new QIntValidator(0, 100000, m_ui->leEquipNo));
@@ -56,7 +55,7 @@ bool ParticipantFollowDialog::init(LtsSession::LtsSession *session,
const std::shared_ptr<Interface::Dtc> &dtc,
const std::shared_ptr<ForeignParticipantInfoGuiInterface> &ppmGuiIfc)
{
DEBUG_LOG(m_logger) << "ParticipantFollowDialog::init";
DEBUG_LOG() << "ParticipantFollowDialog::init";
m_dtc = dtc;
m_ppmGuiIfc = ppmGuiIfc;
enadisa();
@@ -228,7 +227,7 @@ void ParticipantFollowDialog::onDoubleClicked()
m_followParticipantId = data.id();
m_followEquipmentNo = getEquipmentNumber(m_followParticipantId);
enadisa();
DEBUG_LOG(m_logger) << "onDoubleClicked follow Participant Id =" << m_followParticipantId
DEBUG_LOG() << "onDoubleClicked follow Participant Id =" << m_followParticipantId
<< " m_followEquipmentNo=" << m_followEquipmentNo;
}
@@ -338,7 +337,7 @@ void ParticipantFollowDialog::fillParticipantMapFromTree(const QModelIndex &pare
int ParticipantFollowDialog::getEquipmentNumber(const int participantId)
{
DEBUG_LOG(m_logger) << "getEquipmentNumber(" << participantId << ")";
DEBUG_LOG() << "getEquipmentNumber(" << participantId << ")";
int equipmentNumber = 0;
QMapIterator<int, int> iter(m_participantMap);
@@ -346,10 +345,10 @@ int ParticipantFollowDialog::getEquipmentNumber(const int participantId)
while (iter.hasNext())
{
iter.next();
DEBUG_LOG(m_logger) << iter.key() << " : " << iter.value();
DEBUG_LOG() << iter.key() << " : " << iter.value();
if (iter.value() == participantId)
{
DEBUG_LOG(m_logger) << "return: " << iter.key();
DEBUG_LOG() << "return: " << iter.key();
return (iter.key());
}
}
@@ -359,13 +358,13 @@ int ParticipantFollowDialog::getEquipmentNumber(const int participantId)
void ParticipantFollowDialog::onStartFollowClicked()
{
int participantId = m_participantMap.value(m_equipNo);
DEBUG_LOG(m_logger) << "Follow Participant id=" << participantId << " on Map";
DEBUG_LOG() << "Follow Participant id=" << participantId << " on Map";
if (!m_ui->cbAll->isChecked())
onDoubleClicked();
else
{
DEBUG_LOG(m_logger) << "Start Follow Participant id=" << participantId << " on Map";
DEBUG_LOG() << "Start Follow Participant id=" << participantId << " on Map";
m_followParticipantId = participantId;
m_followEquipmentNo = m_equipNo;
}
@@ -374,7 +373,7 @@ void ParticipantFollowDialog::onStartFollowClicked()
void ParticipantFollowDialog::onStopFollowClicked()
{
DEBUG_LOG(m_logger) << "Stop Follow Participant id=" << m_followParticipantId << " on Map";
DEBUG_LOG() << "Stop Follow Participant id=" << m_followParticipantId << " on Map";
m_followParticipantId = 0;
m_followEquipmentNo = 0;
enadisa();
@@ -409,9 +408,9 @@ void ParticipantFollowDialog::enadisa()
labelText.append(QStringLiteral(")"));
}
m_ui->lbFollow->setText(labelText);
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 << ", "
DEBUG_LOG() << "labelText=" << labelText;
DEBUG_LOG() << " m_ui->lbFollow->getText()" << m_ui->lbFollow->text();
DEBUG_LOG() << "newFollowEquipment(" << m_followEquipmentNo << ", "
<< m_followParticipantId << ")";
emit newFollowEquipment(m_followEquipmentNo,m_followParticipantId );
}
@@ -21,7 +21,6 @@ ParticipantGearRestock::ParticipantGearRestock(int gearId, int gearTypeId, const
, m_participant(participant)
, m_dialogMode(dialogMode)
, m_ui(new Ui::ParticipantGearRestock)
, m_logger(getLogger("ParticipantGearRestock"))
{
m_ui->setupUi(this);
@@ -65,13 +64,13 @@ bool ParticipantGearRestock::init(LtsSession::LtsSession *session, bool showAllO
if (!m_pdmDtc->canRestock(m_gearTypeId) && m_dialogMode == DialogMode::DM_Restock)
{
WARNING_LOG(m_logger) << "Not possible to restock gearTypeId = " << m_gearTypeId;
WARNING_LOG() << "Not possible to restock gearTypeId = " << m_gearTypeId;
return false;
}
if (!m_pdmDtc->canSetDefaults(m_gearTypeId) && m_dialogMode == DialogMode::DM_SetRestockDefaults)
{
WARNING_LOG(m_logger) << "Not possible to set restock defaults gearTypeId = " << m_gearTypeId;
WARNING_LOG() << "Not possible to set restock defaults gearTypeId = " << m_gearTypeId;
return false;
}
@@ -108,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(m_logger) << "maxCharge = " << maxCharge;
DEBUG_LOG() << "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);
@@ -69,7 +69,6 @@ private:
DialogMode m_dialogMode{DM_SetRestockDefaults};
Ui::ParticipantGearRestock *m_ui;
LOGGER_T m_logger;
};
}
@@ -14,7 +14,6 @@ ParticipantHistoryDialog::ParticipantHistoryDialog(QWidget *parent)
, m_proxyModel(new ParticipantHistorySortModel(this))
, m_dtc(nullptr)
, m_ui(new Ui::ParticipantHistoryDialog)
, m_logger(getLogger("ParticipantHistoryDialog"))
{
m_proxyModel->setSourceModel(m_model);
m_ui->setupUi(this);
@@ -45,6 +45,5 @@ private:
std::shared_ptr<Interface::Dtc> m_dtc;
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_aesDtc;
Ui::ParticipantHistoryDialog *m_ui;
LOGGER_T m_logger;
};
}
@@ -30,7 +30,6 @@ ParticipantHistoryDialogModel::ParticipantHistoryDialogModel(QObject *parent)
, m_vulnerabilityClass(ProjectDataManagement::VulnerabilityClass::SoldierInjuries)
, m_dtc(nullptr)
, m_pdmDtc(nullptr)
, m_logger(getLogger("ParticipantHistoryDialogModel"))
{}
bool ParticipantHistoryDialogModel::initModel(int dds_id,
@@ -52,9 +52,6 @@ private:
std::shared_ptr<Interface::Dtc> m_dtc;
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_aesDtc;
LOGGER_T m_logger;
friend class ParticipantHistorySortModel;
};
@@ -22,7 +22,6 @@ HitLineInfoDialog::HitLineInfoDialog(int hitLineId, QWidget *parent)
, m_pdmDtc(nullptr)
, m_sitMapGuiIfc(nullptr)
, m_ui(new Ui::HitLineInfoDialog)
, m_logger(getLogger("ParticipantHitLineInfoDialog"))
{
m_ui->setupUi(this);
@@ -70,7 +69,7 @@ bool HitLineInfoDialog::init(const std::shared_ptr<ParticipantManagement::Interf
{
if (data.id() == m_hitLineId)
{
DEBUG_LOG(m_logger) << "Found HitLine Id: " << data.id();
DEBUG_LOG() << "Found HitLine Id: " << data.id();
m_hitLineInfo = data;
@@ -82,14 +81,14 @@ bool HitLineInfoDialog::init(const std::shared_ptr<ParticipantManagement::Interf
});
if (!m_isInitialized)
WARNING_LOG(m_logger) << "Non HitLineInfo data found for id: " << m_hitLineId;
WARNING_LOG() << "Non HitLineInfo data found for id: " << m_hitLineId;
return m_isInitialized;
}
void HitLineInfoDialog::showHitLineInfos()
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " id:" << m_hitLineId;
DEBUG_LOG() << Q_FUNC_INFO << " id:" << m_hitLineId;
if (m_participantOriginator.id() <= 0 || m_participantInjury.id() <= 0)
return;
@@ -63,6 +63,5 @@ private:
std::shared_ptr<SituationMap::ForeignGuiInterface> m_sitMapGuiIfc;
Ui::HitLineInfoDialog *m_ui;
LOGGER_T m_logger;
};
}
@@ -60,7 +60,6 @@ ParticipantInfoDialog::ParticipantInfoDialog(int participantId, const QString &m
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_ui(new Ui::ParticipantInfoDialog)
, m_isTarget(false)
, m_logger(getLogger("ParticipantInfoDialog"))
{
m_ui->setupUi(this);
m_oldSpacerSize.first = m_ui->vsBottom->maximumSize().width();
@@ -145,7 +144,7 @@ bool ParticipantInfoDialog::init(LtsSession::LtsSession *session,
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface> &asbInterface,
const std::shared_ptr<ForeignParticipantInfoGuiInterface> &ppmGuiIfc)
{
DEBUG_LOG(m_logger)<< "ParticipantInfoDialog::init";
DEBUG_LOG()<< "ParticipantInfoDialog::init";
m_session = session;
m_dtc = dtc;
m_ftc = ftc;
@@ -188,7 +187,7 @@ bool ParticipantInfoDialog::init(LtsSession::LtsSession *session,
});
DEBUG_LOG(m_logger)<< "Vor setUiValues";
DEBUG_LOG()<< "Vor setUiValues";
return setUiValues();
}
@@ -198,7 +197,7 @@ bool ParticipantInfoDialog::setUiValues()
DEBUG_LOG(m_logger) << "------------------setUiValues-----------------";
DEBUG_LOG() << "------------------setUiValues-----------------";
if (!m_dtc || !m_ftc || m_participant.id() < 0)
return false;
@@ -225,7 +224,7 @@ bool ParticipantInfoDialog::setUiValues()
const bool isUas = m_dtc->isTypeUas(participantData.typeId());
DEBUG_LOG(m_logger) << "------------------UAS-----------------"
DEBUG_LOG() << "------------------UAS-----------------"
<< " isTypeUas" << isUas
<< " participantId=" <<participantData.id()
<< " typeId=" << participantData.typeId();
@@ -349,7 +348,7 @@ bool ParticipantInfoDialog::setUiValues()
}
case TypeClass::Vessel:
case TypeClass::Unknown:
ERROR_LOG(m_logger) << LOGFUNCTION << m_typeClass;
ERROR_LOG() << Q_FUNC_INFO << m_typeClass;
return false;
}
@@ -461,7 +460,7 @@ bool ParticipantInfoDialog::setUiValues()
setOnlineHelpFilename(QStringLiteral("Info_Dialog-Unit"));
break;
case TypeClass::Unknown:
ERROR_LOG(m_logger) << LOGFUNCTION << m_typeClass;
ERROR_LOG() << Q_FUNC_INFO << m_typeClass;
}
return true;
@@ -521,7 +520,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
youngestState.stateTime(0);
for (const StateInformation &si : history)
{
DEBUG_LOG(m_logger) << "StateInformation "
DEBUG_LOG() << "StateInformation "
<< " time=" << si.stateTime()
<< " vulnerabilityBits=" << si.vulnerabilityBits()
<< " vulnerabilityKindId=" << si.vulnerabilityKindId();
@@ -534,7 +533,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
m_ui->lblStatus->setText(ProjectDataManagement::toString(lastState.vulnerabilityState(), vc));
DEBUG_LOG(m_logger)<<" >>> last state: "<<lastState.vitality() << "last kind: " <<lastState.vulnerabilityKindId();
DEBUG_LOG()<<" >>> last state: "<<lastState.vitality() << "last kind: " <<lastState.vulnerabilityKindId();
m_ui->lblVitality->setText(QString::number(lastState.vitality()) + QStringLiteral("%"));
@@ -542,7 +541,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
const int BCONTAMINATION = 0x8000;
const int CCONTAMINATION = 0x10000;
QStringList contaminationList;
DEBUG_LOG(m_logger) << "Set Contamination"
DEBUG_LOG() << "Set Contamination"
<< " time=" << youngestState.stateTime()
<< " vulnerabilityKindId=" << youngestState.vulnerabilityKindId()
<< " vulnerabilityBits=" << youngestState.vulnerabilityBits()
@@ -550,7 +549,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
if ( youngestState.vulnerabilityBits() & NCONTAMINATION)
{
DEBUG_LOG(m_logger) << "append N";
DEBUG_LOG() << "append N";
const ProjectDataManagement::VulnerabilityState vs(static_cast<ProjectDataManagement::VulnerabilityState_def::type>(14));
QString fullName = ProjectDataManagement::toString(vs);
@@ -561,7 +560,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
}
if ( youngestState.vulnerabilityBits() & BCONTAMINATION)
{
DEBUG_LOG(m_logger) << "append B";
DEBUG_LOG() << "append B";
const ProjectDataManagement::VulnerabilityState vs(static_cast<ProjectDataManagement::VulnerabilityState_def::type>(15));
QString fullName = ProjectDataManagement::toString(vs);
@@ -572,7 +571,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
}
if ( youngestState.vulnerabilityBits() & CCONTAMINATION)
{
DEBUG_LOG(m_logger) << "append C";
DEBUG_LOG() << "append C";
const ProjectDataManagement::VulnerabilityState vs(static_cast<ProjectDataManagement::VulnerabilityState_def::type>(16));
QString fullName = ProjectDataManagement::toString(vs);
@@ -616,7 +615,7 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
m_ui->lbContamination->setHidden(contaminationListIsEmpty);
m_ui->lblContamination->setHidden(contaminationListIsEmpty);
DEBUG_LOG(m_logger)<< "setBackgroundColor ="<< data.manipulation().size();
DEBUG_LOG()<< "setBackgroundColor ="<< data.manipulation().size();
setBackgroundColor(m_ui->lblEquipNr, Qt::red, data.manipulation().size());
@@ -792,11 +791,11 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
{
m_ui->twGear->hide();
}
DEBUG_LOG(m_logger) << "### m_sanMatStock: " << m_sanMatStock.size();
DEBUG_LOG() << "### m_sanMatStock: " << m_sanMatStock.size();
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();
DEBUG_LOG() << "### data.sanitationMaterialStock(): " << data.sanitationMaterialStock().size();
DEBUG_LOG() << "### data.participantId(): " << data.participantId();
DEBUG_LOG() << "### data.sampleTime(): " << data.sampleTime();
if (data.sanitationMaterialStock().size() == 0)
@@ -807,8 +806,8 @@ void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicPartici
}
else if (data.sanitationMaterialStock() != m_sanMatStock)
{
DEBUG_LOG(m_logger) << "### data.qualification(): " << data.qualification();
DEBUG_LOG(m_logger) << "### data.sanitationUniqueId(): " << data.sanitationUniqueId();
DEBUG_LOG() << "### data.qualification(): " << data.qualification();
DEBUG_LOG() << "### data.sanitationUniqueId(): " << data.sanitationUniqueId();
m_ui->gbSanitation->show();
m_ui->lblSanAssignState->setText(ParticipantManagement::toString(data.qualification().underlying()));
@@ -1009,7 +1008,7 @@ void ParticipantInfoDialog::onPositionChanged(const ParticipantPosition &positio
isOpsBuildingSource = true;
DEBUG_LOG(m_logger) << "reportingSource = OpsBuilding true" ;
DEBUG_LOG() << "reportingSource = OpsBuilding true" ;
setBackgroundColor(m_ui->lblPositionData, Qt::lightGray, isOpsBuildingSource );
onUpdatePosition(position.participantId(), position.pos(), position.sampleTime());
@@ -1215,7 +1214,7 @@ void ParticipantInfoDialog::setSanitationLabelColor(SanitationResult proceduresD
case SanitationResult::deprecatedNA:
break;
}
DEBUG_LOG(m_logger) << "Set Color to: " << proceduresDone.underlying();
DEBUG_LOG() << "Set Color to: " << proceduresDone.underlying();
m_ui->lblKind->setPalette(pal);
m_ui->lblKind->setAutoFillBackground(true);
m_ui->lblKind->setToolTip(toolTip);
@@ -1407,7 +1406,7 @@ void ParticipantInfoDialog::onPartitionTimeChanged(qint64 newPartitionTime)
{
if (LtsUtils::isPositionTimeOutdated(newPartitionTime, m_lastPositionMSec) )
{
DEBUG_LOG(m_logger)<< "setBackgroundColor ="<< LtsUtils::isPositionTimeOutdated(newPartitionTime, m_lastPositionMSec);
DEBUG_LOG()<< "setBackgroundColor ="<< LtsUtils::isPositionTimeOutdated(newPartitionTime, m_lastPositionMSec);
setBackgroundColor(m_ui->lblPositionData, Qt::red, true);
}
qint64 lastPosSec = (newPartitionTime - m_lastPositionMSec) / 1000;
@@ -1503,7 +1502,7 @@ void ParticipantInfoDialog::onTargetConfig()
{
if (!m_tgtFtc)
return;
INFO_LOG(m_logger) << "onTargetConfig send TargetConfigRequest";
INFO_LOG() << "onTargetConfig send TargetConfigRequest";
TargetManagement::ConfigureTargetRequest request;
@@ -1522,7 +1521,7 @@ void ParticipantInfoDialog::onTargetConfigChanged(const TargetManagement::Target
{
if (modType == DataModification::eRemoved)
return;
INFO_LOG(m_logger) << "onTargetConfigChanged participantId = " << m_participant.id()
INFO_LOG() << "onTargetConfigChanged participantId = " << m_participant.id()
<< " data.participantId = " << data.participantId();
if (data.participantId() != m_participant.id())
return;
@@ -1539,7 +1538,7 @@ void ParticipantInfoDialog::onTargetModeChangeed()
{
if (!m_tgtFtc)
return;
INFO_LOG(m_logger) << "onTargetModeChangeed";
INFO_LOG() << "onTargetModeChangeed";
TargetManagement::ConfigureTargetRequest request;
request.id(0);
@@ -1547,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(m_logger) << "onTargetModeChangeed=" << mode;
INFO_LOG() << "onTargetModeChangeed=" << mode;
request.mode(mode);
auto cb = [request, this]()
@@ -1567,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(m_logger) << "onTargetWeaponChangeed = " << request.weapon();
INFO_LOG() << "onTargetWeaponChangeed = " << request.weapon();
auto cb = [request, this]()
{
@@ -1595,8 +1594,8 @@ void ParticipantInfoDialog::onContextMenuRequested(const QPoint &position)
GearInformation &gear = m_gearList[pointedItem->row()];
DEBUG_LOG(m_logger) << "gear type selected = " << gear.gearTypeId();
DEBUG_LOG(m_logger) << "gear Id = " << gear.gearId();
DEBUG_LOG() << "gear type selected = " << gear.gearTypeId();
DEBUG_LOG() << "gear Id = " << gear.gearId();
QList<QAction*> actions;
@@ -1678,16 +1677,16 @@ void ParticipantInfoDialog::onUnlockUAS()
{
UAS uas = m_dtc->getUasByParticipantId(m_participant.id(), m_session->exerciseId());
m_uasId = uas.id();
DEBUG_LOG(m_logger)<<" -- onUnlockUAS uasId: "<< uas.id() <<" /// participantId: "<<uas.participantId()<<" /// equipmentNumber: "<<m_participant.equipmentNumber();
DEBUG_LOG()<<" -- onUnlockUAS uasId: "<< uas.id() <<" /// participantId: "<<uas.participantId()<<" /// equipmentNumber: "<<m_participant.equipmentNumber();
if (uas.id() <= 0 )
{
ERROR_LOG(m_logger)<<" -- onUnlockUAS invalid uasId: "<<uas.id()<<" !!!";
ERROR_LOG()<<" -- onUnlockUAS invalid uasId: "<<uas.id()<<" !!!";
return;
}
if (!m_participant.equipmentNumber().is_set())
{
ERROR_LOG(m_logger)<<" -- onUnlockUAS invalid EquipmentNumber for UAS: "<<uas.id()<<" !!!";
ERROR_LOG()<<" -- onUnlockUAS invalid EquipmentNumber for UAS: "<<uas.id()<<" !!!";
return;
}
ModifyUasStateRequest req;
@@ -179,6 +179,5 @@ private:
bool m_isTarget;
bool m_showPvSan{false};
bool m_showVulnerabilityKindProject{false};
LOGGER_T m_logger;
};
}
@@ -13,15 +13,14 @@ namespace ParticipantManagement
ParticipantInfoLtdGearComponent::ParticipantInfoLtdGearComponent(QTableWidget *tableWidget)
: m_tableWidget(tableWidget)
, m_logger(getLogger("ParticipantInfoGearLtsComponent"))
{
if (!m_tableWidget)
ERROR_LOG(m_logger) << "Got invalid table widget.";
ERROR_LOG() << "Got invalid table widget.";
}
void ParticipantInfoLtdGearComponent::updateData(const std::vector<LaserDesignation> &newData)
{
TRACE_LOG(m_logger) << LOGFUNCTION;
TRACE_LOG() << Q_FUNC_INFO;
if (!m_tableWidget)
return;
@@ -37,7 +36,7 @@ void ParticipantInfoLtdGearComponent::updateData(const std::vector<LaserDesignat
void ParticipantInfoLtdGearComponent::addGear(int gearId, int row)
{
TRACE_LOG(m_logger) << LOGFUNCTION;
TRACE_LOG() << Q_FUNC_INFO;
if (!m_tableWidget)
return;
@@ -61,7 +60,7 @@ void ParticipantInfoLtdGearComponent::clear()
void ParticipantInfoLtdGearComponent::updateRow(const LaserDesignation &laserDesignation)
{
TRACE_LOG(m_logger) << LOGFUNCTION << ": " << laserDesignation;
TRACE_LOG() << Q_FUNC_INFO << ": " << laserDesignation;
if (!m_rowPerGearId.contains(laserDesignation.gearId()) || !m_rowPerGearId.value(laserDesignation.gearId()).isValid())
return;
@@ -72,7 +71,7 @@ void ParticipantInfoLtdGearComponent::updateRow(const LaserDesignation &laserDes
void ParticipantInfoLtdGearComponent::removeOutdatedData(const std::vector<LaserDesignation> &newData)
{
TRACE_LOG(m_logger) << LOGFUNCTION;
TRACE_LOG() << Q_FUNC_INFO;
if (!m_tableWidget)
return;
@@ -52,7 +52,5 @@ private:
QTableWidget *m_tableWidget;
QMap<int, LtdRow> m_rowPerGearId;
LOGGER_T m_logger;
};
}
@@ -18,7 +18,6 @@ ParticipantInfoTableDialog::ParticipantInfoTableDialog(const QString &menuGroup,
, m_dtc(nullptr)
, m_ppmGuiIfc(nullptr)
, m_ui(new Ui::ParticipantInfoTableDialog)
, m_logger(getLogger("ParticipantInfoTableDialog"))
, m_infoTableModel(nullptr)
, m_sortFilterProxyModel(nullptr)
, m_visibleColumns()
@@ -53,7 +52,7 @@ void ParticipantInfoTableDialog::retranslate()
bool ParticipantInfoTableDialog::init(LtsSession::LtsSession *session,
const std::shared_ptr<Interface::Dtc> &dtc)
{
DEBUG_LOG(m_logger) << "**** init";
DEBUG_LOG() << "**** init";
m_session = session;
m_dtc = dtc;
@@ -105,7 +104,7 @@ void ParticipantInfoTableDialog::onColumnContextMenu(const QPoint &position)
void ParticipantInfoTableDialog::onAddClicked()
{
DEBUG_LOG(m_logger) << "**** onAddClicked() ";
DEBUG_LOG() << "**** onAddClicked() ";
InfoTableAddDialog *addParticipantsDialog = new InfoTableAddDialog(this);
addParticipantsDialog->init(m_session, m_dtc);
@@ -119,7 +118,7 @@ void ParticipantInfoTableDialog::onAddClicked()
void ParticipantInfoTableDialog::onRemoveClicked()
{
DEBUG_LOG(m_logger) << "**** onRemoveClicked() ";
DEBUG_LOG() << "**** onRemoveClicked() ";
const QModelIndexList selectedRows = m_ui->tvParticipant->selectionModel()->selectedRows();
if (!selectedRows.count())
@@ -139,7 +138,7 @@ void ParticipantInfoTableDialog::onRemoveClicked()
void ParticipantInfoTableDialog::onSelectionChanged(const QItemSelection &selected,
const QItemSelection &deselected)
{
DEBUG_LOG(m_logger) << "onSelectionChanged";
DEBUG_LOG() << "onSelectionChanged";
Q_UNUSED(selected);
Q_UNUSED(deselected);
@@ -149,7 +148,7 @@ void ParticipantInfoTableDialog::onSelectionChanged(const QItemSelection &select
void ParticipantInfoTableDialog::onShowTlnInfo(const QModelIndex &idx)
{
DEBUG_LOG(m_logger) << "onDoubleClick --> showTlnInfo";
DEBUG_LOG() << "onDoubleClick --> showTlnInfo";
QModelIndex realIdx = m_sortFilterProxyModel->mapToSource(idx);
const int id = m_infoTableModel->getRowData(realIdx.row()).id();
@@ -28,7 +28,6 @@ ParticipantInfoTableModel::ParticipantInfoTableModel(QObject *parent)
, m_partitionTime(0)
, m_timeoutCheckTimer(new QTimer(this))
, m_bWithPositionandBiteResult(true)
, m_logger(getLogger("ParticipantInfoTableModel"))
{
m_timeoutCheckTimer->setSingleShot(false);
connect(m_timeoutCheckTimer, &QTimer::timeout,
@@ -43,7 +42,7 @@ bool ParticipantInfoTableModel::initModel(LtsSession::LtsSession *session,
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc,
bool bWithPositionandBiteResult)
{
DEBUG_LOG(m_logger) << "**** initModel";
DEBUG_LOG() << "**** initModel";
m_session = session;
m_ppmDtc = ppmDtc;
@@ -211,7 +210,7 @@ void ParticipantInfoTableModel::updateDataView(const QSet<int> &participantIds)
void ParticipantInfoTableModel::onParticipantChanged(const ParticipantManagement::DynamicParticipantData &data,
DataModification modType)
{
DEBUG_LOG(m_logger) << "**** participantDataChanged";
DEBUG_LOG() << "**** participantDataChanged";
const int row = findRowForId(data.participantId());
if (row < 0)
@@ -92,7 +92,6 @@ private:
QTimer *m_timeoutCheckTimer;
QHash<int, QIcon> m_partyIcons;
bool m_bWithPositionandBiteResult;
NGL::INGLLogger &m_logger;
};
}
@@ -19,7 +19,6 @@ ParticipantSearchDialog::ParticipantSearchDialog(QWidget *parent)
, m_dtc(nullptr)
, m_ppmCbxIfc(nullptr)
, m_ui(new Ui::ParticipantSearchDialog)
, m_logger(getLogger("ParticipantSearchDialog"))
{
m_ui->setupUi(this);
m_ui->leEquipNo->setValidator(new QIntValidator(0, 100000, m_ui->leEquipNo));
@@ -89,6 +89,5 @@ private:
static int s_preselectedParty;
static bool s_preselectedAllParticipants;
Ui::ParticipantSearchDialog *m_ui;
LOGGER_T m_logger;
};
}
@@ -27,7 +27,6 @@ ParticipantSetInjuryDialog::ParticipantSetInjuryDialog(int participantId, QWidge
, m_bgBodypart(nullptr)
, m_bgSide(nullptr)
, m_ui(new Ui::ParticipantSetInjuryDialog)
, m_logger(getLogger("ParticipantSetInjuryDialog"))
{
m_ui->setupUi(this);
}
@@ -176,7 +175,7 @@ void ParticipantSetInjuryDialog::setOldData(const DynamicParticipantData &data)
int index = m_ui->cbState->findData(lastState.vulnerabilityState().underlying());
DEBUG_LOG(m_logger) << "Old vulnerability state = " << index;
DEBUG_LOG() << "Old vulnerability state = " << index;
if (index > 0)
m_ui->cbState->setCurrentIndex(index);
@@ -189,10 +188,10 @@ uint32_t ParticipantSetInjuryDialog::getInjuryBit()
int side = m_bgSide->button(1)->isEnabled() ? m_bgSide->checkedId() : 0;
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;
DEBUG_LOG() << "getInjuryBit() -------------- ";
DEBUG_LOG() << "Injury = " << m_bgInjury->checkedId();
DEBUG_LOG() << "Body = " << m_bgBodypart->checkedId();
DEBUG_LOG() << "Side = " << side;
return (((((m_bgInjury->checkedId() * 16) + m_bgBodypart->checkedId()) * 4) + side) + 2048);
@@ -329,8 +328,8 @@ bool ParticipantSetInjuryDialog::apply()
req.participantIds({m_participantId});
req.vulnerabilityKind(getInjuryBit());
DEBUG_LOG(m_logger) << "Saving vulnerability state = " << req.vulnerabilityState();
DEBUG_LOG(m_logger) << "Saving vulnerability kind = " << req.vulnerabilityKind();
DEBUG_LOG() << "Saving vulnerability state = " << req.vulnerabilityState();
DEBUG_LOG() << "Saving vulnerability kind = " << req.vulnerabilityKind();
return m_requestHelper->startSingleRequest([req, this]()
{
@@ -114,8 +114,5 @@ private:
QMap<int, ProjectDataManagement::SanitationInjuryKind> m_injuryKind;
QMap<int, ProjectDataManagement::SanitationInjuryPlace1> m_injuryPlace1;
QMap<int, ProjectDataManagement::SanitationInjuryPlace2> m_injuryPlace2;
LOGGER_T m_logger;
};
}
@@ -18,7 +18,6 @@ ParticipantSetSanitationDialog::ParticipantSetSanitationDialog(int participantId
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_participantId(participantId)
, m_ui(new Ui::ParticipantSetSanitationDialog)
, m_logger(getLogger("ParticipantSetSanitationDialog"))
{
m_ui->setupUi(this);
m_uiRequirements->addRequirement({ m_ui->lbl, [this]()
@@ -198,8 +197,8 @@ bool ParticipantSetSanitationDialog::apply()
sanDat.originatorEquipmentNumber(0);
req.data(sanDat);
DEBUG_LOG(m_logger) << "Medic treatment: qualification = " << sanDat.qualification();
DEBUG_LOG(m_logger) << "Medic treatment: procedures = " << sanDat.sanitationProceduresTaken();
DEBUG_LOG() << "Medic treatment: qualification = " << sanDat.qualification();
DEBUG_LOG() << "Medic treatment: procedures = " << sanDat.sanitationProceduresTaken();
return m_requestHelper->startSingleRequest([req, this]()
{
@@ -65,7 +65,6 @@ private:
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_dtcPdm;
QList<QCheckBox *> m_procedures;
Ui::ParticipantSetSanitationDialog *m_ui;
LOGGER_T m_logger;
};
}
@@ -27,14 +27,13 @@ AreaModel::AreaModel(QObject *parent)
tr("Coords")
},
parent)
, m_logger(getLogger("AreaModel"))
{}
bool AreaModel::initModel(const TargetInformation &targetInformation)
{
INFO_LOG(m_logger) << "initModel - #AreaModel: " << targetInformation.shootbackAreas().size();
INFO_LOG() << "initModel - #AreaModel: " << targetInformation.shootbackAreas().size();
for (auto singleArea : std::as_const(targetInformation.shootbackAreas()))
onShootbackAreaChanged(singleArea, DataModification::eAdded);
@@ -80,7 +79,7 @@ QVariant AreaModel::headerData(int section, Qt::Orientation orientation, int rol
QVariant AreaModel::data(const QModelIndex &index, int role) const
{
INFO_LOG(m_logger) << LOGFUNCTION << " role=" << role
INFO_LOG() << Q_FUNC_INFO << " role=" << role
<< " index = " << index.column();
if (!indexIsValid(index))
@@ -35,18 +35,17 @@ ParticipantTargetConfigurationDialog::ParticipantTargetConfigurationDialog(QWidg
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_ui(new Ui::ParticipantTargetConfigurationDialog)
, m_logger(getLogger("ParticipantTargetConfigurationDialog"))
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
m_ui->setupUi(this);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
ParticipantTargetConfigurationDialog::~ParticipantTargetConfigurationDialog()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
delete m_ui;
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void ParticipantTargetConfigurationDialog::retranslate()
@@ -59,14 +58,14 @@ void ParticipantTargetConfigurationDialog::retranslate()
bool ParticipantTargetConfigurationDialog::apply()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
ModifyTargetInformationRequest req;
req.targetInfo(m_targetInformation);
DEBUG_LOG(m_logger) << LOGFUNCTION << " update m_targetInformation: " << m_targetInformation;
DEBUG_LOG() << Q_FUNC_INFO << " update m_targetInformation: " << m_targetInformation;
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
return m_requestHelper->startSingleRequest([req, this]()
{
return m_ftc->modifyTargetInformationRequest(req, this);
@@ -78,11 +77,11 @@ bool ParticipantTargetConfigurationDialog::init(int participantId,
const std::shared_ptr<Interface::Ftc> &ftc,
const std::shared_ptr<SituationMap::ForeignGuiInterface> &sitMapGuiIfc)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
m_participantId = participantId;
if (m_participantId <= 0)
{
ERROR_LOG(m_logger) << LOGFUNCTION << " participant invalid, participantId = " << m_participantId;
ERROR_LOG() << Q_FUNC_INFO << " participant invalid, participantId = " << m_participantId;
return false;
}
@@ -157,7 +156,7 @@ bool ParticipantTargetConfigurationDialog::init(int participantId,
{
onTargetInformationChanged(m_targetInformation, DataModification::eAdded);
} else {
DEBUG_LOG(m_logger) << LOGFUNCTION << " targetInformation not found for participantId = " << m_participantId
DEBUG_LOG() << Q_FUNC_INFO << " targetInformation not found for participantId = " << m_participantId
<< " - use default.";
m_targetInformation.participantId(m_participantId);
}
@@ -168,7 +167,7 @@ bool ParticipantTargetConfigurationDialog::init(int participantId,
m_ui->cb_showOnMap->setChecked(true);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
return true;
}
@@ -191,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(m_logger) << LOGFUNCTION << " cb_status: vulState=" << vulState;
DEBUG_LOG(m_logger) << LOGFUNCTION << " cb_status: setCurrentIndex idx=" << idx;
DEBUG_LOG() << Q_FUNC_INFO << " cb_status: vulState=" << vulState;
DEBUG_LOG() << Q_FUNC_INFO << " cb_status: setCurrentIndex idx=" << idx;
m_ui->cb_status->setCurrentIndex(idx);
m_ui->cb_status->setEnabled(true);
}
@@ -214,7 +213,7 @@ void ParticipantTargetConfigurationDialog::onTargetInformationChanged(const Targ
case DataModification::eAdded:
case DataModification::eModified:
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " got new targetInformation from dds: " << data;
DEBUG_LOG() << Q_FUNC_INFO << " got new targetInformation from dds: " << data;
m_targetInformation = data;
}
break;
@@ -225,7 +224,7 @@ void ParticipantTargetConfigurationDialog::onTargetInformationChanged(const Targ
void ParticipantTargetConfigurationDialog::onStatusChanged()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
m_ui->cb_status->setEnabled(false);
@@ -294,7 +293,7 @@ void ParticipantTargetConfigurationDialog::onStatusChanged()
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
@@ -401,7 +400,7 @@ bool updateValue(ProjectDataManagement::VulnerabilityState& oldValueRef, Project
void ParticipantTargetConfigurationDialog::onGuiChanged()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
bool hasChanged = false;
@@ -418,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(m_logger) << LOGFUNCTION << " hasChanged=" << hasChanged;
DEBUG_LOG() << Q_FUNC_INFO << " hasChanged=" << hasChanged;
const std::vector<ParticipantManagement::ShootbackArea> &modelAreasStdVec = m_areaModel.getDataStdVector();
if (modelAreasStdVec != m_targetInformation.shootbackAreas())
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " hasChanged=" << hasChanged;
DEBUG_LOG() << Q_FUNC_INFO << " hasChanged=" << hasChanged;
hasChanged = true;
m_targetInformation.shootbackAreas(modelAreasStdVec);
}
DEBUG_LOG(m_logger) << LOGFUNCTION << " slotChangesMade sChanged=" << hasChanged;
DEBUG_LOG() << Q_FUNC_INFO << " slotChangesMade sChanged=" << hasChanged;
this->slotChangesMade();
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void ParticipantTargetConfigurationDialog::onDataChanged()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START, m_targetInformation=" << m_targetInformation;
TRACE_LOG() << Q_FUNC_INFO << " START, m_targetInformation=" << m_targetInformation;
int idx;
@@ -462,12 +461,12 @@ void ParticipantTargetConfigurationDialog::onDataChanged()
QVector<ShootbackArea> qVec = QVector<ShootbackArea>(areas.begin(), areas.end());
m_areaModel.setData(qVec);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void ParticipantTargetConfigurationDialog::onAddBtnClicked()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
if (!m_sitMapGuiIfc)
return;
@@ -478,7 +477,7 @@ void ParticipantTargetConfigurationDialog::onAddBtnClicked()
s_minPoints,
s_maxPoints);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
QPolygonF areaToPolygon(const ShootbackArea &area)
@@ -507,14 +506,14 @@ QPolygonF areaToPolygon(const ShootbackArea &area)
void ParticipantTargetConfigurationDialog::onEditBtnClicked()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
if (!m_sitMapGuiIfc)
return;
const QModelIndex curIdx = m_ui->ltsDataView->currentIndex();
if (!curIdx.isValid())
return;
INFO_LOG(m_logger) << " edit...";
INFO_LOG() << " edit...";
const ShootbackArea &area = m_areaModel.getRowData(curIdx.row());
@@ -532,24 +531,24 @@ void ParticipantTargetConfigurationDialog::onEditBtnClicked()
-1,
coordinates);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void ParticipantTargetConfigurationDialog::onRemoveBtnClicked()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
const QModelIndex curIdx = m_ui->ltsDataView->currentIndex();
if (!curIdx.isValid())
return;
INFO_LOG(m_logger) << " remove...";
INFO_LOG() << " remove...";
m_areaModel.removeRow(curIdx.row());
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void ParticipantTargetConfigurationDialog::onShowOnMapChanged(int)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
if (!m_sitMapGuiIfc)
return;
@@ -563,7 +562,7 @@ void ParticipantTargetConfigurationDialog::onShowOnMapChanged(int)
for (int row = 0; row < rowCount; ++row)
{
const ShootbackArea &currentArea = m_areaModel.getRowData(row);
INFO_LOG(m_logger) << " row=" << row << " ; currentArea " << currentArea;
INFO_LOG() << " row=" << row << " ; currentArea " << currentArea;
const QPolygonF &poly = areaToPolygon(currentArea);
polyVec.append(poly);
}
@@ -572,7 +571,7 @@ void ParticipantTargetConfigurationDialog::onShowOnMapChanged(int)
} else {
m_sitMapGuiIfc->removePreviewObject();
}
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void ParticipantTargetConfigurationDialog::onSelectionChanged()
@@ -593,7 +592,7 @@ void ParticipantTargetConfigurationDialog::onSelectionChanged()
int row = curIdx.row();
ShootbackArea currentArea = m_areaModel.getRowData(row);
INFO_LOG(m_logger) << " currentArea "<< currentArea;
INFO_LOG() << " currentArea "<< currentArea;
m_previewPolygon = areaToPolygon(currentArea);
@@ -603,11 +602,11 @@ void ParticipantTargetConfigurationDialog::onSelectionChanged()
void ParticipantTargetConfigurationDialog::onPolygonData(const QPolygonF &poly)
{
INFO_LOG(m_logger) << LOGFUNCTION << " START";
INFO_LOG() << Q_FUNC_INFO << " START";
if (poly.size() < 3)
{
ERROR_LOG(m_logger) << LOGFUNCTION << " polygon insufficiant, size=" << poly.size();
ERROR_LOG() << Q_FUNC_INFO << " polygon insufficiant, size=" << poly.size();
return;
}
@@ -628,13 +627,13 @@ void ParticipantTargetConfigurationDialog::onPolygonData(const QPolygonF &poly)
return;
ShootbackArea temp = m_areaModel.getRowData(curIdx.row());
newArea.identifier(temp.identifier());
DEBUG_LOG(m_logger) << LOGFUNCTION << "updating newArea = " << newArea;
DEBUG_LOG() << 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(m_logger) << LOGFUNCTION << " adding tempArea = " << newArea;
DEBUG_LOG() << Q_FUNC_INFO << " adding tempArea = " << newArea;
m_areaModel.insertRow(newArea);
QModelIndex mi = m_areaModel.index(size, 0);
@@ -650,11 +649,11 @@ void ParticipantTargetConfigurationDialog::onPolygonData(const QPolygonF &poly)
void ParticipantTargetConfigurationDialog::showPreviewObject()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
if (!m_sitMapGuiIfc || m_previewPolygon.isEmpty())
return;
m_sitMapGuiIfc->displayPreviewObject(this, m_previewPolygon, true);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
@@ -663,16 +662,15 @@ void ParticipantTargetConfigurationDialog::showPreviewObject()
EditNameDelegate::EditNameDelegate(QWidget *parent)
: QItemDelegate(parent)
, m_logger(getLogger("EditNameDelegate"))
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
QWidget *EditNameDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
FATAL_LOG(m_logger) << LOGFUNCTION
FATAL_LOG(m_logger) << Q_FUNC_INFO
<< " rox/column: " << index.row() << "/" << index.column() ;
Q_UNUSED(option)
@@ -685,7 +683,7 @@ QWidget *EditNameDelegate::createEditor(QWidget *parent, const QStyleOptionViewI
void EditNameDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
{
FATAL_LOG(m_logger) << LOGFUNCTION << " XXXXXXXXXXXXX";
FATAL_LOG(m_logger) << Q_FUNC_INFO << " XXXXXXXXXXXXX";
QLineEdit *le = qobject_cast<QLineEdit *>(editor);
if (!le)
return;
@@ -693,7 +691,7 @@ void EditNameDelegate::setEditorData(QWidget *editor, const QModelIndex &index)
QVariant v = index.data(Qt::EditRole);
le->setText(v.toString());
DEBUG_LOG(m_logger) << LOGFUNCTION
DEBUG_LOG() << Q_FUNC_INFO
<< " rox/column: " << index.row() << "/" << index.column()
<< " Input: " << v.toString();
}
@@ -706,7 +704,7 @@ void EditNameDelegate::setModelData(QWidget *editor,
if (!le)
return;
DEBUG_LOG(m_logger) << LOGFUNCTION
DEBUG_LOG() << Q_FUNC_INFO
<< " rox/column: " << index.row() << "/" << index.column()
<< " setData... Input: " << le->text();
@@ -13,7 +13,6 @@ ParticipantsMountedTableDialog::ParticipantsMountedTableDialog(int32_t carrierId
, m_ppmGuiIfc(nullptr)
, m_mountedTableModel(nullptr)
, m_ui(new Ui::ParticipantsMountedTableDialog)
, m_logger(getLogger("ParticipantsMountedTableDialog"))
{
m_ui->setupUi(this);
}
@@ -46,7 +45,7 @@ void ParticipantsMountedTableDialog::onShowTlnInfo()
if (!m_ppmGuiIfc)
return;
DEBUG_LOG(m_logger) << "onDoubleClick --> showTlnInfo";
DEBUG_LOG() << "onDoubleClick --> showTlnInfo";
const QModelIndex idx = m_ui->tvMountedParticipants->currentIndex();
const int id = m_mountedTableModel->getRowData(idx.row()).id();
m_ppmGuiIfc->showParticipantInfoWindow(id);
@@ -16,7 +16,6 @@ CombatPower::CombatPower(QWidget *parent)
, m_ppmGuiCbxIfc(nullptr)
, m_ppmGuiInfoIfc(nullptr)
, m_ui(new Ui::CombatPower)
, m_logger(getLogger("CombatPower"))
{
m_ui->setupUi(this);
@@ -44,7 +43,7 @@ bool CombatPower::init(const std::shared_ptr<ParticipantManagement::Interface::D
{
if (!dtc || !asbIfc || !ppmGuiCbxIfc)
{
ERROR_LOG(m_logger) << "Could not load all interfaces needed";
ERROR_LOG() << "Could not load all interfaces needed";
return false;
}
m_dtc = dtc;
@@ -68,7 +67,7 @@ bool CombatPower::init(const std::shared_ptr<ParticipantManagement::Interface::D
if (idx >= 0)
m_ui->cbParty->setCurrentIndex(idx);
DEBUG_LOG(m_logger) << "Init CombatPower - parties: " << m_ui->cbParty->count();
DEBUG_LOG() << "Init CombatPower - parties: " << m_ui->cbParty->count();
onPartyChanged();
m_ui->vLay->addWidget(m_orgChart);
return true;
@@ -76,7 +75,7 @@ bool CombatPower::init(const std::shared_ptr<ParticipantManagement::Interface::D
void CombatPower::onPartyChanged()
{
DEBUG_LOG(m_logger) << "onPartyChanged - parties: " << m_ui->cbParty->count();
DEBUG_LOG() << "onPartyChanged - parties: " << m_ui->cbParty->count();
if (s_preselectedParty == -1)
m_ui->cbParty->setCurrentIndex(s_preselectedParty);
s_preselectedParty = m_ui->cbParty->currentData().toUInt();
@@ -92,7 +91,7 @@ void CombatPower::onOpenInfo(int id)
void CombatPower::onUpdateParticipant(const Participant &data, DataModification modType)
{
DEBUG_LOG(m_logger) << "onUpdateParticipant - parties: " << m_ui->cbParty->count();
DEBUG_LOG() << "onUpdateParticipant - parties: " << m_ui->cbParty->count();
if (data.partyId() != m_ui->cbParty->currentData().toInt())
return;
if (modType == DataModification::eModified)
@@ -103,7 +102,7 @@ void CombatPower::onUpdateParticipant(const Participant &data, DataModification
void CombatPower::onUpdateDynamicParticipantData(const DynamicParticipantData &data, DataModification modType)
{
DEBUG_LOG(m_logger) << "onUpdateDynamicParticipantData - parties: " << m_ui->cbParty->count();
DEBUG_LOG() << "onUpdateDynamicParticipantData - parties: " << m_ui->cbParty->count();
if (m_dtc->participant(data.participantId()).partyId() != m_ui->cbParty->currentData().toInt())
return;
if (modType == DataModification::eModified)
@@ -53,7 +53,6 @@ private:
static int s_preselectedParty;
Ui::CombatPower *m_ui;
NGL::INGLLogger &m_logger;
};
}
@@ -34,7 +34,6 @@ OrgChartMain::OrgChartMain(LtsSession::LtsSession *session
, m_isTemplate(false)
, m_party(-1)
, m_ui(new Ui::OrgChartMain)
, m_logger(getLogger("OrgChartMain"))
{
m_ui->setupUi(this);
m_buttonBox->getButton(LtsWidgets::DialogButton::Close)->hide();
@@ -63,11 +62,11 @@ void OrgChartMain::retranslate()
void OrgChartMain::fillComboBoxes()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
if (!m_isTemplate)
m_ppmGuiCbxIfc->fillPartyComboBox(m_ui->cbParty);
DEBUG_LOG(m_logger) << "Init OrgChartMain - parties: " << m_ui->cbParty->count() << " is template? " << m_isTemplate;
DEBUG_LOG() << "Init OrgChartMain - parties: " << m_ui->cbParty->count() << " is template? " << m_isTemplate;
}
void OrgChartMain::updateButtonMimeData()
@@ -100,7 +99,7 @@ void OrgChartMain::updateButtonMimeData()
QColor OrgChartMain::currentPartyColor()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
QColor color = AdvancedSymbology::SymbolDataToRender::unknownColor();
int partyId = -1;
@@ -110,7 +109,7 @@ QColor OrgChartMain::currentPartyColor()
if (partyId > 0)
color = QColor::fromRgb(QRgb(m_dtc->party(partyId).color()));
TRACE_LOG(m_logger) << LOGFUNCTION << " color=" << color.name()
TRACE_LOG() << Q_FUNC_INFO << " color=" << color.name()
<< " (partyId = " << partyId << ")"
<< " (m_asSupportService=" << m_asSupportService << ")"
<< " (m_ui->cbParty->isVisible()=" << m_ui->cbParty->isVisible() << ")";
@@ -119,7 +118,7 @@ QColor OrgChartMain::currentPartyColor()
AdvancedSymbology::Role OrgChartMain::currentPartyRole()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
AdvancedSymbology::Role role = AdvancedSymbology::Role::Unknown;
@@ -130,7 +129,7 @@ AdvancedSymbology::Role OrgChartMain::currentPartyRole()
if (partyId > 0)
role = AdvancedSymbology::roleToRole<>(m_dtc->party(partyId).role());
TRACE_LOG(m_logger) << LOGFUNCTION << " role=" << role
TRACE_LOG() << Q_FUNC_INFO << " role=" << role
<< " (partyId = " << partyId << ")"
<< " (m_asSupportService=" << m_asSupportService << ")"
<< " (m_ui->cbParty->isVisible()=" << m_ui->cbParty->isVisible() << ")";
@@ -148,7 +147,7 @@ bool OrgChartMain::init(const std::shared_ptr<ParticipantManagement::Interface::
{
if (!dtc || !ftc || !ppmGuiCbxIfc || !asbIfc)
{
ERROR_LOG(m_logger) << "Could not load all interfaces needed";
ERROR_LOG() << "Could not load all interfaces needed";
return false;
}
m_dtc = dtc;
@@ -182,7 +181,7 @@ bool OrgChartMain::init(const std::shared_ptr<ParticipantManagement::Interface::
this,
&OrgChartMain::onPartyChanged, Qt::UniqueConnection);
m_ppmGuiCbxIfc->fillPartyComboBox(m_ui->cbParty);
DEBUG_LOG(m_logger) << "Init OrgChartMain - parties: " << m_ui->cbParty->count();
DEBUG_LOG() << "Init OrgChartMain - parties: " << m_ui->cbParty->count();
onPartyChanged();
}
else
@@ -201,7 +200,7 @@ void OrgChartMain::initTopicLockHandler()
if (!m_session->createTopicClient<Core::Interface::Ftc>(coreFtc))
{
ERROR_LOG(m_logger) << LOGFUNCTION << " create coreFtc failed";
ERROR_LOG() << Q_FUNC_INFO << " create coreFtc failed";
return;
}
coreFtc->enableAll();
@@ -213,7 +212,7 @@ void OrgChartMain::initTopicLockHandler()
void OrgChartMain::onLockDataChanged()
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " START";
DEBUG_LOG() << Q_FUNC_INFO << " START";
m_ui->cbParty->setEnabled(true);
@@ -224,7 +223,7 @@ void OrgChartMain::onLockDataChanged()
if (m_topicLockedBy.isEmpty())
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " READ-WRITE";
DEBUG_LOG() << Q_FUNC_INFO << " READ-WRITE";
setUnchangeable(false);
m_orgChart->setDisabled(false);
@@ -232,7 +231,7 @@ void OrgChartMain::onLockDataChanged()
else
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " READ-ONLY";
DEBUG_LOG() << Q_FUNC_INFO << " READ-ONLY";
setUnchangeable(true);
m_orgChart->setDisabled(true);
@@ -324,7 +323,7 @@ bool OrgChartMain::initButtons()
return true;
for (const ParticipantManagement::TemplateParticipant &templateData : std::as_const(templates))
{
DEBUG_LOG(m_logger) << LOGFUNCTION << " templateId = " << templateData.templateId()
DEBUG_LOG() << Q_FUNC_INFO << " templateId = " << templateData.templateId()
<< " typeId = " << templateData.typeId()
<< " designator= " << templateData.designator().c_str()
<< " tactIdent= " << templateData.tacticalIdentifier().c_str();
@@ -364,7 +363,7 @@ bool OrgChartMain::initButtons()
m_templateMimeDataHelpers[icon] = mimeDataHelper;
if (!mimeDataHelper->init(icon, templateId, m_dtc, AdvancedSymbology::SymbolDictionary::defaultSymbologyType()))
{
ERROR_LOG(m_logger) << LOGFUNCTION << " init failed"
ERROR_LOG() << Q_FUNC_INFO << " init failed"
<< " (m_ui->cbParty->isVisible() " << m_ui->cbParty->isVisible() << ")";
continue;
}
@@ -554,11 +553,11 @@ void OrgChartMain::onPartyChanged()
__unchange__();
DEBUG_LOG(m_logger) << "onPartyChanged - parties: " << m_ui->cbParty->count();
DEBUG_LOG() << "onPartyChanged - parties: " << m_ui->cbParty->count();
m_party = m_ui->cbParty->currentData().toInt();
DEBUG_LOG(m_logger) << " OrgChartMain::onPartyChanged()!!! -> newPartyId" << m_party;
DEBUG_LOG() << " OrgChartMain::onPartyChanged()!!! -> newPartyId" << m_party;
m_ui->cbParty->setEnabled(false);
@@ -645,7 +644,7 @@ void OrgChartMain::onDelete(const QString &data)
void OrgChartMain::onUpdateItem(const QModelIndex &parent, const ParticipantData &editData)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
Q_UNUSED(parent);
@@ -108,7 +108,6 @@ private:
int m_rootTemplateId;
int m_party;
Ui::OrgChartMain *m_ui;
NGL::INGLLogger &m_logger;
};
}
@@ -11,18 +11,17 @@ namespace ParticipantManagement
OrgChartMain_MimeDataHelper::OrgChartMain_MimeDataHelper(QObject *parent)
: QObject(parent)
, m_logger(getLogger("OrgChartMain_MimeDataHelper"))
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START";
TRACE_LOG(m_logger) << LOGFUNCTION << "END";
TRACE_LOG() << Q_FUNC_INFO << "START";
TRACE_LOG() << Q_FUNC_INFO << "END";
}
OrgChartMain_MimeDataHelper::~OrgChartMain_MimeDataHelper()
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START";
TRACE_LOG() << Q_FUNC_INFO << "START";
delete m_bulkRendererFindImage;
TRACE_LOG(m_logger) << LOGFUNCTION << "END";
TRACE_LOG() << Q_FUNC_INFO << "END";
}
bool OrgChartMain_MimeDataHelper::init(LtsWidgets::LtsDragIcon *widget,
@@ -30,14 +29,14 @@ bool OrgChartMain_MimeDataHelper::init(LtsWidgets::LtsDragIcon *widget,
const std::shared_ptr<Interface::Dtc> &dtc,
AdvancedSymbology::SymbologyType symbologyType)
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START";
TRACE_LOG() << Q_FUNC_INFO << "START";
m_templateId = templateId;
m_symbologyType = symbologyType;
if (!widget)
{
ERROR_LOG(m_logger) << LOGFUNCTION << "no widget";
ERROR_LOG() << Q_FUNC_INFO << "no widget";
return false;
}
m_widget = widget;
@@ -45,18 +44,18 @@ bool OrgChartMain_MimeDataHelper::init(LtsWidgets::LtsDragIcon *widget,
if (!dtc)
{
ERROR_LOG(m_logger) << "Could not load all interfaces needed";
ERROR_LOG() << "Could not load all interfaces needed";
return false;
}
m_dtc = dtc;
TRACE_LOG(m_logger) << LOGFUNCTION << "END";
TRACE_LOG() << Q_FUNC_INFO << "END";
return true;
}
void OrgChartMain_MimeDataHelper::run(AdvancedSymbology::Role role, const QColor &color)
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START"
TRACE_LOG() << Q_FUNC_INFO << "START"
<< " m_symbologyType = " << m_symbologyType
<< " role = " << role
<< " color = " << color.name();
@@ -66,7 +65,7 @@ void OrgChartMain_MimeDataHelper::run(AdvancedSymbology::Role role, const QColor
if (!m_dtc)
{
ERROR_LOG(m_logger) << "Could not load all interfaces needed";
ERROR_LOG() << "Could not load all interfaces needed";
return;
}
@@ -84,12 +83,12 @@ void OrgChartMain_MimeDataHelper::run(AdvancedSymbology::Role role, const QColor
m_bulkRendererFindImage->run();
TRACE_LOG(m_logger) << LOGFUNCTION << "END";
TRACE_LOG() << Q_FUNC_INFO << "END";
}
void OrgChartMain_MimeDataHelper::prepareBulkRenderer(int templateId)
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START"
TRACE_LOG() << Q_FUNC_INFO << "START"
<< " templateId= " << templateId;
const TemplateParticipant &tPart = m_dtc->templateParticipant(templateId);
@@ -97,7 +96,7 @@ void OrgChartMain_MimeDataHelper::prepareBulkRenderer(int templateId)
const AdvancedSymbology::SymbolDataToRender &symDataToRender =
symbolDataToRender(QString::fromStdString(tPart.symbol()));
DEBUG_LOG(m_logger) << LOGFUNCTION << " addRequest for templateId = " << templateId << ": "
DEBUG_LOG() << Q_FUNC_INFO << " addRequest for templateId = " << templateId << ": "
<< " tPart = " << tPart
<< " symDataToRender=" << symDataToRender.toString();
@@ -113,7 +112,7 @@ void OrgChartMain_MimeDataHelper::prepareBulkRenderer(int templateId)
prepareBulkRenderer(infId);
}
TRACE_LOG(m_logger) << LOGFUNCTION << "END";
TRACE_LOG() << Q_FUNC_INFO << "END";
}
QJsonObject OrgChartMain_MimeDataHelper::getMimeData(int templateId)
@@ -142,7 +141,7 @@ QJsonObject OrgChartMain_MimeDataHelper::getMimeData(int templateId)
const AdvancedSymbology::SymbolDataToRender &symDataToRender =
symbolDataToRender(QString::fromStdString(tPart.symbol()));
DEBUG_LOG(m_logger) << LOGFUNCTION << " getResult for templateId = " << templateId
DEBUG_LOG() << Q_FUNC_INFO << " getResult for templateId = " << templateId
<< " symDataToRender=" << symDataToRender.toString();
QSharedPointer<AdvancedSymbology::SymbolResultWatcher> watcher =
@@ -158,7 +157,7 @@ QJsonObject OrgChartMain_MimeDataHelper::getMimeData(int templateId)
.arg(QString::fromLatin1(data.toBase64()));
retObj.insert(QStringLiteral("image"), imageAdd);
} else {
ERROR_LOG(m_logger) << LOGFUNCTION << " getResult failed! "
ERROR_LOG() << Q_FUNC_INFO << " getResult failed! "
<< " templateId = " << templateId
<< " symDataToRender=" << symDataToRender.toString();
}
@@ -190,10 +189,10 @@ AdvancedSymbology::SymbolDataToRender OrgChartMain_MimeDataHelper::symbolDataToR
void OrgChartMain_MimeDataHelper::onRenderingFinished()
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START, bulkRendererFindImage->size: " << m_bulkRendererFindImage->size();
TRACE_LOG() << Q_FUNC_INFO << "START, bulkRendererFindImage->size: " << m_bulkRendererFindImage->size();
const QJsonObject &obj = getMimeData(m_templateId);
DEBUG_LOG(m_logger) << LOGFUNCTION << " m_templateId =" << m_templateId
DEBUG_LOG() << Q_FUNC_INFO << " m_templateId =" << m_templateId
<< " obj.size = " << obj.size()
<< " size2 = " << QJsonDocument(obj).toJson().size();
@@ -203,7 +202,7 @@ void OrgChartMain_MimeDataHelper::onRenderingFinished()
m_widget->setEnabled(true);
}
TRACE_LOG(m_logger) << LOGFUNCTION << "END";
TRACE_LOG() << Q_FUNC_INFO << "END";
}
}
@@ -53,7 +53,6 @@ private:
QColor m_color;
AdvancedSymbology::SymbologyType m_symbologyType = AdvancedSymbology::SymbologyType::None;
AdvancedSymbology::BulkRendererFindImage *m_bulkRendererFindImage = nullptr;
NGL::INGLLogger &m_logger;
};
}
@@ -32,7 +32,6 @@ LtsParticipantsOrgChart::LtsParticipantsOrgChart(QWidget *parent)
, m_dtc(nullptr)
, m_asbItc(nullptr)
, m_ui(new Ui::LtsParticipantsOrgChart)
, m_logger(getLogger("LtsParticipantsOrgChart"))
{
m_ui->setupUi(this);
}
@@ -128,7 +127,7 @@ bool LtsParticipantsOrgChart::init(const std::shared_ptr<ParticipantManagement::
void LtsParticipantsOrgChart::loadParty(int partyId)
{
TRACE_LOG(m_logger) << "loadParty " << partyId;
TRACE_LOG() << "loadParty " << partyId;
m_partyId = partyId;
const QMap<qint32, ParticipantManagement::Participant> participantMap = m_dtc->participants();
@@ -160,7 +159,7 @@ void LtsParticipantsOrgChart::loadParty(int partyId)
m_participantOrgChart_MimeDataHelper = new ParticipantOrgChart_MimeDataHelper(this);
if (!m_participantOrgChart_MimeDataHelper->init(m_dtc, AdvancedSymbology::SymbolDictionary::defaultSymbologyType(), true))
{
ERROR_LOG(m_logger) << LOGFUNCTION << " init failed";
ERROR_LOG() << Q_FUNC_INFO << " init failed";
return;
}
@@ -176,7 +175,7 @@ void LtsParticipantsOrgChart::loadParty(int partyId)
void LtsParticipantsOrgChart::onParticipantOrgChart_MimeDataHelperFinished()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
QString preDefThing = QLatin1String(" var datascource = ");
@@ -206,13 +205,13 @@ void LtsParticipantsOrgChart::onParticipantOrgChart_MimeDataHelperFinished()
m_ui->wevOrgChart->reload();
}
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
bool LtsParticipantsOrgChart::loadTemplate(int templateRootId)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
ParticipantManagement::TemplateParticipant root = m_dtc->templateParticipant(templateRootId);
if (m_ui->wevOrgChart->page()->url().toString() == QLatin1String("about:blank"))
@@ -225,7 +224,7 @@ bool LtsParticipantsOrgChart::loadTemplate(int templateRootId)
m_participantOrgChart_MimeDataHelper = new ParticipantOrgChart_MimeDataHelper(this);
if (!m_participantOrgChart_MimeDataHelper->init(m_dtc, AdvancedSymbology::SymbolDictionary::defaultSymbologyType(), false))
{
ERROR_LOG(m_logger) << LOGFUNCTION << " init failed";
ERROR_LOG() << Q_FUNC_INFO << " init failed";
return false;
}
@@ -248,7 +247,7 @@ void LtsParticipantsOrgChart::updateParticipant(int participantId)
if (!helper->init(m_dtc, AdvancedSymbology::SymbolDictionary::defaultSymbologyType(), true))
{
ERROR_LOG(m_logger) << LOGFUNCTION << " init failed";
ERROR_LOG() << Q_FUNC_INFO << " init failed";
return;
}
@@ -266,24 +265,24 @@ void LtsParticipantsOrgChart::updateParticipant(int participantId)
void LtsParticipantsOrgChart::onSingleParticipantOrgChart_MimeDataHelperFinished()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
ParticipantOrgChart_MimeDataHelper *senderWatcher = qobject_cast<ParticipantOrgChart_MimeDataHelper*>(sender());
if (!senderWatcher)
{
ERROR_LOG(m_logger) << LOGFUNCTION << " sender failed";
ERROR_LOG() << Q_FUNC_INFO << " sender failed";
return;
}
const int participantId = senderWatcher->getParticipantId();
const QJsonObject &newJson = senderWatcher->getMimeDataResult();
DEBUG_LOG(m_logger) << LOGFUNCTION << " sendUpdateString:"
DEBUG_LOG() << Q_FUNC_INFO << " sendUpdateString:"
<< " participantId=" << participantId;
emit sendUpdateString(participantId, newJson);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
@@ -6,7 +6,7 @@
#include <QWidget>
#include <QtWebChannel/QWebChannel>
#include <Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <Lts/Plugins/ParticipantManagement/Gui/Common/ppmcommon_export.h>
#include <Services/ParticipantManagement/ppm_dtc.h>
#include <ParticipantManagement/logger.h>
@@ -112,8 +112,6 @@ private:
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtc;
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asbItc;
Ui::LtsParticipantsOrgChart *m_ui;
LOGGER_T m_logger;
};
}
@@ -12,42 +12,41 @@ namespace ParticipantManagement
ParticipantOrgChart_MimeDataHelper::ParticipantOrgChart_MimeDataHelper(QObject *parent)
: QObject(parent)
, m_logger(getLogger("ParticipantOrgChart_MimeDataHelper"))
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START";
TRACE_LOG(m_logger) << LOGFUNCTION << "END";
TRACE_LOG() << Q_FUNC_INFO << "START";
TRACE_LOG() << Q_FUNC_INFO << "END";
}
ParticipantOrgChart_MimeDataHelper::~ParticipantOrgChart_MimeDataHelper()
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START";
TRACE_LOG() << Q_FUNC_INFO << "START";
delete m_bulkRendererFindImage;
delete m_bulkRendererFindBaseSymbol;
TRACE_LOG(m_logger) << LOGFUNCTION << "END";
TRACE_LOG() << Q_FUNC_INFO << "END";
}
bool ParticipantOrgChart_MimeDataHelper::init(const std::shared_ptr<Interface::Dtc> &dtc,
AdvancedSymbology::SymbologyType symbologyType, bool participantMode)
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START";
TRACE_LOG() << Q_FUNC_INFO << "START";
m_symbologyType = symbologyType;
m_participantMode = participantMode;
if (!dtc)
{
ERROR_LOG(m_logger) << "Could not load all interfaces needed";
ERROR_LOG() << "Could not load all interfaces needed";
return false;
}
m_dtc = dtc;
TRACE_LOG(m_logger) << LOGFUNCTION << "END";
TRACE_LOG() << Q_FUNC_INFO << "END";
return true;
}
void ParticipantOrgChart_MimeDataHelper::run(int participantId, bool single, AdvancedSymbology::Role role, const QColor &color, bool useSymData)
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START"
TRACE_LOG() << Q_FUNC_INFO << "START"
<< ", participantId=" << participantId
<< ", single=" << single
<< ", role=" << role
@@ -62,7 +61,7 @@ void ParticipantOrgChart_MimeDataHelper::run(int participantId, bool single, Adv
if (!m_dtc)
{
ERROR_LOG(m_logger) << "Could not load all interfaces needed";
ERROR_LOG() << "Could not load all interfaces needed";
return;
}
@@ -88,14 +87,14 @@ void ParticipantOrgChart_MimeDataHelper::run(int participantId, bool single, Adv
else
m_bulkRendererFindBaseSymbol->run();
TRACE_LOG(m_logger) << LOGFUNCTION << "END"
TRACE_LOG() << Q_FUNC_INFO << "END"
<< ", color=" << color.name()
<< ", useSymData" << useSymData;
}
bool ParticipantOrgChart_MimeDataHelper::prepareBulkRenderer(int participantId, bool single)
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START"
TRACE_LOG() << Q_FUNC_INFO << "START"
<< ", participantId=" << participantId
<< ", single=" << single;
@@ -140,13 +139,13 @@ bool ParticipantOrgChart_MimeDataHelper::prepareBulkRenderer(int participantId,
for (int infId : inferior)
prepareBulkRenderer(infId, single);
TRACE_LOG(m_logger) << LOGFUNCTION << "END";
TRACE_LOG() << Q_FUNC_INFO << "END";
return true;
}
QJsonObject ParticipantOrgChart_MimeDataHelper::getMimeData(int participantId, bool single)
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START"
TRACE_LOG() << Q_FUNC_INFO << "START"
<< ", participantId=" << participantId
<< ", single=" << single;
@@ -201,7 +200,7 @@ QJsonObject ParticipantOrgChart_MimeDataHelper::getMimeData(int participantId, b
.arg(QString::fromLatin1(data.toBase64()));
retObj.insert(QStringLiteral("image"), imageAdd);
} else {
ERROR_LOG(m_logger) << LOGFUNCTION << " SymbolResultWatcher for 2nd recusion not found";
ERROR_LOG() << Q_FUNC_INFO << " SymbolResultWatcher for 2nd recusion not found";
}
@@ -224,7 +223,7 @@ QJsonObject ParticipantOrgChart_MimeDataHelper::getMimeData(int participantId, b
QJsonObject ParticipantOrgChart_MimeDataHelper::getTemplateMimeData(int participantId, bool single)
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START"
TRACE_LOG() << Q_FUNC_INFO << "START"
<< ", participantTemplateId=" << participantId
<< ", single=" << single;
@@ -279,7 +278,7 @@ QJsonObject ParticipantOrgChart_MimeDataHelper::getTemplateMimeData(int particip
.arg(QString::fromLatin1(data.toBase64()));
retObj.insert(QStringLiteral("image"), imageAdd);
} else {
ERROR_LOG(m_logger) << LOGFUNCTION << " SymbolResultWatcher for 2nd recusion not found";
ERROR_LOG() << Q_FUNC_INFO << " SymbolResultWatcher for 2nd recusion not found";
}
@@ -351,12 +350,12 @@ AdvancedSymbology::SymbolDataToRender ParticipantOrgChart_MimeDataHelper::symbol
void ParticipantOrgChart_MimeDataHelper::onRenderingFinished()
{
TRACE_LOG(m_logger) << LOGFUNCTION << "START, bulkRendererFindImage->size: " << m_bulkRendererFindImage->size();
TRACE_LOG() << Q_FUNC_INFO << "START, bulkRendererFindImage->size: " << m_bulkRendererFindImage->size();
if (m_participantMode)
m_mimeData = getMimeData(m_participantId, m_single);
else
m_mimeData = getTemplateMimeData(m_participantId, m_single);
DEBUG_LOG(m_logger) << LOGFUNCTION
DEBUG_LOG() << Q_FUNC_INFO
<< " m_participantId =" << m_participantId
<< " m_single = " << m_single
<< " m_mimeData.size = " << m_mimeData.size()
@@ -364,7 +363,7 @@ void ParticipantOrgChart_MimeDataHelper::onRenderingFinished()
emit finished();
TRACE_LOG(m_logger) << LOGFUNCTION << "END";
TRACE_LOG() << Q_FUNC_INFO << "END";
}
}
@@ -62,7 +62,6 @@ private:
AdvancedSymbology::BulkRendererFindImage *m_bulkRendererFindImage = nullptr;
AdvancedSymbology::BulkRendererFindBaseSymbol *m_bulkRendererFindBaseSymbol = nullptr;
QJsonObject m_mimeData;
NGL::INGLLogger &m_logger;
};
}
@@ -42,7 +42,6 @@ ParticipantSelection::ParticipantSelection(LtsSession::LtsSession *session, QWid
, m_ppmGuiCbxIfc(nullptr)
, m_session(session)
, m_ui(new Ui::ParticipantSelection)
, m_logger(getLogger("ParticipantSelection"))
{
m_ui->setupUi(this);
@@ -9,7 +9,7 @@
#include <LtsWidgets/lts_frameless_dialog.h>
#include <LtsSession/lts_session.h>
#include <LtsUtilsGuiDds/request_helper.h>
#include <ParticipantSelection/ppmparticipantselectiongui_export.h>
#include "ppmparticipantselectiongui_export.h"
class QTreeView;
@@ -99,7 +99,6 @@ private:
ParticipantTableFilterProxyModel *m_proxyTable{nullptr};
Ui::ParticipantSelection *m_ui;
NGL::INGLLogger &m_logger;
};
}
@@ -657,7 +657,7 @@ void ParticipantSelectionModel::insertChildrenOf(int parentId,
auto it = tmap.constFind(childId);
if (it == tmap.constEnd())
{
WARNING_LOG(m_logger) << "Can not find participant with id " << childId << " - ignoring";
WARNING_LOG() << "Can not find participant with id " << childId << " - ignoring";
continue;
}
const ParticipantData &data = it.value();
@@ -682,7 +682,7 @@ void ParticipantSelectionModel::insertChildrenOf(int parentId,
childItem->participant = data;
childItem->bIsChecked = isChecked(checkedParticipants.contains(data.id()), cs);
DEBUG_LOG(m_logger) << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
DEBUG_LOG() << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
<< ") to parent " << parent << " at pos " << insertPos;
insertRow(insertPos, parentIdx, childItem);
tryRenderSymbol(QString::fromStdString(data.symbol()), childItem);
@@ -913,7 +913,7 @@ void ParticipantSelectionModel::onParticipantChanged(const ParticipantManagement
CheckedTreeItem *childItem = static_cast<CheckedTreeItem *>(createItem(QVariant(), QIcon()));
childItem->participant = m_dtc->convertParticipantToParticipantData(data);
DEBUG_LOG(m_logger) << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
DEBUG_LOG() << "insert Child " << childItem << "(" << data.id() << ", " << data.hierarchyNumber()
<< ") to parent " << ctiParent << " at pos " << insertPos;
insertRow(insertPos, indexFromItem(ctiParent), childItem);
tryRenderSymbol(QString::fromStdString(data.symbol()), childItem);
@@ -5,7 +5,7 @@
#include <Common/participant_icon_model_base.h>
#include <ParticipantManagement/logger.h>
#include <Plugins/ParticipantManagement/Gui/ParticipantSelection/ppmparticipantselectiongui_export.h>
#include <Lts/Plugins/ParticipantManagement/Gui/ParticipantSelection/ppmparticipantselectiongui_export.h>
#include <nglwidgets/ngltreeitem.h>
#include <LtsWidgets/lts_column_filter_proxy_model.h>
@@ -267,8 +267,6 @@ private:
SortData m_sortData;
ParticipantSelectionModel *m_sourceModel{nullptr};
NGL::INGLLogger &m_logger;
};
}
@@ -38,7 +38,6 @@ ParticipantTemplateChooser::ParticipantTemplateChooser(const QString &menuGroup,
, m_session(session)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_ui(new Ui::ParticipantTemplateChooser)
, m_logger(getLogger("ParticipantTemplateChooser"))
{
m_ui->setupUi(this);
m_ui->widget->setSelectionMode(QAbstractItemView::SingleSelection);
@@ -63,8 +63,6 @@ private:
LtsUtils::RequestHelper *m_requestHelper;
Ui::ParticipantTemplateChooser *m_ui;
LOGGER_T m_logger;
};
}
@@ -16,7 +16,6 @@ ParticipantTemplateChooserFrameless::ParticipantTemplateChooserFrameless(LtsSess
, m_dtc(nullptr)
, m_session(session)
, m_ui(new Ui::ParticipantTemplateChooserFrameless)
, m_logger(getLogger("ParticipantTemplateChooser"))
{
m_ui->setupUi(this);
m_ui->widget->setSelectionMode(QAbstractItemView::SingleSelection);
@@ -38,8 +38,6 @@ private:
LtsSession::LtsSession *m_session;
Ui::ParticipantTemplateChooserFrameless *m_ui;
LOGGER_T m_logger;
};
}
@@ -22,7 +22,6 @@ ParticipantTemplateChooserModel::ParticipantTemplateChooserModel(bool asSupportS
, AdvancedSymbology::TableModelSymbolRenderer<ParticipantTemplateChooserModel>(ColDesignatorIdentifier)
, m_asSupportService(asSupportService)
, m_dtc(nullptr)
, m_logger(getLogger("ParticipantTemplateChooserModel"))
{}
ParticipantTemplateChooserModel::~ParticipantTemplateChooserModel()
@@ -60,7 +60,5 @@ private:
bool m_asSupportService;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtc;
LOGGER_T m_logger;
};
}
@@ -36,7 +36,6 @@ ParticipantTemplateEdit::ParticipantTemplateEdit(LtsSession::LtsSession *session
, m_ppmGuiCbxIfc(nullptr)
, m_session(session)
, m_ui(new Ui::ParticipantTemplateEdit)
, m_logger(getLogger("ParticipantTemplateEdit"))
{
m_ui->setupUi(this);
@@ -403,7 +402,7 @@ void ParticipantTemplateEdit::onDoubleClicked(const QModelIndex &selIndex)
void ParticipantTemplateEdit::onSelectionChanged(const QItemSelection & ,
const QItemSelection & )
{
DEBUG_LOG(m_logger) << "onSelectionChanged";
DEBUG_LOG() << "onSelectionChanged";
enaDisa();
}
@@ -104,7 +104,6 @@ private:
FiringUnitValidator *m_firingUnitValidator { nullptr };
Ui::ParticipantTemplateEdit *m_ui;
NGL::INGLLogger &m_logger;
};
}
@@ -19,7 +19,6 @@ TemplateUnitNamer::TemplateUnitNamer(bool asSupportService, const std::shared_pt
, m_ppmGuiCbxIfc(ppmGuiCbxIfc)
, m_ui(new Ui::TemplateUnitNamer)
, m_validator(new QRegularExpressionValidator(QRegularExpression(QStringLiteral("[^,;\"'´`]*")), this))
, m_logger(getLogger("TemplateTemplateChooser"))
{
m_ui->setupUi(this);
if (!m_ppmGuiCbxIfc || !m_dtc)
@@ -42,7 +42,6 @@ private:
std::shared_ptr<ParticipantManagement::ForeignGuiComboboxInterface> m_ppmGuiCbxIfc;
Ui::TemplateUnitNamer *m_ui;
QValidator *m_validator;
LOGGER_T m_logger;
};
}
@@ -23,7 +23,6 @@ OperatorPartyAssignment::OperatorPartyAssignment(const QString &menuGroup, QWidg
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_operatorId(-1)
, m_model(nullptr)
, m_logger(getLogger("OperatorPartyAssignment"))
, m_ui(new Ui::OperatorPartyAssignment)
{
m_ui->setupUi(this);
@@ -49,17 +48,17 @@ bool OperatorPartyAssignment::init(LtsSession::LtsSession *session)
m_buttonBox->getButton(LtsWidgets::DialogButton::Ok)->setVisible(false);
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger)<<" -- Couldn't init ppmDtc";
ERROR_LOG()<<" -- Couldn't init ppmDtc";
return false;
}
if (!m_session->getDtc<OperatorManagement::DataInterface>(m_opmDtc))
{
ERROR_LOG(m_logger)<<" -- Couldn't init opmDtc";
ERROR_LOG()<<" -- Couldn't init opmDtc";
return false;
}
if (!m_session->getFtc<ParticipantManagement::DataInterface>(m_ppmFtc))
{
ERROR_LOG(m_logger)<<" -- Couldn't init ppmFtc";
ERROR_LOG()<<" -- Couldn't init ppmFtc";
return false;
}
@@ -99,7 +98,7 @@ QMap<int, bool> OperatorPartyAssignment::getPartyStatesForOpertator() const
DEBUG_LOG(m_logger)<<" -- [getPartyStatesForOpertator] -> ";
DEBUG_LOG()<<" -- [getPartyStatesForOpertator] -> ";
const auto &partys = m_ppmDtc->partys();
QMap<int,bool> mapPartyCheckStates;
for (auto p : partys)
@@ -56,8 +56,6 @@ private:
QMap<int, QString> m_operatorMap;
OPeratorPartyAssignmentModel *m_model;
LOGGER_T m_logger;
Ui::OperatorPartyAssignment *m_ui;
};
@@ -17,7 +17,6 @@ OPeratorPartyAssignmentModel::OPeratorPartyAssignmentModel(QObject *parent)
tr("Role")},
parent)
, m_dtc(nullptr)
, m_logger(getLogger("OPeratorPartyAssignmentModel"))
{
}
bool OPeratorPartyAssignmentModel::initModel(const std::shared_ptr<ParticipantManagement::Interface::Dtc> &dtc)
@@ -47,8 +47,6 @@ protected:
}
private:
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtc;
LOGGER_T m_logger;
QMap<int, bool> m_mapPartyCheckStates;
};
@@ -34,7 +34,6 @@ PartyEdit::PartyEdit(QWidget *parent)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_session(nullptr)
, m_ui(new Ui::PartyEdit)
, m_logger(getLogger("PartyEdit"))
{
m_ui->setupUi(this);
}
@@ -71,7 +70,7 @@ void PartyEdit::lock()
bool PartyEdit::init(int partyId, LtsSession::LtsSession *session)
{
DEBUG_LOG(m_logger) << "PartyEdit::init()";
DEBUG_LOG() << "PartyEdit::init()";
m_session = session;
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_dtc))
@@ -180,7 +179,7 @@ bool PartyEdit::apply()
reqOpm.rolePresetId(user.rolePresetId());
QString properties = QString::fromUtf8(QJsonDocument(opmProperties).toJson());
DEBUG_LOG(m_logger) << "properties: " << properties;
DEBUG_LOG() << "properties: " << properties;
reqOpm.properties(properties.toStdString());
m_requestHelper->addRequest([reqOpm, this]()
@@ -365,14 +364,14 @@ void PartyEdit::notificationCheck()
{
if (!m_dtcOpm->isAdlerAllowedParty(m_session->exerciseId(), m_partyId, LtsSessionData::LtsSessionData::getInstance()->getOperatorId()))
{
WARNING_LOG(m_logger) << "Party " << m_partyId << " not allowed for this user";
WARNING_LOG() << "Party " << m_partyId << " not allowed for this user";
m_ui->lblNotifications->hide();
m_ui->cbAdlerNotification->hide();
m_ui->cbCombatOrder->hide();
return;
}
DEBUG_LOG(m_logger) << "Party allowed for ADLER notifications";
DEBUG_LOG() << "Party allowed for ADLER notifications";
const std::string properties = m_dtcOpm->user(LtsSessionData::LtsSessionData::getInstance()->getOperatorId()).properties();
QJsonObject opmProperties(QJsonDocument::fromJson(QByteArray::fromStdString(properties)).object());
@@ -408,7 +407,7 @@ void PartyEdit::notificationCheck()
void PartyEdit::modifyPartyProperties()
{
DEBUG_LOG(m_logger) << LOGFUNCTION;
DEBUG_LOG() << Q_FUNC_INFO;
ParticipantManagement::Party requestParty;
requestParty = m_dtc->party(m_partyId);
@@ -423,11 +422,11 @@ void PartyEdit::modifyPartyProperties()
if (parserError.error != QJsonParseError::NoError)
{
ERROR_LOG(m_logger) << "Error parsing json document: " << parserError.errorString() << " '" << propertiesBa << "'";
ERROR_LOG() << "Error parsing json document: " << parserError.errorString() << " '" << propertiesBa << "'";
doc = QJsonDocument();
}
DEBUG_LOG(m_logger) << "json to parse: " << doc.toJson();
DEBUG_LOG() << "json to parse: " << doc.toJson();
QJsonObject obj(doc.object());
obj[QStringLiteral("Adler")] = adlerPropertiesObj;
@@ -27,7 +27,6 @@ PartyModel::PartyModel(QObject *parent)
tr("Szenar Name")},
parent)
, m_ppmDtc(nullptr)
, m_logger(getLogger("PartyModel"))
{}
bool PartyModel::initModel(LtsSession::LtsSession *session)
@@ -35,12 +34,12 @@ bool PartyModel::initModel(LtsSession::LtsSession *session)
m_session = session;
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG(m_logger)<<" Couldn't load ppmDtc!!! ";
ERROR_LOG()<<" Couldn't load ppmDtc!!! ";
return false;
}
if (!m_session->getDtc<OperatorManagement::DataInterface>(m_opmDtc))
{
ERROR_LOG(m_logger)<<" Couldn't load opmDtc!!! ";
ERROR_LOG()<<" Couldn't load opmDtc!!! ";
return false;
}
@@ -57,6 +57,5 @@ private:
int m_operatorId;
int m_exerciseId;
LtsSession::LtsSession *m_session;
LOGGER_T m_logger;
};
}
@@ -23,7 +23,6 @@ PartyView::PartyView(const QString &menuGroup, QWidget *parent)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_session(nullptr)
, m_ui(new Ui::PartyView)
, m_logger(getLogger("PartyView"))
{
m_ui->setupUi(this);
m_ui->widget->setSelectionMode(QAbstractItemView::SingleSelection);
@@ -197,7 +196,7 @@ void PartyView::onSyncParties()
SyncPartiesRequest req;
req.exerciseId(m_session->exerciseId());
DEBUG_LOG(m_logger) << "Sync parties for exercise " << req.exerciseId();
DEBUG_LOG() << "Sync parties for exercise " << req.exerciseId();
return m_ftc->syncPartiesRequest(req, this);
});
@@ -63,9 +63,6 @@ private:
LtsSession::LtsSession *m_session;
Ui::PartyView *m_ui;
LOGGER_T m_logger;
};
}
@@ -30,7 +30,6 @@ SAABEdit::SAABEdit(LtsSession::LtsSession *session, QWidget *parent)
, m_pModelSystem(nullptr)
, m_pModelImport(nullptr)
, m_ui(new Ui::SAABDialog)
, m_logger(getLogger("SAABEdit"))
{
m_ui->setupUi(this);
@@ -76,7 +76,6 @@ private:
ParticipantEditModel *m_pModelImport;
Ui::SAABDialog *m_ui;
NGL::INGLLogger &m_logger;
};
}
@@ -36,7 +36,7 @@ SET(zwmssaab_UICS
)
NGL_WRAP_UI(zwmssaab_SRCS ${zwmssaab_UICS})
NGL_ADD_LIBRARY(WS zwmssaab SHARED ${zwmssaab_SRCS} ${zwmssaab_UICS} ${zwmssaab_IDLS})
NGL_ADD_LIBRARY2(WS zwmssaab SHARED ${zwmssaab_SRCS} ${zwmssaab_UICS} ${zwmssaab_IDLS})
NGL_TARGET_INCLUDE_DIRECTORIES(zwmssaab
PUBLIC
${CMAKE_CURRENT_BINARY_DIR}
Loaded 100 of 2785 files, more files were not shown because too many files have changed in this diff. Show more