Qt6 Migration: Complete migration with DDS/RTI support and build validation
Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
18662 files changed
+4115092
-5435
No files matched your search
@@ -0,0 +1,114 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
*
|
||||
* TableModel for dynamic topics
|
||||
*
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QVector>
|
||||
#include <QSharedPointer>
|
||||
#include <QDomDocument>
|
||||
|
||||
#include <dds/dds.hpp>
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
class SampleSortModel;
|
||||
class DetailViewDlg;
|
||||
|
||||
class SampleModel final : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SampleModel(QObject *parent = nullptr);
|
||||
~SampleModel();
|
||||
|
||||
enum Column
|
||||
{
|
||||
TypeName = 0,
|
||||
TopicName = 1,
|
||||
Description = 2,
|
||||
Pause = 3,
|
||||
Maximum = Pause
|
||||
};
|
||||
|
||||
struct SampleData
|
||||
{
|
||||
std::string typeName;
|
||||
QString topicName;
|
||||
QString description;
|
||||
int pause = 1000;
|
||||
QSharedPointer<dds::core::xtypes::DynamicData> legatusData;
|
||||
DetailViewDlg *dialog = nullptr;
|
||||
void toXml(QDomDocument &doc, QDomElement &elem) const;
|
||||
bool fromXml(QDomElement &elem);
|
||||
|
||||
QByteArray encodeForMime() const;
|
||||
static SampleData decodeFromMime(const QByteArray &encodedData);
|
||||
};
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::DisplayRole) override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
std::string typeName(const QModelIndex &index) const;
|
||||
const QSharedPointer<dds::core::xtypes::DynamicData> dynamicData(const QModelIndex &index) const;
|
||||
QString name(const QModelIndex &index) const;
|
||||
|
||||
Qt::DropActions supportedDropActions() const override;
|
||||
Qt::DropActions supportedDragActions() const override;
|
||||
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const override;
|
||||
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
|
||||
QStringList mimeTypes() const override;
|
||||
|
||||
bool addRow(const dds::core::xtypes::DynamicData &data, const QString &topicName, const QString &description = QString());
|
||||
bool deleteRow(const QModelIndex &index);
|
||||
bool updateRow(const QModelIndex &index, const QSharedPointer<dds::core::xtypes::DynamicData> &data, const QString &topicName);
|
||||
bool addRow(const SampleData &sample, int position = -1);
|
||||
|
||||
SampleData sampleData(const QModelIndex &index) const;
|
||||
void setDialog(const QModelIndex &index, DetailViewDlg *dlg);
|
||||
QModelIndex indexByDialog(const DetailViewDlg *dlg) const;
|
||||
|
||||
public slots:
|
||||
void onClear();
|
||||
|
||||
private:
|
||||
|
||||
QVector<SampleData> m_data;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
friend class SampleSortModel;
|
||||
};
|
||||
|
||||
class SampleSortModel final : public QSortFilterProxyModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
using QSortFilterProxyModel::QSortFilterProxyModel;
|
||||
|
||||
void setCurrentRow(int row) { m_currentRow = row; emit headerDataChanged(Qt::Vertical, row, row);}
|
||||
int currentRow() { return m_currentRow >= rowCount() ? -1 : m_currentRow; }
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
void sort(int column, Qt::SortOrder order) override;
|
||||
protected:
|
||||
bool lessThan(const QModelIndex &left,
|
||||
const QModelIndex &right) const override;
|
||||
private:
|
||||
int m_currentRow = -1;
|
||||
|
||||
};
|
||||
Reference in new issue
Block a user