chalk

kis_progress_display_interface.h
1/*
2 * Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifndef KIS_PROGRESS_DISPLAY_INTERFACE_H_
20#define KIS_PROGRESS_DISPLAY_INTERFACE_H_
21
22class KisProgressSubject;
23
24
25namespace KisProgress {
26
27 const int ProgressEventBase = TQEvent::User + 42 + 42;
28
29 class UpdateEvent : TQCustomEvent {
30
31 public:
32
33 UpdateEvent(int percent) : TQCustomEvent(ProgressEventBase + 1), m_percent(percent) {};
34 int m_percent;
35 };
36
37 class UpdateStageEvent : TQCustomEvent {
38
39 public:
40
41 UpdateStageEvent(const TQString & stage, int percent) : TQCustomEvent(ProgressEventBase + 2 ), m_stage(stage), m_percent(percent) {};
42 TQString m_stage;
43 int m_percent;
44 };
45
46 class DoneEvent : TQCustomEvent {
47 DoneEvent() : TQCustomEvent(ProgressEventBase + 3){};
48 };
49
50 class ErrorEvent : TQCustomEvent {
51 ErrorEvent() : TQCustomEvent(ProgressEventBase + 4){};
52 };
53
54 class DestroyedEvent: TQCustomEvent {
55 DestroyedEvent() : TQCustomEvent(ProgressEventBase + 5){};
56 };
57
58
59}
60
61
62
63class KisProgressDisplayInterface {
64public:
65 KisProgressDisplayInterface() {}
66 virtual ~KisProgressDisplayInterface() {}
67
68 virtual void setSubject(KisProgressSubject *subject, bool modal, bool canCancel) = 0;
69
70private:
71 KisProgressDisplayInterface(const KisProgressDisplayInterface&);
72 KisProgressDisplayInterface& operator=(const KisProgressDisplayInterface&);
73};
74
75#endif // KIS_PROGRESS_DISPLAY_INTERFACE_H_
76