7 #include <QCoreApplication>
33 bool HandleAction(
const QString &
action, uint64_t frame);
35 void UpdateSeekAmount(
int change);
38 void UpdateOSD(uint64_t frame,
double frame_rate,
OSD *osd);
39 static void UpdateOSD(std::chrono::milliseconds timecode,
OSD *osd);
42 void SetEditing(
bool edit,
OSD *osd =
nullptr);
43 void SetFileEditing(
bool edit);
44 bool IsFileEditing(
void);
45 bool IsEmpty(
void)
const;
46 bool IsSaved(
void)
const;
48 void SetChanged(
bool changed =
true) { m_changed = changed; }
52 void SaveMap(
bool isAutoSave =
false);
53 void LoadMap(
const QString& undoMessage =
"");
54 bool LoadAutoSaveMap(
void);
57 void Clear(
const QString& undoMessage =
"");
58 void ReverseAll(
void);
59 void NewCut(uint64_t frame);
60 void Delete(uint64_t frame,
const QString& undoMessage);
61 void MoveRelative(uint64_t frame,
bool right);
62 void Move(uint64_t frame, uint64_t to);
64 bool IsInDelete(uint64_t frame)
const;
65 uint64_t GetNearestMark(uint64_t frame,
bool right,
66 bool *hasMark =
nullptr)
const;
67 bool IsTemporaryMark(uint64_t frame)
const;
68 bool HasTemporaryMark(
void)
const;
69 uint64_t GetLastFrame(
void)
const;
73 std::chrono::milliseconds TranslatePositionFrameToMs(uint64_t position,
74 float fallback_framerate,
75 bool use_cutlist)
const;
76 uint64_t TranslatePositionMsToFrame(std::chrono::milliseconds dur_ms,
77 float fallback_framerate,
78 bool use_cutlist)
const;
79 uint64_t TranslatePositionAbsToRel(uint64_t position)
const;
80 uint64_t TranslatePositionRelToAbs(uint64_t position)
const;
82 void TrackerReset(uint64_t frame);
83 bool TrackerWantsToJump(uint64_t frame, uint64_t &to)
const;
87 bool HasUndo(
void)
const {
return m_undoStackPointer > 0; }
89 {
return m_undoStackPointer < m_undoStack.size(); }
90 QString GetUndoMessage(
void)
const;
91 QString GetRedoMessage(
void)
const;
98 void Push(
const QString &undoMessage);
100 const QString &undoMessage);
102 QString CreateTimeString(uint64_t frame,
bool use_cutlist,
103 double frame_rate,
bool full_resolution)
const;
105 bool m_editing {
false};
106 bool m_nextCutStartIsValid {
false};
107 uint64_t m_nextCutStart {0};
110 bool m_changed {
true};
111 int m_seekamountpos {4};
112 float m_seekamount {1.0F};
114 uint64_t m_cachedTotalForOSD {0};
117 int m_undoStackPointer {0};
120 #endif // DELETEMAP_H