Mercurial > hg > svapp
annotate align/Aligner.h @ 761:6429a164b7e1 pitch-align
Schedule alignments with a small delay to avoid too much UI unresponsiveness. Also overhaul error reporting to use signals throughout.
author | Chris Cannam |
---|---|
date | Wed, 06 May 2020 11:45:27 +0100 |
parents | 31289e8592c7 |
children | a316cb6fed81 |
rev | line source |
---|---|
Chris@753 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@753 | 2 |
Chris@753 | 3 /* |
Chris@753 | 4 Sonic Visualiser |
Chris@753 | 5 An audio file viewer and annotation editor. |
Chris@753 | 6 Centre for Digital Music, Queen Mary, University of London. |
Chris@753 | 7 |
Chris@753 | 8 This program is free software; you can redistribute it and/or |
Chris@753 | 9 modify it under the terms of the GNU General Public License as |
Chris@753 | 10 published by the Free Software Foundation; either version 2 of the |
Chris@753 | 11 License, or (at your option) any later version. See the file |
Chris@753 | 12 COPYING included with this distribution for more information. |
Chris@753 | 13 */ |
Chris@753 | 14 |
Chris@753 | 15 #ifndef SV_ALIGNER_H |
Chris@753 | 16 #define SV_ALIGNER_H |
Chris@753 | 17 |
Chris@753 | 18 #include <QString> |
Chris@753 | 19 |
Chris@753 | 20 #include "data/model/Model.h" |
Chris@753 | 21 |
Chris@753 | 22 class Aligner : public QObject |
Chris@753 | 23 { |
Chris@753 | 24 Q_OBJECT |
Chris@753 | 25 |
Chris@753 | 26 public: |
Chris@753 | 27 virtual ~Aligner() { } |
Chris@753 | 28 |
Chris@761 | 29 public slots: |
Chris@761 | 30 virtual void begin() = 0; |
Chris@753 | 31 |
Chris@753 | 32 signals: |
Chris@753 | 33 /** |
Chris@753 | 34 * Emitted when alignment is successfully completed. The reference |
Chris@753 | 35 * and toAlign models can be queried from the alignment model. |
Chris@753 | 36 */ |
Chris@753 | 37 void complete(ModelId alignmentModel); // an AlignmentModel |
Chris@761 | 38 |
Chris@761 | 39 /** |
Chris@761 | 40 * Emitted when alignment fails. |
Chris@761 | 41 */ |
Chris@761 | 42 void failed(ModelId toAlign, QString errorText); // the toAlign model |
Chris@753 | 43 }; |
Chris@753 | 44 |
Chris@753 | 45 #endif |