Chris@752: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@752: Chris@752: /* Chris@752: Sonic Visualiser Chris@752: An audio file viewer and annotation editor. Chris@752: Centre for Digital Music, Queen Mary, University of London. Chris@752: Chris@752: This program is free software; you can redistribute it and/or Chris@752: modify it under the terms of the GNU General Public License as Chris@752: published by the Free Software Foundation; either version 2 of the Chris@752: License, or (at your option) any later version. See the file Chris@752: COPYING included with this distribution for more information. Chris@752: */ Chris@752: Chris@752: #ifndef SV_EXTERNAL_PROGRAM_ALIGNER_H Chris@752: #define SV_EXTERNAL_PROGRAM_ALIGNER_H Chris@752: Chris@753: #include "Aligner.h" Chris@753: Chris@752: #include Chris@752: #include Chris@752: Chris@752: class AlignmentModel; Chris@752: class Document; Chris@752: Chris@753: class ExternalProgramAligner : public Aligner Chris@752: { Chris@752: Q_OBJECT Chris@752: Chris@752: public: Chris@752: ExternalProgramAligner(Document *doc, Chris@752: ModelId reference, Chris@752: ModelId toAlign, Chris@752: QString program); Chris@752: Chris@752: // Destroy the aligner, cleanly cancelling any ongoing alignment Chris@752: ~ExternalProgramAligner(); Chris@752: Chris@761: void begin() override; Chris@752: Chris@752: static bool isAvailable(QString program); Chris@752: Chris@752: private slots: Chris@752: void programFinished(int, QProcess::ExitStatus); Chris@779: void logStderrOutput(); Chris@752: Chris@752: private: Chris@752: Document *m_document; Chris@752: ModelId m_reference; Chris@752: ModelId m_toAlign; Chris@752: ModelId m_alignmentModel; Chris@752: QString m_program; Chris@752: QProcess *m_process; Chris@752: }; Chris@752: Chris@752: #endif