Qt6 Migration: Merge latest Qt5 devel content and apply migration fixes
- Merged 292 changed files from dlbo snapshot - Fixed IDL enum collisions (PortType, PdmEventType) - Fixed Grantlee template for C++11 scoped enums - Fixed CMake VERSION_GREATER syntax - Added missing directories (THP, LtsRestClient, etc.) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
310 files changed
+2823
-740
No files matched your search
@@ -101,3 +101,11 @@ ADD_INTERFACE_LIBRARY(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
# GuiElementInterface
|
||||
ADD_INTERFACE_LIBRARY(
|
||||
GuiElementInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/participant_info_gui_element_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
Qt5::Core LtsWidgets
|
||||
)
|
||||
@@ -100,6 +100,8 @@ NGL_TARGET_LINK_LIBRARIES(PpmParticipantInfoGuiPlugin
|
||||
AesDataPluginInterface
|
||||
LtsDataView
|
||||
IsmDataPluginInterface
|
||||
LtsPluginLoader
|
||||
GuiElementInterface
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(PpmParticipantInfoGuiPlugin)
|
||||
|
||||
@@ -33,8 +33,10 @@
|
||||
#include <LtsSession/lts_session_data.h>
|
||||
#include <LtsUtilsCore/outdated_position.h>
|
||||
#include <LtsUtilsSettings/settings.h>
|
||||
#include <LtsPluginManager/lts_plugin_loader.h>
|
||||
|
||||
#include <Services/AreaEffectSimulation/Utils/polygons.h>
|
||||
#include <ParticipantManagement/participant_info_gui_element_interface.h>
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QTableWidgetItem>
|
||||
@@ -471,8 +473,38 @@ bool ParticipantInfoDialog::setUiValues()
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << m_typeClass;
|
||||
}
|
||||
|
||||
#if LTS_DEBUG
|
||||
//-- start Test Gui Elment plugin
|
||||
|
||||
auto cb = [this](const LtsPluginManager::PluginInstance &pi) { return loadGuiElementPLugin(pi);};
|
||||
LtsPluginManager::LtsPluginLoader::getInstance()->loadPlugins(LtsPluginManager::PluginType::GUI_ELEMENT,
|
||||
cb,
|
||||
QStringList());
|
||||
|
||||
//-- end Test Gui Element plugin
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ParticipantInfoDialog::loadGuiElementPLugin(const LtsPluginManager::PluginInstance &pi)
|
||||
{
|
||||
WARNING_LOG(m_logger)<<">>>> GUI Element pluginName: "<<pi.fileName;
|
||||
GuiElementInterface *guiElement = qobject_cast<GuiElementInterface *>(pi.plugin);
|
||||
|
||||
if (guiElement->pluginName() == QStringLiteral("KeyValueGuiElement_XY"))
|
||||
{
|
||||
if (!guiElement->init(m_session, m_participant.id()))
|
||||
return false;
|
||||
|
||||
m_ui->gridLayout_2->addWidget(guiElement->createGuiElement(this));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
//SLOTS
|
||||
|
||||
void ParticipantInfoDialog::onDynamicParticipantDataChanged(const DynamicParticipantData &data, DataModification modType)
|
||||
|
||||
@@ -110,6 +110,7 @@ private:
|
||||
bool initTargetConfig(bool bShow);
|
||||
// Target (L400)
|
||||
bool initTargetConfigL400(bool bShow);
|
||||
bool loadGuiElementPLugin(const LtsPluginManager::PluginInstance &pi);
|
||||
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
@@ -54,7 +54,7 @@ PartyEdit::~PartyEdit()
|
||||
|
||||
void PartyEdit::retranslate()
|
||||
{
|
||||
translate(m_ui, m_dtc->party(m_partyId), tr("Party"));
|
||||
translate(m_ui, m_dtc->party(m_partyId), trPartyName(m_dtc->party(m_partyId).name()), tr("Party"));
|
||||
m_ppmGuiCbxIfc->fillRoleComboBox(m_ui->cbRole);
|
||||
m_ppmGuiCbxIfc->fillHlaForceIdentifierComboBox(m_ui->cbHlaForceIdentifier);
|
||||
}
|
||||
|
||||
@@ -105,14 +105,11 @@ QVariant PartyModel::data(const QModelIndex &index, int role) const
|
||||
QString connectState;
|
||||
switch (status.underlying())
|
||||
{
|
||||
case ParticipantManagement::ConnectState::Connected:
|
||||
connectState = tr("Connected");
|
||||
break;
|
||||
case ParticipantManagement::ConnectState::NoHeartbeat:
|
||||
connectState = tr("No Heartbeat");
|
||||
case ParticipantManagement::ConnectState::Undefined:
|
||||
connectState = QStringLiteral("");
|
||||
break;
|
||||
default:
|
||||
connectState = QStringLiteral("");
|
||||
connectState = ParticipantManagement::toString(status);
|
||||
break;
|
||||
}
|
||||
return connectState;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QWidget>
|
||||
|
||||
namespace LtsSession
|
||||
{
|
||||
class LtsSession;
|
||||
}
|
||||
|
||||
class GuiElementInterface
|
||||
{
|
||||
public:
|
||||
GuiElementInterface() = default;
|
||||
virtual ~GuiElementInterface() = default;
|
||||
virtual QString pluginName() = 0;
|
||||
virtual QWidget* createGuiElement(QWidget *parent = nullptr) = 0;
|
||||
virtual bool init(LtsSession::LtsSession *session, int participantId = 0) = 0;
|
||||
};
|
||||
|
||||
// Eindeutige ID für das Qt-Plugin-System
|
||||
#define IGuiElementPlugin "gui_element:3:participantInfo.guiElement"
|
||||
Q_DECLARE_INTERFACE(GuiElementInterface, IGuiElementPlugin)
|
||||
Reference in new issue
Block a user