comparison data/model/AlignmentModel.h @ 1038:cc27f35aa75c cxx11

Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author Chris Cannam
date Tue, 03 Mar 2015 15:18:24 +0000
parents 13f53ecc8bb5
children a1cd5abcb38b
comparison
equal deleted inserted replaced
1037:bf0e5944289b 1038:cc27f35aa75c
35 Model *inputModel, // probably an AggregateWaveModel; may be null; I take ownership 35 Model *inputModel, // probably an AggregateWaveModel; may be null; I take ownership
36 SparseTimeValueModel *path); // I take ownership 36 SparseTimeValueModel *path); // I take ownership
37 ~AlignmentModel(); 37 ~AlignmentModel();
38 38
39 virtual bool isOK() const; 39 virtual bool isOK() const;
40 virtual int getStartFrame() const; 40 virtual sv_frame_t getStartFrame() const;
41 virtual int getEndFrame() const; 41 virtual sv_frame_t getEndFrame() const;
42 virtual int getSampleRate() const; 42 virtual int getSampleRate() const;
43 virtual Model *clone() const; 43 virtual Model *clone() const;
44 virtual bool isReady(int *completion = 0) const; 44 virtual bool isReady(int *completion = 0) const;
45 virtual const ZoomConstraint *getZoomConstraint() const; 45 virtual const ZoomConstraint *getZoomConstraint() const;
46 46
47 QString getTypeName() const { return tr("Alignment"); } 47 QString getTypeName() const { return tr("Alignment"); }
48 48
49 const Model *getReferenceModel() const; 49 const Model *getReferenceModel() const;
50 const Model *getAlignedModel() const; 50 const Model *getAlignedModel() const;
51 51
52 int toReference(int frame) const; 52 sv_frame_t toReference(sv_frame_t frame) const;
53 int fromReference(int frame) const; 53 sv_frame_t fromReference(sv_frame_t frame) const;
54 54
55 void setPathFrom(SparseTimeValueModel *rawpath); 55 void setPathFrom(SparseTimeValueModel *rawpath);
56 void setPath(PathModel *path); 56 void setPath(PathModel *path);
57 57
58 virtual void toXml(QTextStream &stream, 58 virtual void toXml(QTextStream &stream,
59 QString indent = "", 59 QString indent = "",
60 QString extraAttributes = "") const; 60 QString extraAttributes = "") const;
61 61
62 signals: 62 signals:
63 void modelChanged(); 63 void modelChanged();
64 void modelChangedWithin(int startFrame, int endFrame); 64 void modelChangedWithin(sv_frame_t startFrame, sv_frame_t endFrame);
65 void completionChanged(); 65 void completionChanged();
66 66
67 protected slots: 67 protected slots:
68 void pathChanged(); 68 void pathChanged();
69 void pathChangedWithin(int startFrame, int endFrame); 69 void pathChangedWithin(sv_frame_t startFrame, sv_frame_t endFrame);
70 void pathCompletionChanged(); 70 void pathCompletionChanged();
71 71
72 protected: 72 protected:
73 Model *m_reference; // I don't own this 73 Model *m_reference; // I don't own this
74 Model *m_aligned; // I don't own this 74 Model *m_aligned; // I don't own this
82 bool m_pathComplete; 82 bool m_pathComplete;
83 83
84 void constructPath() const; 84 void constructPath() const;
85 void constructReversePath() const; 85 void constructReversePath() const;
86 86
87 int align(PathModel *path, int frame) const; 87 sv_frame_t align(PathModel *path, sv_frame_t frame) const;
88 }; 88 };
89 89
90 #endif 90 #endif