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>
113 lines
3.5 KiB
C++
113 lines
3.5 KiB
C++
/**
|
|
* @RDE_HEADER@
|
|
* ComboBox's popup, optimized for tablets (bigger dropdown/popup)
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*
|
|
* Created by Mike Wille, SLSE, 2016-03-09
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "lts_frameless_dialog.h"
|
|
#include "lts_widgets_export.h"
|
|
|
|
|
|
namespace Ui
|
|
{
|
|
class LtsSelectionPopup;
|
|
}
|
|
|
|
class QAbstractItemModel;
|
|
class QSortFilterProxyModel;
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
|
|
/**
|
|
* @brief The LtsSelectionPopup is a popup window (LtsFramelessDialog) with a list of all QRadioButtons from a model with a search/filter edit.
|
|
* (former 'LtsComboBoxPopup' class WAS an internal Popup class for the LtsComboBox and is not meant for export)
|
|
* This is a custom Popup which is touch-friendly and screen-centered.
|
|
*/
|
|
class LTSWIDGETS_EXPORT LtsSelectionPopup : public LtsFramelessDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
/**
|
|
* @brief LtsSelectionPopup creates a popup with all its items (from model) in it
|
|
* @param model the model which contains all items
|
|
* @param currentIndex which item is currently selected (to not select any item: a value smaller than 0)
|
|
* @param parent parent of this widget (not the LtsComboBox, the actual parent)
|
|
*/
|
|
LtsSelectionPopup(QAbstractItemModel *model,
|
|
int currentIndex,
|
|
QWidget *parent = nullptr);
|
|
~LtsSelectionPopup();
|
|
|
|
protected:
|
|
/**
|
|
* @brief showEvent selects the search/filter widget on show
|
|
* @param event
|
|
*/
|
|
void showEvent(QShowEvent *event) override;
|
|
|
|
private:
|
|
Ui::LtsSelectionPopup *m_ui;
|
|
int m_currentIndex;
|
|
int m_firstIndex;
|
|
QSortFilterProxyModel *m_filter;
|
|
bool m_valid; // selection is valid? (e.g. not hidden because it's filtered)
|
|
|
|
/**
|
|
* @brief refresh deletes all Radio Buttons and creates them new (e.g. filtering)
|
|
*/
|
|
void refresh();
|
|
|
|
/**
|
|
* @brief selectItem emits signals that tell the connected slot which item was selected
|
|
* @param row the row number of the model
|
|
* @param text the text of the radio button
|
|
* @param activate if the item was activated (see QRadioButton doc) - by default false as it not not used everytime
|
|
*/
|
|
void selectItem(int row, bool bCurrentIndexChanged, bool bActivated);
|
|
|
|
signals:
|
|
|
|
// void highlighted(int index); // not supported yet
|
|
|
|
// activated(row); // Qt::Doc: is only emitted when the change is caused by user interaction
|
|
|
|
// currentIndexChanged(row); // Qt::Doc: is always emitted regardless if the change was done programmatically or by user interaction
|
|
// My note: If the uses selects the already selected item, only activated is emitted.
|
|
|
|
|
|
/**
|
|
* @brief activated is emitted when the selection has changed or is confirmded by the user
|
|
* Qt::Doc: is only emitted when the change is caused by user interaction
|
|
* Addon: If the uses selects the already selected item, only activated is emitted.
|
|
*/
|
|
void activated(int index);
|
|
|
|
/**
|
|
* @brief currentIndexChanged is emitted when the current item changes (by user interaction or programmatically)
|
|
* Qt::Doc: is always emitted regardless if the change was done programmatically or by user interaction
|
|
* Addon: If the uses selects the already selected item, only activated is emitted.
|
|
*/
|
|
void currentIndexChanged(int index);
|
|
|
|
public slots:
|
|
/**
|
|
* @brief accept is called when the selection ends successfully (user double-clicked an item or clicked the 'Select' button) and emits signalSelectItem
|
|
*/
|
|
void accept() override;
|
|
|
|
/**
|
|
* @brief slotFilterChanged is called if the search / filter text changed and recreates all Radio Buttons after filtering
|
|
*/
|
|
void slotFilterChanged();
|
|
|
|
};
|
|
} // namespace LtsWidgets
|