svgui  1.9
ProgressDialog.h
Go to the documentation of this file.
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  virtual bool isDefinite() const;
33  virtual void setDefinite(bool definite);
34 
35  virtual bool wasCancelled() const;
36 
37 signals:
38  void showing();
39  void cancelled();
40 
41 public slots:
42  virtual void setMessage(QString text);
43  virtual void setProgress(int percentage);
44 
45 protected slots:
46  virtual void showTimerElapsed();
47  void canceled();
48 
49 protected:
50  QProgressDialog *m_dialog;
51  QTimer *m_showTimer;
54 };
55 
56 #endif
virtual bool isDefinite() const
virtual void setMessage(QString text)
ProgressDialog(QString message, bool cancellable, int timeBeforeShow=0, QWidget *parent=0)
virtual void showTimerElapsed()
QProgressDialog * m_dialog
virtual void setProgress(int percentage)
QTimer * m_showTimer
virtual void setDefinite(bool definite)
virtual bool wasCancelled() const
virtual ~ProgressDialog()