update
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
#include <QWidget>
|
||||
|
||||
class QResizeEvent;
|
||||
class TimelineEditorModel;
|
||||
|
||||
class TimelineWidget final : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TimelineWidget(QWidget* parent = nullptr);
|
||||
|
||||
// 兼容旧接口:NLA/片段系统下时间轴始终固定为 0..600(local frame)。
|
||||
void setFrameRange(int start, int end);
|
||||
void setCurrentFrame(int frame);
|
||||
/// 由主窗口同步工程帧时调用:不发射 frameScrubbed,避免与拖动/刷新打架造成数字闪烁
|
||||
@@ -20,6 +20,9 @@ public:
|
||||
int selectionStart() const { return m_selStart; }
|
||||
int selectionEnd() const { return m_selEnd; }
|
||||
|
||||
void setModel(TimelineEditorModel* model);
|
||||
TimelineEditorModel* model() const { return m_model; }
|
||||
|
||||
// 轨道数据直接由上层提供(通常来自当前条带引用的 clip)。
|
||||
void setKeyframeTracks(const QVector<int>& locFrames,
|
||||
const QVector<int>& scaleFrames,
|
||||
@@ -63,9 +66,9 @@ private:
|
||||
|
||||
void setFrameInternal(int frame, bool commit);
|
||||
|
||||
static constexpr int kStart = 0;
|
||||
static constexpr int kEnd = 600; // exclusive for mapping, inclusive for UI labels
|
||||
int m_currentFrame = 0; // local frame: 0..599
|
||||
int m_start = 0;
|
||||
int m_end = 600; // exclusive for mapping
|
||||
int m_currentFrame = 0;
|
||||
|
||||
int m_selStart = -1;
|
||||
int m_selEnd = -1;
|
||||
@@ -83,4 +86,6 @@ private:
|
||||
|
||||
KeyKind m_selKeyKind = KeyKind::None;
|
||||
int m_selKeyFrame = -1;
|
||||
|
||||
TimelineEditorModel* m_model = nullptr; // non-owning
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user