diff src/Analyser.h @ 165:ebcfb8dce020

Replace previous candidates when making a new analysis. Also revert to built-in spectrogram for now (CQ is still pending)
author Chris Cannam
date Fri, 31 Jan 2014 17:54:49 +0000
parents 62ceae757fe0
children 6b6906017536
line wrap: on
line diff
--- a/src/Analyser.h	Thu Jan 30 17:33:55 2014 +0000
+++ b/src/Analyser.h	Fri Jan 31 17:54:49 2014 +0000
@@ -84,9 +84,9 @@
     void getEnclosingSelectionScope(size_t f, size_t &f0, size_t &f1);
 
     /**
-     * Analyse the selection and add candidates layers for the region
-     * it contains. Returns "" on success or a user-readable error
-     * string on failure.
+     * Analyse the selection and schedule asynchronous adds of
+     * candidate layers for the region it contains. Returns "" on
+     * success or a user-readable error string on failure.
      */
     QString reAnalyseSelection(Selection sel);
 
@@ -98,14 +98,16 @@
     WaveFileModel *m_fileModel;
     PaneStack *m_paneStack;
     Pane *m_pane;
+
     mutable std::map<Component, Layer *> m_layers;
 
+    Selection m_reAnalysingSelection;
+    std::vector<Layer *> m_reAnalysisCandidates;
+
     QString addVisualisations();
     QString addWaveform();
     QString addAnalyses();
 
-    QString addTestCandidates(Selection sel);
-
     // Document::LayerCreationHandler method
     void layersCreated(std::vector<Layer *>, std::vector<Layer *>);