diff data/model/Model.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 4b2ea82fd0ed
children 20028c634494
line wrap: on
line diff
--- a/data/model/Model.h	Thu Oct 05 11:02:05 2006 +0000
+++ b/data/model/Model.h	Thu Oct 05 11:03:06 2006 +0000
@@ -23,12 +23,14 @@
 
 typedef std::vector<float> SampleBlock;
 
+class ZoomConstraint;
+
 /** 
  * Model is the base class for all data models that represent any sort
  * of data on a time scale based on an audio frame rate.
  */
 
-class Model : virtual public QObject,
+class Model : public QObject,
 	      public XmlExportable
 {
     Q_OBJECT
@@ -93,6 +95,15 @@
     }
     static const int COMPLETION_UNKNOWN;
 
+    /**
+     * If this model imposes a zoom constraint, i.e. some limit to the
+     * set of resolutions at which its data can meaningfully be
+     * displayed, then return it.
+     */
+    virtual const ZoomConstraint *getZoomConstraint() const {
+        return 0;
+    }
+
     virtual void toXml(QTextStream &stream,
                        QString indent = "",
                        QString extraAttributes = "") const;