Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Plugins/Timeline/Gui/EventTimelineClassic/tln_dialog.h
T
Berrux Kana 3f7beb3c7e Qt6 migration: build fixes for Groups 10/11 + missing plugin modules
Continue the Qt5->Qt6 migration so the LTS Projects (Group 10) and LTS
Application (Group 11) compile, link, and ctest runs.

Qt5->Qt6 API migration (resolves removed/deprecated Qt6 APIs) across Lts
Tools and Apps, e.g. QAction->QActionGroup, QAbstractSocket::errorOccurred,
Qt::SkipEmptyParts, QRandomGenerator, QInputDevice::DeviceType,
QRegularExpression, QLatin1Literal->QStringLiteral, and the SampleModel
m_description->description rename.

CMake build fixes:
- CMakeLists.txt: add Lts/Common to CMAKE_AUTOMOC_INCLUDE_DIRECTORIES so moc
  resolves Q_INTERFACES(ProjectPlugin::Plugin) for the migrated Projects.
- cmake/NGLMacros.cmake: NGL_COMPILE_RESOURCES - replace return() (which aborts
  the calling CMakeLists.txt) with an if/else/endif.
- OpApp/THP: guard the ArcGISQt5Hack link with $<IF:$<TARGET_EXISTS:...>> (the
  target is absent when the SituationMap viewer is stubbed); matches
  CentralEffectSimulation.
- LtsSession: prefer the in-tree svcCoreClient target over a FIND_LIBRARY in
  /usr/local/lib.
- CnrProxyTester/DotMatrixDisplay: set AUTOUIC_SEARCH_PATHS for the ui/ subdir.
- TopicDiscover: link NGLLogger.

Export-header visibility stubs (expand the empty *_EXPORT macro to
__attribute__((visibility("default"))); the build sets -fvisibility=hidden and
these stubs shadow the CMake-generated header):
- include/LtsProjectionWorkstation/ltsprojectionworkstation_export.h (fixes
  undefined reference to LtsProjectionWorkstation::getInstance /
  setProjectionOperatorPreset)
- include/LtsSession/ltssession_export.h, include/LtsUtilsGuiDds/ltsutilsguidds_export.h (same pattern)

New plugin modules (copied from legacy) so LtsAppDescriptorChecker finds the
gui:3 IIDs referenced by the Projects' apps.json:
- TakeHomePackageManager/OldTHP              gui:3:tpm.man, gui:3:tpm.usb
- PresentationManagement/.../ScriptEditor   gui:3:pre.script.edit
- Timeline/Gui/EventTimelineClassic         gui:3:tln.view

new_docker_build.sh: correct group targets to the actual CMake target names,
guard LtsReportDisplay on BUILD_CODIFICATION, and skip modules unavailable in
the prebuilt image (AsmWorkstationCertifier/botan2, TrajectoryWidget,
VideoImport, thp_viewer/VLC).
2026-10-05 10:49:34 +02:00

175 lines
6.3 KiB
C++
Executable File

