Files
qt-migration-legatus/qt5-before/dlbo/Lts/Common/LtsTimelineClassic/TimelineWidget.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

157 lines
3.6 KiB
C++

/**
* @RDE_HEADER@
* widget in MVC pattern which manages the entire timeline to add on a layout or widget
* $Id$
* $HeadURL$
* $Author$
* Created by Mike Wille, SLSE, 2014-10-01
*/
#pragma once
#include <LtsTimelineClassic/ltstimelineclassic_export.h>
#include "Range.h"
#include <NGLLogger/INGLLogger.h>
#include <QWidget>
namespace Ui
{
class Timeline;
}
namespace LtsTimelineClassic
{
class AbstractTimelineModel;
class EventGraphic;
class TimelineHeaderView;
/**
* @brief widget in MVC pattern which manages the entire timeline to add on a layout or widget
*/
class LTSTIMELINECLASSIC_EXPORT TimelineWidget : public QWidget
{
Q_OBJECT
public:
/**
* @brief sets, creates, connects, etc. all needed components, classes and widgets
* @param parent parent qwidget to lie on
*/
explicit TimelineWidget(QWidget *parent = nullptr);
~TimelineWidget();
/**
* @brief sets the position marker at the position at time
* @param time time to set the position marker to
*/
void setPositionMarkerTime(const qint64 time);
qint64 getRangeMinimum() const;
qint64 getRangeMaximum() const;
void setPos(qint64 pos);
void setMaxPos();
int getPos() const;
int getMaxPos() const;
void knownRangesChanged(const QVector<Range> &newRanges);
void hideDebugWidget();
void setLiveTime(qint64 time);
private:
/**
* @brief sets new timeline boundaries and is called by updateTimeline() after the model has its data updated
* @param min new first event in timeline in seconds since epoch
* @param max new last event in timeline in seconds since epoch
*/
void setTimelineRange(qint64 min, qint64 max);
void refreshData();
NGL::INGLLogger &m_logger;
Ui::Timeline *m_timelineUi;
// could have used vars from EventTools
qint64 m_min;
qint64 m_max;
qint64 m_sbPos;
qint64 m_zoomFactor;
TimelineHeaderView *m_headerView;
AbstractTimelineModel *m_model;
signals:
/**
* @brief tells the parent of the timeline controller to load new events from 'from' to 'to'
* @param from x
* @param to y
*/
void signalLoadNewEvents(qint64 from, qint64 to);
/**
* @brief to output playback request to desired class
* @param eventSet EventSet to play
*/
//void signalPlayback(const NGLDAO::EventSet &eventSet);
void signalEventAction(EventGraphic *eg, int); // int => action type
void signalRangeChanged();
void signalArm(bool arm);
void signalZoomChanged();
public slots:
/**
* @brief filters the scrollbar events and gives new scrollbar position to necessary classes
* @param x scrollbar event
*/
void scrollBarFilter1(int x);
/**
* @brief gives new scrollbar position to necessary classes
*/
void scrollBarFilter2();
/**
* @brief sets new zoom factor
* @param zoomFactor zoom factor in percent points
*/
void slotSetZoomFactor(qint64 zoomFactor);
/**
* @brief sets new values to this class
* @param index affected column
* @param oldSize old width of column
* @param newSize new width of column
*/
void slotSectionResized(int logicalIndex, int oldSize, int newSize);
/**
* @brief set timeline model for the timeline widget's view
* @param model model of the view - of the widget
*/
void setTimelineModel(AbstractTimelineModel *model);
/**
* @brief slotUpdateTimeline updates all data of the timeline by setting the
* new range (if new), shoes new events (if any), etc.. and is emitted by
* the model after there is no new data anymore arriving, after data has arrived - saves resources and prevents flickering
*/
void slotUpdateTimeline();
void slotRefreshData();
};
} // namespace LtsTimelineClassic