Adds initial intermediate qt6 porting state

This commit is contained in:
torsten committed 2026-08-17 17:54:56 +02:00
1 parent 99136e9460
commit d176b5e0d7
11247 files changed
+1891537

No files matched your search

@@ -0,0 +1,18 @@
#
# $Id$
# $HeadURL$
# $Author$
#
#ADD_SUBDIRECTORY(Data)
#
# Data Plugin Interface
#
NGL_ADD_LIBRARY(WS sklDataPluginInterface SHARED skl_data_plugin_interface.h)
NGL_TARGET_LINK_LIBRARIES(sklDataPluginInterface
Qt5::Core
clientPluginInterface
)
NGL_INSTALL_TARGET(sklDataPluginInterface)
@@ -0,0 +1,24 @@
#pragma once
#include <PluginInterfaces/data_plugin_interface.h>
#include <QObject>
namespace Skeleton
{
class DataInterface : public DataPluginBase::Interface
{
public:
DataInterface(LtsSession::LtsSession *session, NGL::INGLLogger &logger)
: DataPluginBase::Interface(session, logger)
{}
virtual ~DataInterface() = default;
};
}
@@ -0,0 +1,18 @@
#
# $Id$
# $HeadURL$
# $Author$
#
ADD_SUBDIRECTORY(Data)
#
# Data Plugin Interface
#
NGL_ADD_LIBRARY(WS sklDataPluginInterface SHARED skl_data_plugin_interface.h)
NGL_TARGET_LINK_LIBRARIES(sklDataPluginInterface
Qt5::Core
clientPluginInterface
)
NGL_INSTALL_TARGET(sklDataPluginInterface)
@@ -0,0 +1,19 @@
#
# $Id$
# $HeadURL: svn://slssvn/TDS/branches/product/devel/trunk/Lts/Plugins/AdvancedSymbology/CMakeLists.txt
# $Author$
# Created by Mike Wille, SLSE, 2016-09-05
#
#
# Data Plugin
#
NGL_ADD_LIBRARY(WS sklDataPlugin MODULE skl_data_plugin.cpp skl_data_plugin.h)
NGL_TARGET_LINK_LIBRARIES(sklDataPlugin
Qt5::Core
sklDataPluginInterface
NGLLogger
LtsSession
)
NGL_INSTALL_TARGET(sklDataPlugin)
@@ -0,0 +1,70 @@
#include "skl_data_plugin.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include <LtsSession/lts_session.h>
#include <DDS/DDSConnector/dds_connector.h>
#include <Skeleton/logger.h>
namespace Skeleton
{
std::shared_ptr<DataPluginBase::Interface> DataPlugin::createDataInterface(LtsSession::LtsSession *session)
{
std::shared_ptr<Interface::Dtc> dtc;
if (!session->createTopicClient(dtc, pluginName()))
return std::shared_ptr<DataPluginBase::Interface>();
std::shared_ptr<Interface::Ftc> ftc;
if (!session->createTopicClient(ftc, pluginName()))
return std::shared_ptr<DataPluginBase::Interface>();
ftc->enableAll();
return std::make_shared<DataInterfaceImpl>(session);
}
DataInterfaceImpl::DataInterfaceImpl(
const std::shared_ptr<Interface::Dtc> &dtc,
, const std::shared_ptr<Interface::Ftc> &ftc
, LtsSession::LtsSession *session)
: DataInterface(session,
getLogger("Plugins.Data.Skl")
NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("Plugins.Data.Skl")
)
, m_dtc(dtc)
, m_ftc(ftc)
, m_foreignInterface(std::make_shared<ForeignInterfaceImpl(dtc))
{}
ForeignInterfaceImpl::ForeignInterfaceImpl(
const std::shared_ptr<Interface::Dtc> &dtc
, const std::shared_ptr<Interface::Ftc> &ftc
)
: m_dtc(dtc)
, m_ftc(ftc)
{
}
}
@@ -0,0 +1,79 @@
#pragma once
#include <PluginInterfaces/data_plugin_interface.h>
#include <Plugins/Skeleton/skl_data_plugin_interface.h>
namespace Skeleton
{
class DataPlugin final : public QObject, public DataPluginBase::Plugin
{
Q_PLUGIN_METADATA(IID "data:3:skl")
Q_INTERFACES(DataPluginBase::Plugin)
Q_OBJECT
public:
DataPlugin() = default;
~DataPlugin() = default;
QString pluginName() const override { return QStringLiteral("Skeleton"); }
std::shared_ptr<DataPluginBase::Interface> createDataInterface(LtsSession::LtsSession *session) override;
};
class DataInterfaceImpl final : public DataInterface
{
public:
explicit DataInterfaceImpl(
const std::shared_ptr<ExerciseManagement::Interface::Dtc> &dtc,
const std::shared_ptr<ExerciseManagement::Interface::Ftc> &ftc,
LtsSession::LtsSession *session);
std::shared_ptr<ExerciseManagement::Interface::Dtc> getDtc() override { return m_dtc; }
std::shared_ptr<ExerciseManagement::Interface::Ftc> getFtc() override { return m_ftc; }
std::shared_ptr<ForeignInterface> getForeignInterface() override { return m_foreignInterface; }
private:
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_dtc;
std::shared_ptr<ExerciseManagement::Interface::Ftc> m_ftc;
std::shared_ptr<ForeignInterface> m_foreignInterface;
};
class ForeignInterfaceImpl final : public ForeignInterface
{
Q_OBJECT
public:
explicit ForeignInterfaceImpl(
const std::shared_ptr<Interface::Dtc> &dtc
const std::shared_ptr<Interface::Ftc> &ftc
);
examples examples() override final { return m_dtc->examples(); }
private:
std::shared_ptr<Interface::Dtc> m_dtc;
std::shared_ptr<Interface::Ftc> m_ftc;
};
}
@@ -0,0 +1,24 @@
#pragma once
#include <PluginInterfaces/data_plugin_interface.h>
#include <QObject>
namespace Skeleton
{
class DataInterface : public DataPluginBase::Interface
{
public:
DataInterface(LtsSession::LtsSession *session, NGL::INGLLogger &logger)
: DataPluginBase::Interface(session, logger)
{}
virtual ~DataInterface() = default;
};
}
@@ -0,0 +1,18 @@
#
# $Id$
# $HeadURL$
# $Author$
#
ADD_SUBDIRECTORY(Data)
#
# Data Plugin Interface
#
NGL_ADD_LIBRARY(WS sklDataPluginInterface SHARED skl_data_plugin_interface.h)
NGL_TARGET_LINK_LIBRARIES(sklDataPluginInterface
Qt5::Core
clientPluginInterface
)
NGL_INSTALL_TARGET(sklDataPluginInterface)
@@ -0,0 +1,19 @@
#
# $Id$
# $HeadURL: svn://slssvn/TDS/branches/product/devel/trunk/Lts/Plugins/AdvancedSymbology/CMakeLists.txt
# $Author$
# Created by Mike Wille, SLSE, 2016-09-05
#
#
# Data Plugin
#
NGL_ADD_LIBRARY(WS sklDataPlugin MODULE skl_data_plugin.cpp skl_data_plugin.h)
NGL_TARGET_LINK_LIBRARIES(sklDataPlugin
Qt5::Core
sklDataPluginInterface
NGLLogger
LtsSession
)
NGL_INSTALL_TARGET(sklDataPlugin)
@@ -0,0 +1,71 @@
#include "skl_data_plugin.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include <LtsSession/lts_session.h>
#include <DDS/DDSConnector/dds_connector.h>
#include <Skeleton/logger.h>
namespace Skeleton
{
std::shared_ptr<DataPluginBase::Interface> DataPlugin::createDataInterface(LtsSession::LtsSession *session)
{
std::shared_ptr<Interface::Dtc> dtc;
if (!session->createTopicClient(dtc, pluginName()))
return std::shared_ptr<DataPluginBase::Interface>();
std::shared_ptr<Interface::Ftc> ftc;
if (!session->createTopicClient(ftc, pluginName()))
return std::shared_ptr<DataPluginBase::Interface>();
ftc->enableAll();
return std::make_shared<DataInterfaceImpl>(session);
}
DataInterfaceImpl::DataInterfaceImpl(
const std::shared_ptr<Interface::Dtc> &dtc,
, const std::shared_ptr<Interface::Ftc> &ftc
, LtsSession::LtsSession *session)
: DataInterface(session,
getLogger("Plugins.Data.Skl")
NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("Plugins.Data.Skl")
)
, m_dtc(dtc)
, m_ftc(ftc)
, m_foreignInterface(std::make_shared<ForeignInterfaceImpl(dtc))
{}
ForeignInterfaceImpl::ForeignInterfaceImpl(
const std::shared_ptr<Interface::Dtc> &dtc
, const std::shared_ptr<Interface::Ftc> &ftc
)
: m_dtc(dtc)
, m_ftc(ftc)
{
}
}
@@ -0,0 +1,79 @@
#pragma once
#include <PluginInterfaces/data_plugin_interface.h>
#include <Plugins/Skeleton/skl_data_plugin_interface.h>
namespace Skeleton
{
class DataPlugin final : public QObject, public DataPluginBase::Plugin
{
Q_PLUGIN_METADATA(IID "data:3:skl")
Q_INTERFACES(DataPluginBase::Plugin)
Q_OBJECT
public:
DataPlugin() = default;
~DataPlugin() = default;
QString pluginName() const override { return QStringLiteral("Skeleton"); }
std::shared_ptr<DataPluginBase::Interface> createDataInterface(LtsSession::LtsSession *session) override;
};
class DataInterfaceImpl final : public DataInterface
{
public:
explicit DataInterfaceImpl(
const std::shared_ptr<ExerciseManagement::Interface::Dtc> &dtc,
const std::shared_ptr<ExerciseManagement::Interface::Ftc> &ftc,
LtsSession::LtsSession *session);
std::shared_ptr<ExerciseManagement::Interface::Dtc> getDtc() override { return m_dtc; }
std::shared_ptr<ExerciseManagement::Interface::Ftc> getFtc() override { return m_ftc; }
std::shared_ptr<ForeignInterface> getForeignInterface() override { return m_foreignInterface; }
private:
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_dtc;
std::shared_ptr<ExerciseManagement::Interface::Ftc> m_ftc;
std::shared_ptr<ForeignInterface> m_foreignInterface;
};
class ForeignInterfaceImpl final : public ForeignInterface
{
Q_OBJECT
public:
explicit ForeignInterfaceImpl(
const std::shared_ptr<Interface::Dtc> &dtc
const std::shared_ptr<Interface::Ftc> &ftc
);
examples examples() override final { return m_dtc->examples(); }
private:
std::shared_ptr<Interface::Dtc> m_dtc;
std::shared_ptr<Interface::Ftc> m_ftc;
};
}
@@ -0,0 +1,9 @@
#
# $Id$
# $HeadURL$
# $Author$
#
# Created by NAME, SLSE, YYYY-MM-DD
#
#ADD_SUBDIRECTORY(YOUR_GUI_PLUGIN)
@@ -0,0 +1,40 @@
#
# $Id$
# $HeadURL$
# $Author$
#
# Created by NAME, SLSE, YYYY-MM-DD
#
SET(skl_YOUR_GUI_PLUGIN_gui_SRCS
skl_YOUR_GUI_PLUGIN_gui_plugin.cpp
skl_YOUR_GUI_PLUGIN_gui_plugin.h
)
QT5_WRAP_UI(skl_YOUR_GUI_PLUGIN_gui_SRCS
)
NGL_ADD_LIBRARY(WS exmEditGuiPlugin MODULE ${exm_edit_gui_SRCS})
NGL_TARGET_LINK_LIBRARIES(exmEditGuiPlugin
NGLLogger
svcAsmClient
svcExmClient
svcPdmClient
LtsSession
DataPluginInterface
#pdmDataPluginInterface
#asmDataPluginInterface
#exmDataPluginInterface
#exmGuiPluginInterface
GuiPluginInterface
Qt5::Widgets
LtsWidgets
LtsDataView
zwmsuiel
LtsUtilsGuiDds
)
NGL_INSTALL_TARGET(exmEditGuiPlugin)
@@ -0,0 +1,51 @@
#include "skl_YOUR_GUI_PLUGIN_gui_plugin.h"
#include <LtsSession/lts_session.h>
#include <Services/Skeleton/skl_dtc.h>
#include <Services/Skeleton/skl_ftc.h>
namespace Skeleton
{
std::shared_ptr<GuiPluginBase::Interface> GuiPlugin::createGuiInterface(LtsSession::LtsSession *session)
{
return std::make_shared<InterfaceImpl>(session);
}
InterfaceImpl::InterfaceImpl(LtsSession::LtsSession *session)
: GuiPluginBase::Interface(session, getLogger("Plugins.Gui.Skl.YOUR_GUI_PLUGIN"))
, m_dtc(nullptr)
, m_ftc(nullptr)
{}
bool InterfaceImpl::fetchInterfaces()
{
if (!m_session->getDtc<ExerciseManagement::DataInterface>(m_dtc))
return false;
if (!m_session->getFtc<ExerciseManagement::DataInterface>(m_ftc))
return false;
return true;
}
}
@@ -0,0 +1,61 @@
#pragma once
#include <Services/Skeleton/logger.h>
#include <PluginInterfaces/gui_plugin_interface.h>
#include <Common/ProjectConfig/project_defines.h>
#include <Plugins/Skeleton/skl_data_plugin_interface.h>
#include <Plugins/Skeleton/skl_gui_plugin_interface.h>
namespace Skeleton
{
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
{
Q_PLUGIN_METADATA(IID "gui:3:skl")
Q_INTERFACES(GuiPluginBase::Plugin)
Q_OBJECT
public:
explicit GuiPlugin() = default;
~GuiPlugin() = default;
QString pluginName() override { return ForeignGuiInterface::pluginName(); }
std::shared_ptr<GuiPluginBase::Interface> createGuiInterface(LtsSession::LtsSession *session) override;
};
class InterfaceImpl final : public QObject, public GuiPluginBase::Interface
{
Q_OBJECT
public:
explicit InterfaceImpl(LtsSession::LtsSession *session);
QString pluginName() override { return ForeignGuiInterface::pluginName(); }
bool fetchInterfaces() override;
private:
std::shared_ptr<Skeleton::Interface::Dtc> m_dtc;
std::shared_ptr<Skeleton::Interface::Ftc> m_ftc;
};
}
@@ -0,0 +1,24 @@
#pragma once
#include <PluginInterfaces/data_plugin_interface.h>
#include <QObject>
namespace Skeleton
{
class DataInterface : public DataPluginBase::Interface
{
public:
DataInterface(LtsSession::LtsSession *session, NGL::INGLLogger &logger)
: DataPluginBase::Interface(session, logger)
{}
virtual ~DataInterface() = default;
};
}
@@ -0,0 +1,37 @@
#pragma once
#include <QObject>
#ifndef SKLGUIPLUGININTERFACE_EXPORT
# ifdef BUILD_STATIC_LIBRARIES
# define SKLGUIPLUGININTERFACE_EXPORT
# else
# if defined(MAKE_SKLGUIPLUGININTERFACE_LIB)
# define SKLGUIPLUGININTERFACE_EXPORT Q_DECL_EXPORT
# else
# define SKLGUIPLUGININTERFACE_EXPORT Q_DECL_IMPORT
# endif
# endif
#endif
namespace Skeleton
{
class SKLGUIPLUGININTERFACE_EXPORT ForeignGuiInterface : public QObject
{
Q_OBJECT
public:
ForeignGuiInterface() = default;
virtual ~ForeignGuiInterface() = default;
static QString pluginName() { return QStringLiteral("SkeletonGui"); }
};
}
@@ -0,0 +1,18 @@
#
# $Id$
# $HeadURL$
# $Author$
#
#ADD_SUBDIRECTORY(Data)
#
# Data Plugin Interface
#
NGL_ADD_LIBRARY(WS sklDataPluginInterface SHARED skl_data_plugin_interface.h)
NGL_TARGET_LINK_LIBRARIES(sklDataPluginInterface
Qt5::Core
clientPluginInterface
)
NGL_INSTALL_TARGET(sklDataPluginInterface)
@@ -0,0 +1,24 @@
#pragma once
#include <PluginInterfaces/data_plugin_interface.h>
#include <QObject>
namespace Skeleton
{
class DataInterface : public DataPluginBase::Interface
{
public:
DataInterface(LtsSession::LtsSession *session, NGL::INGLLogger &logger)
: DataPluginBase::Interface(session, logger)
{}
virtual ~DataInterface() = default;
};
}
@@ -0,0 +1,69 @@
#!/usr/bin/python
import os
import sys
import shutil
import fileinput
def copyAndReplaceInFile(sourceFile, destinationFile, replacements):
with open(sourceFile) as inFile, open(destinationFile, "w") as outFile:
for line in inFile:
for before, after in replacements.iteritems():
line = line.replace(before, after)
outFile.write(line)
longName = raw_input("Enter Plugin name (in CamelCase): ")
shortNameAllLow = raw_input("Enter Plugin abbreviation (3 lower case letters): ")
shortNameCapital = shortNameAllLow.capitalize()
shortNameAllUpper = shortNameAllLow.upper()
dirName = "../" + longName
print "Trying to create Plugin directory \"" + dirName + "\""
if os.path.isdir(dirName):
print "Directory \"" + dirName + "\" already exists. Exit"
sys.exit(-1)
else:
os.mkdir(dirName)
print ".. done"
print "Creating new files"
replacements = { "skl":shortNameAllLow, "Skl":shortNameCapital, "SKL":shortNameAllUpper, "Skeleton":longName }
copyAndReplaceInFile("base/CMakeLists.txt", "../" + longName + "/CMakeLists.txt", replacements)
copyAndReplaceInFile("base/skl_data_plugin_interface.h", "../" + longName + "/" + shortNameAllLow + "_data_plugin_interface.h", replacements)
print ".. done"
cmakeFileName = "../CMakeLists.txt"
print "Trying to add directory in", cmakeFileName
cmakeFileObject = open(cmakeFileName)
lines = cmakeFileObject.readlines()
cmakeFileObject.close
index = 0
hasAddedSubDir = False
beforeLine = "placeholder"
for line in lines:
if beforeLine.startswith("ADD_SUBDIRECTORY") and not line.startswith("ADD_SUBDIRECTORY"):
hasAddedSubDir = True
break
beforeLine = line
index += 1
if hasAddedSubDir == True:
lines.insert(index, "ADD_SUBDIRECTORY(" + longName + ")\n")
cmakeFileObject = open(cmakeFileName, "w")
for line in lines:
cmakeFileObject.write(line)
cmakeFileObject.close()
print ".. done"
else:
print "Could not add sub directory, please add \"ADD_SUBDIRECTORY(" + longName + ")\""
print "manually to", cmakeFileName