- training_area_telegrams.cpp: Fixed QJsonObject initializer syntax (Qt6 requires {{}} not ({}))
- training_area_telegrams.cpp: Fixed fromJson() methods to access m_* members directly
- training_area_telegrams.cpp: Fixed brace mismatches in multiple toJson() methods
- training_area_telegrams.h: Changed Header struct to public members for consistency
- tx_mixin.cpp: Fixed getEquipmentNumber() template for direct member access
- lts_coordinate.cpp: Added missing #include <iomanip>
- MIGRATION_STATUS.md: Added migration progress tracking document
C++17 constraint enforced due to RTI Connext DDS 7.7.0 incompatibility with C++20+
Build status: BUILD_RTI=OFF successful (0 errors, warnings only)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
137 lines
3.8 KiB
C++
137 lines
3.8 KiB
C++
#pragma once
|
|
#include "ltsscripttimeline_export.h"
|
|
#include "track_entry_painters.h"
|
|
|
|
#include <QtGui/QKeyEvent>
|
|
#include <QtCore/QObject>
|
|
#include <QtCore/QPointer>
|
|
#include <QtWidgets/QWidget>
|
|
|
|
namespace Ui
|
|
{
|
|
class ScriptTimeline;
|
|
}
|
|
|
|
class QRubberBand;
|
|
|
|
namespace LtsScriptTimeline
|
|
{
|
|
class TrackContentWidget;
|
|
class TrackWidget;
|
|
class TrackEntry;
|
|
class Tools;
|
|
|
|
class LTSSCRIPTTIMELINE_EXPORT ScriptTimeline : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ScriptTimeline(QWidget* parent = nullptr);
|
|
~ScriptTimeline();
|
|
|
|
TrackWidget* addTrack(const QString& name, bool filtersAllowed = true);
|
|
|
|
void setScriptId(int scriptId)
|
|
{
|
|
m_scriptId = scriptId;
|
|
}
|
|
|
|
bool addTopic(TrackEntry* te);
|
|
QString newTrackName() const;
|
|
|
|
int nextUniqueId()
|
|
{
|
|
return ++m_uniqueId;
|
|
}
|
|
|
|
void setUniqueIdCounter(int uniqueId)
|
|
{
|
|
m_uniqueId = uniqueId;
|
|
}
|
|
|
|
QVector<TrackEntry*> getTrackEntriesWithFiltersAsEntries(bool selectedEntriesOnly = false) const;
|
|
QMap<QString, QVector<TrackEntry*>> getTrackEntriesWithFilters(bool selectedEntriesOnly = false) const;
|
|
QVector<TrackEntry*> getTrackEntries(bool selectedEntriesOnly = false) const;
|
|
QVector<TrackEntry*> getSelectedEntriesWithFilterEntries() const;
|
|
QVector<TrackEntry*> getSelectedFilterEntries() const;
|
|
TrackEntry* getTrackEntry(int topicId);
|
|
TrackEntry* getTrackEntryWithFiltersAsEntries(int topicId);
|
|
void setIndicatorTime(int time);
|
|
int getCurrentScriptEndTime();
|
|
|
|
void updateEverything();
|
|
void clear();
|
|
void setReadonly(bool readonly);
|
|
QList<TrackWidget*> getTrackWidgets() const;
|
|
void lockIndicator(bool lock = true);
|
|
int getFilterTrackEntryRealTime(TrackEntry* te);
|
|
bool checkNewLength(TrackEntry* te, int newLength);
|
|
bool importTrackEntries(const QVector<LtsScriptTimeline::TrackEntry*>& importTes);
|
|
|
|
protected:
|
|
void keyPressEvent(QKeyEvent* event) override;
|
|
void mousePressEvent(QMouseEvent* event) override;
|
|
void mouseMoveEvent(QMouseEvent*) override;
|
|
void mouseReleaseEvent(QMouseEvent*) override;
|
|
|
|
private:
|
|
Ui::ScriptTimeline* ui;
|
|
int m_uniqueId;
|
|
int m_scriptId;
|
|
int m_baseTrackWidgetWidth;
|
|
QVector<TrackEntry*> m_clipboard;
|
|
|
|
bool m_readonly;
|
|
int m_time;
|
|
Tools* m_tools;
|
|
TrackContentWidget* m_mlmsMaster;
|
|
QHash<TrackContentWidget*, bool> m_mlmsTCWStates;
|
|
bool m_ignoreChanges;
|
|
QHash<TrackWidget*, QByteArray> m_copyTopics;
|
|
|
|
struct RubberbandAction
|
|
{
|
|
QPoint origin;
|
|
QPointer<QRubberBand> rubberBand;
|
|
} m_rubberbandAction;
|
|
|
|
void resizeEvent(QResizeEvent* event) override;
|
|
void updateAllTracks();
|
|
|
|
signals:
|
|
void signalTrackEntrySelectionChanged(TrackEntry* te);
|
|
void signalChangesMade();
|
|
void signalHeaderIndicatorTimeChanged(int time);
|
|
void signalHeaderIndicatorTimeUserChanged(int time);
|
|
void signalEditEntry(const int topicId);
|
|
void signalTrackEntryDeleted(const int topicId);
|
|
void signalTrackEntryAdded(TrackEntry* te);
|
|
void signalSave();
|
|
|
|
public slots:
|
|
void slotUnselectAll();
|
|
void slotEscapeRubberband();
|
|
void slotStopRubberband();
|
|
void slotStartRubberband(const QPoint& pos);
|
|
void slotModifyRubberband();
|
|
void selectAll();
|
|
void slotCopyTopics();
|
|
void slotCutTopics();
|
|
void slotPasteTopics();
|
|
void slotDeleteSelectedTopics();
|
|
void slotMoveAll(int direction);
|
|
void slotScroll(int incr);
|
|
|
|
private slots:
|
|
void slotScrollbarValueChanged();
|
|
void slotZoomValueChanged(int value);
|
|
void slotDeleteTracks();
|
|
void slotSelectTrack();
|
|
void slotHeaderHandleResized(int newSize);
|
|
void slotHeaderIndicatorTimeChanged(int time);
|
|
void slotTrackEntrySelectionChanged(TrackEntry* te);
|
|
void slotSetNewScrollBarMaximum();
|
|
};
|
|
|
|
} // namespace LtsScriptTimeline
|