Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
377:0bcb449d15f4 | 378:22b72f0f6a4e |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 /* | |
4 Sonic Visualiser | |
5 An audio file viewer and annotation editor. | |
6 Centre for Digital Music, Queen Mary, University of London. | |
7 This file copyright 2007-2008 QMUL. | |
8 | |
9 This program is free software; you can redistribute it and/or | |
10 modify it under the terms of the GNU General Public License as | |
11 published by the Free Software Foundation; either version 2 of the | |
12 License, or (at your option) any later version. See the file | |
13 COPYING included with this distribution for more information. | |
14 */ | |
15 | |
16 #ifndef _PROGRESS_DIALOG_H_ | |
17 | |
18 #include "base/ProgressReporter.h" | |
19 | |
20 class QProgressDialog; | |
21 class QTimer; | |
22 | |
23 class ProgressDialog : public ProgressReporter | |
24 { | |
25 Q_OBJECT | |
26 | |
27 public: | |
28 ProgressDialog(QString message, bool cancellable, | |
29 int timeBeforeShow = 0, QWidget *parent = 0); | |
30 virtual ~ProgressDialog(); | |
31 | |
32 signals: | |
33 void cancelled(); | |
34 | |
35 public slots: | |
36 virtual void setMessage(QString text); | |
37 virtual void setProgress(int percentage); | |
38 | |
39 protected slots: | |
40 virtual void showTimerElapsed(); | |
41 | |
42 protected: | |
43 QProgressDialog *m_dialog; | |
44 QTimer *m_showTimer; | |
45 bool m_timerElapsed; | |
46 }; | |
47 | |
48 #endif |