Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
+5
-6
@@ -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)
|
||||
|
||||
-1
@@ -53,7 +53,6 @@ private:
|
||||
static int s_preselectedParty;
|
||||
|
||||
Ui::CombatPower *m_ui;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+17
-18
@@ -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);
|
||||
|
||||
|
||||
-1
@@ -108,7 +108,6 @@ private:
|
||||
int m_rootTemplateId;
|
||||
int m_party;
|
||||
Ui::OrgChartMain *m_ui;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+19
-20
@@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
-1
@@ -53,7 +53,6 @@ private:
|
||||
QColor m_color;
|
||||
AdvancedSymbology::SymbologyType m_symbologyType = AdvancedSymbology::SymbologyType::None;
|
||||
AdvancedSymbology::BulkRendererFindImage *m_bulkRendererFindImage = nullptr;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+11
-12
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-3
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
+19
-20
@@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
-1
@@ -62,7 +62,6 @@ private:
|
||||
AdvancedSymbology::BulkRendererFindImage *m_bulkRendererFindImage = nullptr;
|
||||
AdvancedSymbology::BulkRendererFindBaseSymbol *m_bulkRendererFindBaseSymbol = nullptr;
|
||||
QJsonObject m_mimeData;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user