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-2008 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_REPORTER_H_ Chris@439: #define _PROGRESS_REPORTER_H_ Chris@392: Chris@392: #include Chris@392: #include Chris@392: Chris@392: class ProgressReporter : public QObject Chris@392: { Chris@392: Q_OBJECT Chris@392: Chris@392: public: Chris@392: ProgressReporter(QObject *parent = 0); Chris@392: virtual ~ProgressReporter(); Chris@392: Chris@439: virtual bool isDefinite() const = 0; Chris@439: virtual void setDefinite(bool definite) = 0; // default should be definite Chris@439: Chris@439: virtual bool wasCancelled() const = 0; Chris@439: Chris@392: signals: Chris@392: void cancelled(); Chris@392: Chris@392: public slots: Chris@392: virtual void setMessage(QString text) = 0; Chris@392: virtual void setProgress(int percentage) = 0; Chris@392: }; Chris@392: Chris@392: #endif