comparison data/model/WaveFileModel.h @ 179:0ed2b2e26b44

* Tidy up inheritance hierarchy of model classes -- remove ZoomConstraint as a base class (make it a member instead) and remove virtual inheritances of QObject (no longer necessary).
author Chris Cannam
date Thu, 05 Oct 2006 11:03:06 +0000
parents b0f4555b625e
children 89b05b679dc3
comparison
equal deleted inserted replaced
178:0e266fa2510f 179:0ed2b2e26b44
25 25
26 #include <stdlib.h> 26 #include <stdlib.h>
27 27
28 class AudioFileReader; 28 class AudioFileReader;
29 29
30 class WaveFileModel : public RangeSummarisableTimeValueModel, 30 class WaveFileModel : public RangeSummarisableTimeValueModel
31 virtual public PowerOfSqrtTwoZoomConstraint
32 { 31 {
33 Q_OBJECT 32 Q_OBJECT
34 33
35 public: 34 public:
36 WaveFileModel(QString path); 35 WaveFileModel(QString path);
37 WaveFileModel(QString path, AudioFileReader *reader); 36 WaveFileModel(QString path, AudioFileReader *reader);
38 ~WaveFileModel(); 37 ~WaveFileModel();
39 38
40 bool isOK() const; 39 bool isOK() const;
41 bool isReady(int *) const; 40 bool isReady(int *) const;
41
42 const ZoomConstraint *getZoomConstraint() const { return &m_zoomConstraint; }
42 43
43 size_t getFrameCount() const; 44 size_t getFrameCount() const;
44 size_t getChannelCount() const; 45 size_t getChannelCount() const;
45 size_t getSampleRate() const; 46 size_t getSampleRate() const;
46 47
105 mutable QMutex m_mutex; 106 mutable QMutex m_mutex;
106 RangeCacheFillThread *m_fillThread; 107 RangeCacheFillThread *m_fillThread;
107 QTimer *m_updateTimer; 108 QTimer *m_updateTimer;
108 size_t m_lastFillExtent; 109 size_t m_lastFillExtent;
109 bool m_exiting; 110 bool m_exiting;
111 static PowerOfSqrtTwoZoomConstraint m_zoomConstraint;
110 }; 112 };
111 113
112 #endif 114 #endif