20 #ifndef __TY_PROGRESS_MANAGER__
21 #define __TY_PROGRESS_MANAGER__
25 #include <qprogressdialog.h>
31 class TYProgressDialog :
public QProgressDialog
34 TYProgressDialog(QWidget* creator = 0,
const char*
name = 0,
bool modal =
false,
35 Qt::WindowFlags f = QFlag(0))
37 QProgressDialog(creator, f)
39 QLabel* label =
new QLabel(
name);
43 setWindowModality(Qt::WindowModal);
47 setWindowModality(Qt::NonModal);
50 TYProgressDialog(
const QString& labelText,
const QString& cancelButtonText,
int totalSteps,
51 QWidget* creator = 0,
const char*
name = 0,
bool modal =
false,
52 Qt::WindowFlags f = QFlag(0))
53 : QProgressDialog(labelText, cancelButtonText, 0, totalSteps, creator, f)
55 QLabel* label =
new QLabel(
name);
59 setWindowModality(Qt::WindowModal);
63 setWindowModality(Qt::NonModal);
71 virtual void setEnabled(
bool)
92 static void create(QWidget* pParent,
const char*
name = 0);
100 static void set(
int totalSteps,
int stepSize = 1);
107 static int getProgress();
114 static void setProgress(
int progress);
126 static void step(
bool& wasCancelled);
135 static void setWindowTitle(
const char* caption);
139 static void setMessage(
const char* message);
143 static TYProgressDialog* getProgressDialog()
145 return _pProgressDialog;
156 static TYProgressDialog* _pProgressDialog;
159 static int _stepSize;
174 static void create(QWidget* pParent,
const char*
name = 0) {}
175 static void set(
int totalSteps,
int stepSize = 1) {}
177 static void step(
bool& wasCancelled) {}
static void step(bool &wasCancelled)
static void set(int totalSteps, int stepSize=1)
static void create(QWidget *pParent, const char *name=0)