/**
* @RDE_HEADER@
* ExerciseManangement - Exercise Overview Dialog
* $Id$
* $HeadURL$
* $Author$
*
* Created by Mike Wille, SLSE, 2017-02-10
*/
#pragma once
#include "tln_view_gui_plugin.h"
#include <LtsWidgets/lts_dialog.h>
#include <LtsUtilsGuiDds/request_helper.h>
#include <LtsTimelineClassic/EventList.h>
#include <Plugins/Timeline/tln_data_plugin_interface.h>
#include <Plugins/MarkerManagement/mrk_gui_plugin_interface.h>
#include <Plugins/SituationReplayManagement/srm_data_plugin_interface.h>
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
#include <Plugins/InfrastructureManagement/ism_data_plugin_interface.h>
#include <Plugins/AreaEffectSimulation/aes_data_plugin_interface.h>
#include <Plugins/FilterManagement/flt_participant_plugin_interface.h>
#include <Plugins/FilterManagement/flt_building_cmpnt_plugin_interface.h>
// Replay
#include <Plugins/SituationReplay/srp_gui_plugin_interface.h>
#include <QJsonArray>
namespace AudioVideoManagement
{
class StreamNameMapping;
}
namespace LtsTimelineClassic
{
class EventGraphic;
class Event;
}
namespace Ui
{
class TimelineViewDialog;
}
namespace LtsSession
{
class LtsSession;
}
namespace LtsPluginManager
{
class LtsPluginManager;
}
namespace Timeline
{
class FilterWindow;
class DetailData;
class DDSTimelineModel;
class EventListDialog;
class TimelineLegendDialog;
class TimelineViewDialog : public LtsWidgets::LtsDialog
, protected SituationReplayManagement::Interface::Ftc::ReplayPartitionCreateReplyHandler
{
Q_OBJECT
public:
explicit TimelineViewDialog(const QString &menuGroup, const LtsWidgets::ButtonCombination &buttonCombo, bool isMain, QWidget *parent = nullptr);
~TimelineViewDialog();
bool init(const std::shared_ptr<TimeLineManagement::ForeignDataInterface> &eemForeign,
const std::shared_ptr<MarkerManagement::Interface::Dtc> &mrkDtc,
const std::shared_ptr<ExerciseManagement::Interface::Dtc> &exmDtc,
const std::shared_ptr<FileManagement::ForeignGuiInterface> &flmIfc,
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc,
const std::shared_ptr<ParticipantManagement::ForeignParticipantInfoGuiInterface> &ppmInfoIfc,
const std::shared_ptr<AudioVideoManagement::ForeignMenuEditGuiInterface> &avmIfc,
const std::shared_ptr<MarkerManagement::ForeignGuiInterface> &mrkIfc,
const std::shared_ptr<SituationReplayManagement::ForeignDataInterface> &srmDataIfc,
const std::shared_ptr<Core::Interface::Dtc> &coreDtc,
const std::shared_ptr<ProjectDataManagement::Interface::Dtc> &pdmDtc,
const std::shared_ptr<InfrastructureManagement::Interface::Dtc> &ismDtc,
const std::shared_ptr<FilterManagement::ForeignFltParticipantGuiInterface> &fltParticipantIfc,
const std::shared_ptr<FilterManagement::ForeignAesGuiInterface> &fltAesIfc,
const std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> &fltBuildingComponentIfc,
LtsSession::LtsSession *session,
AudioVideoManagement::StreamNameMapping *streamNameMapping);
private slots:
void showDetailsAction(LtsTimelineClassic::EventGraphic *eg, int action);
void showDetails(const LtsTimelineClassic::EventList &eventList);
void slotApplyFilter(const QJsonArray &filter);
void slotShowEventDetails(const LtsTimelineClassic::Event *event);
void slotShowEvents(const QJsonArray &filter);
void slotWaitForReady();
void slotShowFiltersDialog();
void slotShowLegend();
void slotStartReplaySituation();
void updateRange(bool initial = false);
void slotLoading();
void slotLoadingDone();
void slotSpanChanged();
void slotEventTypesChanged(QSet<int> activeEventTypeIds); // no const ref because markerTypeId might be added
void loadAllEvents();
void slotDebugCreateFakeEvent();
signals:
void signalWaitForReady();
void signalInitEventList();
private:
void retranslate() override;
void onReplayPartitionCreateReply(const Core::FunctionReplyObject &reply) override { m_requestHelper->requestReply(reply); }
qint64 currentSpanTime() const; // in msecs
// dtc's
std::shared_ptr<Core::Interface::Dtc> m_coreDtc;
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
std::shared_ptr<MarkerManagement::Interface::Dtc> m_mrkDtc;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
// foreign gui's
std::shared_ptr<FileManagement::ForeignGuiInterface> m_flmIfc;
std::shared_ptr<ParticipantManagement::ForeignParticipantInfoGuiInterface> m_ppmInfoIfc;
std::shared_ptr<AudioVideoManagement::ForeignMenuEditGuiInterface> m_avmIfc;
std::shared_ptr<MarkerManagement::ForeignGuiInterface> m_mrkIfc;
std::shared_ptr<SituationReplayManagement::ForeignDataInterface> m_srmDataIfc;
std::shared_ptr<FilterManagement::ForeignFltParticipantGuiInterface> m_fltParticipantIfc;
std::shared_ptr<FilterManagement::ForeignAesGuiInterface> m_fltAesIfc;
std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> m_fltBuildingComponentIfc;
Ui::TimelineViewDialog *m_ui;
QString m_menuGroup;
DDSTimelineModel *m_model;
DetailData *m_detailData;
FilterWindow *m_filterWindow;
QPointer<EventListDialog> m_eventListDialog;
QPointer<EventListDialog> m_allEventsListDialog;
LtsSession::LtsSession *m_session;
LtsUtils::RequestHelper *m_requestHelper;
QPointer<LtsPluginManager::LtsPluginManager> m_replayApp;
QPointer<LtsSession::LtsSession> m_replayAppSession;
AudioVideoManagement::StreamNameMapping *m_streamNameMapping;
bool m_rangeChanged;
QJsonArray m_filter;
int m_loadingCount;
bool m_armed;
qint64 m_exerciseStart;
TimelineLegendDialog *m_legendDialog;
QTimer *m_armTimer;
NGL::INGLLogger &m_logger;
void setCustomSpan();
void calculateAndSetRange();
void setRange(qint64 min, qint64 max);
void updateActiveEventTypesByFilters();
void updateFiltersByActiveEventTypes();
void applyFilter(const QJsonArray &filter, bool doUpdateActiveEventTypes = true, bool reloadFilterWindow = false);
void rangeChanged();
void setTimelineUsable(bool usable = true);
void aboutToClose() override;
};
} // namespace Timeline