comparison data/model/AlignmentModel.h @ 1738:4abc0f08adf9 by-id

More on alignment models and paths
author Chris Cannam
date Wed, 26 Jun 2019 10:21:15 +0100
parents 5d631f6129fe
children 6d09d68165a4
comparison
equal deleted inserted replaced
1737:5d631f6129fe 1738:4abc0f08adf9
15 15
16 #ifndef SV_ALIGNMENT_MODEL_H 16 #ifndef SV_ALIGNMENT_MODEL_H
17 #define SV_ALIGNMENT_MODEL_H 17 #define SV_ALIGNMENT_MODEL_H
18 18
19 #include "Model.h" 19 #include "Model.h"
20 #include "PathModel.h" 20 #include "Path.h"
21 #include "base/RealTime.h" 21 #include "base/RealTime.h"
22 22
23 #include <QString> 23 #include <QString>
24 #include <QStringList> 24 #include <QStringList>
25 25
58 58
59 sv_frame_t toReference(sv_frame_t frame) const; 59 sv_frame_t toReference(sv_frame_t frame) const;
60 sv_frame_t fromReference(sv_frame_t frame) const; 60 sv_frame_t fromReference(sv_frame_t frame) const;
61 61
62 void setPathFrom(ModelId pathSource); // a SparseTimeValueModel 62 void setPathFrom(ModelId pathSource); // a SparseTimeValueModel
63 void setPath(const PathModel &path); 63 void setPath(const Path &path);
64 64
65 void toXml(QTextStream &stream, 65 void toXml(QTextStream &stream,
66 QString indent = "", 66 QString indent = "",
67 QString extraAttributes = "") const override; 67 QString extraAttributes = "") const override;
68 68
70 sv_frame_t, sv_frame_t) const override { 70 sv_frame_t, sv_frame_t) const override {
71 return ""; 71 return "";
72 } 72 }
73 73
74 signals: 74 signals:
75 void modelChanged();
76 void modelChangedWithin(sv_frame_t startFrame, sv_frame_t endFrame);
77 void completionChanged(); 75 void completionChanged();
78 76
79 protected slots: 77 protected slots:
80 void pathSourceChanged();
81 void pathSourceChangedWithin(sv_frame_t startFrame, sv_frame_t endFrame); 78 void pathSourceChangedWithin(sv_frame_t startFrame, sv_frame_t endFrame);
82 void pathSourceCompletionChanged(); 79 void pathSourceCompletionChanged();
83 80
84 protected: 81 protected:
85 ModelId m_reference; 82 ModelId m_reference;
86 ModelId m_aligned; 83 ModelId m_aligned;
87 84
88 ModelId m_pathSource; // a SparseTimeValueModel 85 ModelId m_pathSource; // a SparseTimeValueModel
89 86
90 mutable std::unique_ptr<PathModel> m_path; 87 mutable std::unique_ptr<Path> m_path;
91 mutable std::unique_ptr<PathModel> m_reversePath; 88 mutable std::unique_ptr<Path> m_reversePath;
92 bool m_pathBegun; 89 bool m_pathBegun;
93 bool m_pathComplete; 90 bool m_pathComplete;
94 QString m_error; 91 QString m_error;
95 92
96 void constructPath() const; 93 void constructPath() const;
97 void constructReversePath() const; 94 void constructReversePath() const;
98 95
99 sv_frame_t align(const PathModel &path, sv_frame_t frame) const; 96 sv_frame_t performAlignment(const Path &path, sv_frame_t frame) const;
100 }; 97 };
101 98
102 #endif 99 #endif