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@392: #ifndef _PROGRESS_PRINTER_H_ Chris@392: #define _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@439: virtual bool isDefinite() const; Chris@439: virtual void setDefinite(bool definite); Chris@439: Chris@439: virtual bool wasCancelled() const { return false; } // no mechanism Chris@439: Chris@392: public slots: Chris@393: virtual void setMessage(QString); Chris@392: virtual void setProgress(int); 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