/** * @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 #include #include #include #include #include #include #include #include #include #include // Replay #include #include 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 &eemForeign, const std::shared_ptr &mrkDtc, const std::shared_ptr &exmDtc, const std::shared_ptr &flmIfc, const std::shared_ptr &ppmDtc, const std::shared_ptr &ppmInfoIfc, const std::shared_ptr &avmIfc, const std::shared_ptr &mrkIfc, const std::shared_ptr &srmDataIfc, const std::shared_ptr &coreDtc, const std::shared_ptr &pdmDtc, const std::shared_ptr &ismDtc, const std::shared_ptr &fltParticipantIfc, const std::shared_ptr &fltAesIfc, const std::shared_ptr &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 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 m_coreDtc; std::shared_ptr m_exmDtc; std::shared_ptr m_pdmDtc; std::shared_ptr m_ismDtc; std::shared_ptr m_mrkDtc; std::shared_ptr m_ppmDtc; // foreign gui's std::shared_ptr m_flmIfc; std::shared_ptr m_ppmInfoIfc; std::shared_ptr m_avmIfc; std::shared_ptr m_mrkIfc; std::shared_ptr m_srmDataIfc; std::shared_ptr m_fltParticipantIfc; std::shared_ptr m_fltAesIfc; std::shared_ptr m_fltBuildingComponentIfc; Ui::TimelineViewDialog *m_ui; QString m_menuGroup; DDSTimelineModel *m_model; DetailData *m_detailData; FilterWindow *m_filterWindow; QPointer m_eventListDialog; QPointer m_allEventsListDialog; LtsSession::LtsSession *m_session; LtsUtils::RequestHelper *m_requestHelper; QPointer m_replayApp; QPointer 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