Mercurial > hg > svgui
annotate widgets/ProgressDialog.h @ 378:22b72f0f6a4e
* More work to abstract out interactive components used in the data library,
  so that it does not need to depend on QtGui.
| author | Chris Cannam | 
|---|---|
| date | Fri, 14 Mar 2008 17:14:21 +0000 | 
| parents | |
| children | 33b7f5e54d60 | 
| rev | line source | 
|---|---|
| Chris@378 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | 
| Chris@378 | 2 | 
| Chris@378 | 3 /* | 
| Chris@378 | 4 Sonic Visualiser | 
| Chris@378 | 5 An audio file viewer and annotation editor. | 
| Chris@378 | 6 Centre for Digital Music, Queen Mary, University of London. | 
| Chris@378 | 7 This file copyright 2007-2008 QMUL. | 
| Chris@378 | 8 | 
| Chris@378 | 9 This program is free software; you can redistribute it and/or | 
| Chris@378 | 10 modify it under the terms of the GNU General Public License as | 
| Chris@378 | 11 published by the Free Software Foundation; either version 2 of the | 
| Chris@378 | 12 License, or (at your option) any later version. See the file | 
| Chris@378 | 13 COPYING included with this distribution for more information. | 
| Chris@378 | 14 */ | 
| Chris@378 | 15 | 
| Chris@378 | 16 #ifndef _PROGRESS_DIALOG_H_ | 
| Chris@378 | 17 | 
| Chris@378 | 18 #include "base/ProgressReporter.h" | 
| Chris@378 | 19 | 
| Chris@378 | 20 class QProgressDialog; | 
| Chris@378 | 21 class QTimer; | 
| Chris@378 | 22 | 
| Chris@378 | 23 class ProgressDialog : public ProgressReporter | 
| Chris@378 | 24 { | 
| Chris@378 | 25 Q_OBJECT | 
| Chris@378 | 26 | 
| Chris@378 | 27 public: | 
| Chris@378 | 28 ProgressDialog(QString message, bool cancellable, | 
| Chris@378 | 29 int timeBeforeShow = 0, QWidget *parent = 0); | 
| Chris@378 | 30 virtual ~ProgressDialog(); | 
| Chris@378 | 31 | 
| Chris@378 | 32 signals: | 
| Chris@378 | 33 void cancelled(); | 
| Chris@378 | 34 | 
| Chris@378 | 35 public slots: | 
| Chris@378 | 36 virtual void setMessage(QString text); | 
| Chris@378 | 37 virtual void setProgress(int percentage); | 
| Chris@378 | 38 | 
| Chris@378 | 39 protected slots: | 
| Chris@378 | 40 virtual void showTimerElapsed(); | 
| Chris@378 | 41 | 
| Chris@378 | 42 protected: | 
| Chris@378 | 43 QProgressDialog *m_dialog; | 
| Chris@378 | 44 QTimer *m_showTimer; | 
| Chris@378 | 45 bool m_timerElapsed; | 
| Chris@378 | 46 }; | 
| Chris@378 | 47 | 
| Chris@378 | 48 #endif | 
