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>
94 lines
2.3 KiB
C++
94 lines
2.3 KiB
C++
// TODO: hdr
|
|
|
|
#include "AppChooser/app_chooser.h"
|
|
#include "ui_app_chooser.h"
|
|
#include "AppChooser/app_chooser_model.h"
|
|
#include "lts_app_manager.h"
|
|
#include "AppChooser/CustomViews/app.h"
|
|
|
|
#include <QCloseEvent>
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
namespace LtsAppManager
|
|
{
|
|
|
|
AppChooser::AppChooser()
|
|
: QWidget(nullptr)
|
|
, m_ui(new Ui::AppChooser)
|
|
, m_model()
|
|
, m_madeSelection(false)
|
|
{
|
|
m_ui->setupUi(this);
|
|
setAttribute(Qt::WA_DeleteOnClose); // delete when closed
|
|
|
|
connect(m_ui->widget, &LtsDataView::LtsDataView::LtsDataView::signalDoubleClicked,
|
|
this, &AppChooser::slotAppSelected);
|
|
connect(m_ui->widget, &LtsDataView::LtsDataView::LtsDataView::signalEnterPressed,
|
|
this, &AppChooser::slotAppSelected);
|
|
connect(m_ui->widget, &LtsDataView::LtsDataView::LtsDataView::signalSelectionChanged,
|
|
this, &AppChooser::enaDisa);
|
|
connect(m_ui->pbQuit, &QPushButton::clicked,
|
|
this, &QWidget::close); // calls closeEvent
|
|
connect(m_ui->pbSelect, &QPushButton::clicked,
|
|
this, &AppChooser::slotAppSelected);
|
|
|
|
m_model = new AppChooserModel(this);
|
|
m_model->initModel(LtsAppManager::getInstance()->getAvailableApps()); // TODO: test return val?
|
|
|
|
m_ui->widget->seamless();
|
|
//m_ui->widget->selectCustomView();
|
|
m_ui->widget->setModel(m_model);//, [&]() { return new CustomViewApp(this); });
|
|
m_ui->widget->hideColumn(AppChooserModel::Columns::Visible);
|
|
}
|
|
|
|
|
|
AppChooser::~AppChooser()
|
|
{
|
|
// qCritical() << "~AppChooser";
|
|
delete m_ui;
|
|
}
|
|
|
|
|
|
void AppChooser::slotQuit()
|
|
{
|
|
if (m_alreadyCloseEmitted)
|
|
return;
|
|
m_alreadyCloseEmitted = true;
|
|
emit signalLogout(); // if this window closes and no selection was made, then logout! (no apps, no login)
|
|
}
|
|
|
|
|
|
void AppChooser::closeEvent(QCloseEvent */*event*/)
|
|
{
|
|
if (!m_madeSelection)
|
|
slotQuit();
|
|
}
|
|
|
|
|
|
void AppChooser::slotAppSelected()
|
|
{
|
|
const QModelIndex idx = m_ui->widget->currentIndex();
|
|
const LtsAppDescriptor::AppDescription app = m_model->getRowData(idx.row());
|
|
|
|
if (!app.active)
|
|
return;
|
|
|
|
hide();
|
|
m_madeSelection = true;
|
|
emit signalAppSelected(app.id);
|
|
close();
|
|
}
|
|
|
|
|
|
void AppChooser::enaDisa()
|
|
{
|
|
const QModelIndexList selectedRows = m_ui->widget->selectedRows();
|
|
const int cntSelectedRows = selectedRows.size();
|
|
|
|
m_ui->pbSelect->setEnabled(cntSelectedRows == 1);
|
|
}
|
|
|
|
} // namespace LtsAppManager
|