Chris@392: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
Chris@392: 
Chris@392: /*
Chris@392:     Sonic Visualiser
Chris@392:     An audio file viewer and annotation editor.
Chris@392:     Centre for Digital Music, Queen Mary, University of London.
Chris@392:     This file copyright 2007 QMUL.
Chris@392:     
Chris@392:     This program is free software; you can redistribute it and/or
Chris@392:     modify it under the terms of the GNU General Public License as
Chris@392:     published by the Free Software Foundation; either version 2 of the
Chris@392:     License, or (at your option) any later version.  See the file
Chris@392:     COPYING included with this distribution for more information.
Chris@392: */
Chris@392: 
Chris@1581: #ifndef SV_PROGRESS_PRINTER_H
Chris@1581: #define SV_PROGRESS_PRINTER_H
Chris@392: 
Chris@392: #include "ProgressReporter.h"
Chris@392: 
Chris@392: class ProgressPrinter : public ProgressReporter
Chris@392: {
Chris@392:     Q_OBJECT
Chris@392:     
Chris@392: public:
Chris@392:     ProgressPrinter(QString message, QObject *parent = 0);
Chris@392:     virtual ~ProgressPrinter();
Chris@392:     
Chris@1580:     bool isDefinite() const override;
Chris@1580:     void setDefinite(bool definite) override;
Chris@439: 
Chris@1580:     bool wasCancelled() const override { return false; } // no mechanism
Chris@439: 
Chris@392: public slots:
Chris@1580:     void setMessage(QString) override;
Chris@1580:     void setProgress(int) override;
Chris@515:     virtual void done();
Chris@392: 
Chris@392: protected:
Chris@392:     QString m_prefix;
Chris@392:     int m_lastProgress;
Chris@439:     bool m_definite;
Chris@392: };
Chris@392: 
Chris@392: #endif