Files
qt-migration-legatus/qt5-before/dlbo/Lts/Common/LtsWidgets/lts_combo_box.h
T
torstenandCopilot 7173785915 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>
2026-09-15 18:20:26 +00:00

77 lines
2.5 KiB
C++

/**
* @RDE_HEADER@
* ComboBox, optimized for tablets (bigger dropdown/popup and more comfortable completer)
* $Id$
* $HeadURL$
* $Author$
*
* Created by Mike Wille, SLSE, 2016-03-09
*/
#pragma once
#include "lts_widgets_export.h"
#include <QComboBox>
namespace LtsWidgets
{
/**
* @brief The LtsComboBox class provides an almost identically version of the QComboBox, with the main difference that this version is more touch friendly.
* The LtsComboBox's Popup (LtsComboBoxPopup) is a LtsFramelessDialog (screen-centered) with bigger selection-items.
* For debug purpose: press CTRL while clicking on the popup-button to open the original QComboBox-Popup
*/
class LTSWIDGETS_EXPORT LtsComboBox : public QComboBox // TODO: change title of selection window
{
Q_OBJECT
using BaseClass = QComboBox;
public:
explicit LtsComboBox(QWidget *parent = nullptr);
~LtsComboBox() = default;
/**
* @brief Set the default widget to use - either the default QComboBox or the selection widget
* @param bUseSelectionDialog true if the selection widget should be used, false for the normal combobox
*/
static void setUseSelectionDialog(bool bUseSelectionDialog);
/**
* @brief hasValueChanged tells if the value set by default (initialization) or by the user to another value,
* different by the default value. If the user sets the value back to the default value, 'hasValueChanged' will return false again.
* Use this in your UiRequirement to see if value differs from the default value to determine a change.
* @return true if value differs from default value and v.v.
*/
bool hasValueChanged() const;
void setExternalContentType(int ect) { m_externalContentType = ect; }
int externalContentType() const { return m_externalContentType; }
protected:
/**
* @brief showPopup is emited by the native widget when the popup should be triggered (e.g. by clicking a non-writeable LtsComboBox or by clicking the popup-button) and shows an touch-friendly, screen-centered LtsComboBoxPopup
*/
void showPopup() override;
void showEvent(QShowEvent *e) override;
void enterEvent(QEvent *e) override;
void leaveEvent(QEvent *) override;
protected slots:
void userChangedIndex(int index); // user change - for 'hasValueChanged'
signals:
void signalExternallyChanged(); // e.g. PPM's parties changed, ComboBox should report to PpmComboBox for a refill
void signalRefill(); // outgoing
void signalEnterEvent();
void signalLeaveEvent();
private:
int m_currentIndex;
int m_externalContentType;
static bool s_useSelectionDialog;
};
}