krita
kis_progress_display_interface.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KIS_PROGRESS_DISPLAY_INTERFACE_H_
00020 #define KIS_PROGRESS_DISPLAY_INTERFACE_H_
00021
00022 class KisProgressSubject;
00023
00024
00025 namespace KisProgress {
00026
00027 const int ProgressEventBase = QEvent::User + 42 + 42;
00028
00029 class UpdateEvent : QCustomEvent {
00030
00031 public:
00032
00033 UpdateEvent(int percent) : QCustomEvent(ProgressEventBase + 1), m_percent(percent) {};
00034 int m_percent;
00035 };
00036
00037 class UpdateStageEvent : QCustomEvent {
00038
00039 public:
00040
00041 UpdateStageEvent(const QString & stage, int percent) : QCustomEvent(ProgressEventBase + 2 ), m_stage(stage), m_percent(percent) {};
00042 QString m_stage;
00043 int m_percent;
00044 };
00045
00046 class DoneEvent : QCustomEvent {
00047 DoneEvent() : QCustomEvent(ProgressEventBase + 3){};
00048 };
00049
00050 class ErrorEvent : QCustomEvent {
00051 ErrorEvent() : QCustomEvent(ProgressEventBase + 4){};
00052 };
00053
00054 class DestroyedEvent: QCustomEvent {
00055 DestroyedEvent() : QCustomEvent(ProgressEventBase + 5){};
00056 };
00057
00058
00059 }
00060
00061
00062
00063 class KisProgressDisplayInterface {
00064 public:
00065 KisProgressDisplayInterface() {}
00066 virtual ~KisProgressDisplayInterface() {}
00067
00068 virtual void setSubject(KisProgressSubject *subject, bool modal, bool canCancel) = 0;
00069
00070 private:
00071 KisProgressDisplayInterface(const KisProgressDisplayInterface&);
00072 KisProgressDisplayInterface& operator=(const KisProgressDisplayInterface&);
00073 };
00074
00075 #endif // KIS_PROGRESS_DISPLAY_INTERFACE_H_
00076
|