#include <string>
#include "defs.h"
+#include "state.pb.h"
struct Clip {
int64_t pts_in = -1, pts_out = -1; // pts_in is inclusive, pts_out is exclusive.
Q_OBJECT
public:
- ClipList() {}
+ explicit ClipList(const ClipListProto &serialized);
enum class Column {
IN,
ClipProxy mutable_back() { return mutable_clip(size() - 1); }
const Clip *back() const { return clip(size() - 1); }
+ ClipListProto serialize() const;
+
void emit_data_changed(size_t row) override;
+signals:
+ void any_content_changed();
+
private:
std::vector<Clip> clips;
};
Q_OBJECT
public:
- PlayList() {}
+ explicit PlayList(const ClipListProto &serialized);
enum class Column {
PLAYING,
void set_currently_playing(int index, double progress); // -1 = none.
int get_currently_playing() const { return currently_playing_index; }
+ ClipListProto serialize() const;
+
void emit_data_changed(size_t row) override;
+signals:
+ void any_content_changed();
+
private:
std::vector<Clip> clips;
int currently_playing_index = -1;