krita
kis_label_progress.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KIS_LABEL_PROGRESS_H_
00020 #define KIS_LABEL_PROGRESS_H_
00021
00022 #include <qlabel.h>
00023 #include <qevent.h>
00024
00025 #include "kis_progress_display_interface.h"
00026
00027 class QToolButton;
00028 class KProgress;
00029
00030 class KisLabelProgress : public QLabel, public KisProgressDisplayInterface {
00031 Q_OBJECT
00032 typedef QLabel super;
00033
00034 public:
00035 KisLabelProgress(QWidget *parent, const char *name = 0, WFlags f = 0);
00036 virtual ~KisLabelProgress();
00037
00038 public:
00039
00040 void setSubject(KisProgressSubject *subject, bool modal, bool canCancel);
00041
00042
00043 bool event(QEvent * ev);
00044
00045 private slots:
00046 virtual void update(int percent);
00047 virtual void updateStage(const QString& stage, int percent);
00048 virtual void done();
00049 virtual void error();
00050 virtual void subjectDestroyed();
00051
00052 private slots:
00053 void cancelPressed();
00054
00055 private:
00056 void reset();
00057
00058 KisProgressSubject *m_subject;
00059 KProgress *m_bar;
00060 QToolButton *m_cancelButton;
00061 bool m_modal;
00062 };
00063
00064 #endif // KIS_LABEL_PROGRESS_H_
00065
|