- Formatted all CodeGen module files (9 files) - Formatted LtsAppDescriptor module files - Formatted LtsAppManager/AppChooser files - Applied clang-format to all DTC and enum headers across modules - Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/) Cosmetic changes only, no functional modifications. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
108 lines
2.1 KiB
C++
108 lines
2.1 KiB
C++
|
|
|
|
#pragma once
|
|
#include "ltstimeline_export.h"
|
|
#include "timeline_utils.h"
|
|
|
|
#include <NGLLogger/INGLLogger.h>
|
|
#include <QObject>
|
|
#include <QWidget>
|
|
|
|
class QScrollBar;
|
|
class QAbstractItemModel;
|
|
|
|
namespace Ui
|
|
{
|
|
class Timeline;
|
|
}
|
|
|
|
namespace LtsTimeline
|
|
{
|
|
|
|
class TimelineView;
|
|
class TimelineHeaderView;
|
|
class TimelineModel;
|
|
|
|
class LTSTIMELINE_EXPORT TimelineWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit TimelineWidget(QWidget* parent = nullptr);
|
|
~TimelineWidget();
|
|
|
|
TimelineView* view();
|
|
|
|
TimelineHeaderView* header();
|
|
|
|
TimelineModel* timelineModel();
|
|
void setModel(QAbstractItemModel* model);
|
|
|
|
QScrollBar* slider();
|
|
|
|
ZoomFactor zoomFactor() const;
|
|
void setZoomFactor(ZoomFactor factor);
|
|
|
|
ZoomFactor minimumZoomFactor() const;
|
|
void setMinimumZoomFactor(ZoomFactor factor);
|
|
|
|
ZoomFactor maximumZoomFactor() const;
|
|
void setMaximumZoomFactor(ZoomFactor factor);
|
|
|
|
qint64 startTime() const;
|
|
void setStartTime(qint64 time);
|
|
|
|
qint64 currentTime() const;
|
|
void setCurrentTime(qint64 time);
|
|
|
|
qint64 endTime() const;
|
|
void setEndTime(qint64 time);
|
|
|
|
int duration() const;
|
|
void setDuration(int duration);
|
|
|
|
bool isCursorTextVisible() const;
|
|
void setCursorTextVisible(bool visible);
|
|
void setCursorText(const QString& text);
|
|
void setCursorText(const QStringList& texts);
|
|
|
|
bool isSnapEnabled() const;
|
|
void setSnapEnabled(bool enabled);
|
|
void enableSnap();
|
|
void disableSnap();
|
|
void triggerSnap();
|
|
|
|
void setZoomInIcon(QIcon icon);
|
|
void setZoomOutIcon(QIcon icon);
|
|
|
|
QWidget* placeholder();
|
|
void setPlaceholder(QWidget* widget);
|
|
|
|
void showDebugWidget();
|
|
void hideDebugWidget();
|
|
|
|
private:
|
|
NGL::INGLLogger& m_logger;
|
|
void populateZoomFactorComboBox();
|
|
|
|
public:
|
|
void onUpdateZoomButtons();
|
|
|
|
private slots:
|
|
void onSectionResized(int logicalIndex, int oldSize, int newSize);
|
|
void onSliderValueChanged(int value);
|
|
void onZoomChanged(ZoomFactor factor);
|
|
void onZoomSelected();
|
|
void onZoomIn();
|
|
void onZoomOut();
|
|
|
|
void onUpdateDebugInfo();
|
|
|
|
signals:
|
|
|
|
private:
|
|
Ui::Timeline* m_ui{nullptr};
|
|
};
|
|
|
|
} // namespace LtsTimeline
|