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,131 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* LtsFileDialogWidget and LtsFileDialog - custom widgets
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Iuliana Ojog, SLSE, 2017-07-11
|
||||
*/
|
||||
|
||||
#include "lts_file_dialog.h"
|
||||
#include "ui_lts_file_dialog.h"
|
||||
|
||||
#include "lts_file_dialog_widget.h"
|
||||
#include "lts_dialog_model_folder.h"
|
||||
#include "lts_dialog_model_file.h"
|
||||
#include <Services/FileManagement/flm_translation.h>
|
||||
|
||||
#include <Viewer/LtsDataView/lts_data_view.h>
|
||||
|
||||
namespace LtsWidgets
|
||||
{
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
// LtsFileDialog
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
LtsFileDialog::LtsFileDialog(QWidget *parent)
|
||||
: LtsWidgets::LtsFramelessDialog(parent, LtsWidgets::Behaviour::Modal)
|
||||
, m_editItemWidget(new LtsFileDialogWidget(this))
|
||||
, m_buttonBox (new LtsWidgets::LtsDialogButtonBox(this))
|
||||
{
|
||||
LtsWidgets::DialogButton btnSelectFile = LtsWidgets::DialogButton::Load;
|
||||
|
||||
m_buttonBox->setText(btnSelectFile, tr("Select File"));
|
||||
m_buttonBox->setToolTip(btnSelectFile, tr("Select file from library"));
|
||||
m_buttonBox->setButtonEnabled(btnSelectFile, false);
|
||||
m_buttonBox->setButtonVisible(btnSelectFile, true);
|
||||
|
||||
connect(m_buttonBox->getButton(LtsWidgets::DialogButton::Close), &QPushButton::clicked, this, &LtsFileDialog::close);
|
||||
|
||||
//hide ok and apply
|
||||
m_buttonBox->getButton(LtsWidgets::DialogButton::Apply)->hide();
|
||||
m_buttonBox->getButton(LtsWidgets::DialogButton::Ok)->hide();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
LtsFileDialog::~LtsFileDialog()
|
||||
{
|
||||
delete m_editItemWidget;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
bool LtsFileDialog::init(LtsSession::LtsSession *session,
|
||||
const std::shared_ptr<FileManagement::Interface::Dtc> &dtc,
|
||||
const std::shared_ptr<OperatorManagement::Interface::Dtc> &opmDtc,
|
||||
const std::shared_ptr<ExerciseManagement::Interface::Dtc> &exmDtc,
|
||||
const FileDialogMode &dlgMode,
|
||||
const QVector<FileManagement::MainFolder> &mainFolders,
|
||||
const QVector<FileManagement::FileType> &fileTypes,
|
||||
const int &folderId,
|
||||
const QString &buttonName,
|
||||
const QString &xmlType)
|
||||
{
|
||||
if (!m_editItemWidget->init(session, dtc, opmDtc, exmDtc, dlgMode, mainFolders, fileTypes, folderId, xmlType))
|
||||
return false;
|
||||
|
||||
m_dialogMode = dlgMode;
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
layout->addWidget(m_editItemWidget);
|
||||
layout->addWidget(m_buttonBox);
|
||||
this->setLayout(layout);
|
||||
|
||||
if (!buttonName.isEmpty())
|
||||
{
|
||||
m_buttonBox->setText(LtsWidgets::DialogButton::Load, buttonName);
|
||||
m_buttonBox->setToolTip(LtsWidgets::DialogButton::Load, buttonName);
|
||||
}
|
||||
|
||||
if (m_dialogMode == FileDialogMode::modeSaveFile)
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Load, m_editItemWidget, &LtsFileDialogWidget::onChooseFileName);
|
||||
else if (m_dialogMode == FileDialogMode::modeOpenFile)
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Load, m_editItemWidget, &LtsFileDialogWidget::onSelectFile);
|
||||
|
||||
connect(m_editItemWidget, &LtsFileDialogWidget::enableButtons, this, &LtsFileDialog::enaDisa);
|
||||
connect(m_editItemWidget, &LtsFileDialogWidget::accepted, this, &LtsFileDialog::accept);
|
||||
connect(m_buttonBox->getButton(LtsWidgets::DialogButton::Close), &QPushButton::clicked, this, &LtsFileDialog::reject);
|
||||
|
||||
enaDisa();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
int LtsFileDialog::getSelectedFileId() const
|
||||
{
|
||||
return m_editItemWidget->m_selectedFileContent.id();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
FileManagement::FileContent LtsFileDialog::getSelectedFile() const
|
||||
{
|
||||
return m_editItemWidget->m_selectedFileContent;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
int LtsFileDialog::getSelectedFolder() const
|
||||
{
|
||||
return m_editItemWidget->m_selectedFolderId;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
QString LtsFileDialog::getFileName() const
|
||||
{
|
||||
return m_editItemWidget->m_fileName;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
void LtsFileDialog::enaDisa()
|
||||
{
|
||||
LtsWidgets::DialogButton btnSelectFile = LtsWidgets::DialogButton::Load;
|
||||
m_buttonBox->setButtonEnabled(btnSelectFile, false);
|
||||
|
||||
QModelIndex idxFile = m_editItemWidget->m_ui->widgetFiles->currentIndex();
|
||||
if (m_dialogMode == FileDialogMode::modeOpenFile && idxFile.isValid())
|
||||
m_buttonBox->setButtonEnabled(btnSelectFile, true);
|
||||
|
||||
if (m_dialogMode == FileDialogMode::modeSaveFile && !m_editItemWidget->m_fileName.isEmpty())
|
||||
m_buttonBox->setButtonEnabled(btnSelectFile, true);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
} // namespace LtsWidgets
|
||||
Reference in new issue
Block a user