diff data/model/RangeSummarisableTimeValueModel.h @ 297:c022976d18e8

* Merge from sv-match-alignment branch (excluding alignment-specific document). - add aggregate wave model (not yet complete enough to be added as a true model in a layer, but there's potential) - add play solo mode - add alignment model -- unused in plain SV - fix two plugin leaks - add m3u playlist support (opens all files at once, potentially hazardous) - fix retrieval of pre-encoded URLs - add ability to resample audio files on import, so as to match rates with other files previously loaded; add preference for same - add preliminary support in transform code for range and rate of transform input - reorganise preferences dialog, move dark-background option to preferences, add option for temporary directory location
author Chris Cannam
date Fri, 28 Sep 2007 13:56:38 +0000
parents 185454896a76
children 5877d68815c7
line wrap: on
line diff
--- a/data/model/RangeSummarisableTimeValueModel.h	Fri Sep 21 09:13:11 2007 +0000
+++ b/data/model/RangeSummarisableTimeValueModel.h	Fri Sep 28 13:56:38 2007 +0000
@@ -4,7 +4,7 @@
     Sonic Visualiser
     An audio file viewer and annotation editor.
     Centre for Digital Music, Queen Mary, University of London.
-    This file copyright 2006 Chris Cannam.
+    This file copyright 2006-2007 Chris Cannam and QMUL.
     
     This program is free software; you can redistribute it and/or
     modify it under the terms of the GNU General Public License as
@@ -21,6 +21,8 @@
 #include "DenseTimeValueModel.h"
 #include "base/ZoomConstraint.h"
 
+class AlignmentModel;
+
 /**
  * Base class for models containing dense two-dimensional data (value
  * against time) that may be meaningfully represented in a zoomed view
@@ -33,6 +35,8 @@
     Q_OBJECT
 
 public:
+    RangeSummarisableTimeValueModel() : m_alignment(0) { }
+
     struct Range
     {
         float min;
@@ -68,6 +72,18 @@
      * and end frames.
      */
     virtual Range getRange(size_t channel, size_t start, size_t end) const = 0;
+
+    virtual void setAlignment(AlignmentModel *alignment); // I take ownership
+    virtual const Model *getAlignmentReference() const;
+    virtual size_t alignToReference(size_t frame) const;
+    virtual size_t alignFromReference(size_t referenceFrame) const;
+    virtual int getAlignmentCompletion() const;
+
+signals:
+    void alignmentCompletionChanged();
+
+protected:
+    AlignmentModel *m_alignment;
 };
 
 #endif