serialize rationals correctly and move block name to a node input
Since rationals aren't a known Qt format, the QVariant container can't automatically convert them to and from strings (for XML serialization). We have to hijack these functions and do the conversion manually for those types. Also moved the block name type to a node input, which means it's serialized and copied by default (I'm not sure why it wasn't already like this).
This commit is contained in:
@@ -73,7 +73,7 @@ public:
|
||||
bool is_still() const;
|
||||
bool is_reversed() const;
|
||||
|
||||
const QString& block_name() const;
|
||||
QString block_name() const;
|
||||
void set_block_name(const QString& name);
|
||||
|
||||
static void Link(Block* a, Block* b);
|
||||
@@ -108,12 +108,11 @@ protected:
|
||||
|
||||
rational MediaToSequenceTime(const rational& media_time) const;
|
||||
|
||||
static void CopyParameters(const Block *source, Block* dest);
|
||||
|
||||
Block* previous_;
|
||||
Block* next_;
|
||||
|
||||
private:
|
||||
NodeInput* name_input_;
|
||||
NodeInput* length_input_;
|
||||
NodeInput* media_in_input_;
|
||||
NodeInput* speed_input_;
|
||||
@@ -121,8 +120,6 @@ private:
|
||||
rational in_point_;
|
||||
rational out_point_;
|
||||
|
||||
QString block_name_;
|
||||
|
||||
QVector<Block*> linked_clips_;
|
||||
|
||||
private slots:
|
||||
|
||||
Reference in New Issue
Block a user