summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/ProgressBase.java
blob: c661280c76a8a99477e2597755f875de79bb2651 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQCloseEvent;
import org.kde.qt.TQWidget;
import org.kde.qt.TQWidget;

/**

 This class does all initialization stuff for progress,
 like connecting signals to slots.
 All slots are implemented as pure methods.
 All custom IO progress dialog should inherit this class.
 Add your GUI code to the constructor and implemement those virtual
 methods which you need in order to display progress.
 E.g. StatusbarProgress only implements slotTotalSize(),
 slotPercent() and slotSpeed().
 Custom progress dialog will be used like this :
 <pre>
 // create job
 CopyJob job = TDEIO.copy(...);
 // create a dialog
 MyCustomProgress customProgress;
 customProgress = new MyCustomProgress();
 // connect progress with job
 customProgress.setJob( job );
 ...
 </pre>
 There is a special method setStopOnClose() that controls the behavior of
 the dialog.
 See {@link ProgressBaseSignals} for signals emitted by ProgressBase
		@author Matej Koss <koss@miesto.sk>

		@short Base class for IO progress dialogs.

*/
public class ProgressBase extends TQWidget  {
	protected ProgressBase(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**	
		 Creates a new progress dialog.
			@param parent the parent of this dialog window, or 0
		   		@short    Creates a new progress dialog.
	*/
	public ProgressBase(TQWidget parent) {
		super((Class) null);
		newProgressBase(parent);
	}
	private native void newProgressBase(TQWidget parent);
	/**	
		 Assign a TDEIO.Job to this progress dialog.
			@param job the job to assign
		   		@short    Assign a TDEIO.Job to this progress dialog.
	*/
	public native void setJob(Job job);
	/**	
		 Assign a TDEIO.Job to this progress dialog.
			@param job the job to assign
		   		@short    Assign a TDEIO.Job to this progress dialog.
	*/
	public native void setJob(CopyJob job);
	/**	
		 Assign a TDEIO.Job to this progress dialog.
			@param job the job to assign
		   		@short    Assign a TDEIO.Job to this progress dialog.
	*/
	public native void setJob(DeleteJob job);
	public native void setStopOnClose(boolean stopOnClose);
	public native boolean stopOnClose();
	/**	
		 This controls whether the dialog should be deleted or only cleaned when
		 the TDEIO.Job is finished (or canceled).
			 If your dialog is an embedded widget and not a separate window, you should
		 setOnlyClean(true) in the constructor of your custom dialog.
			@param onlyClean If true the dialog will only call method slotClean.
		 If false the dialog will be deleted.
				@short    This controls whether the dialog should be deleted or only cleaned when  the TDEIO.Job is finished (or canceled).
		@see #onlyClean
	*/
	public native void setOnlyClean(boolean onlyClean);
	/**	
		 Checks whether the dialog should be deleted or cleaned.
				@return true if the dialog only calls slotClean, false if it will be
         deleted

		@short    Checks whether the dialog should be deleted or cleaned.
		@see #setOnlyClean
	*/
	public native boolean onlyClean();
	/**	
		 Call when the operation finished.
				@short    Call when the operation finished.
	*/
	public native void finished();
	/**	
		 This method should be called for correct cancellation of IO operation
		 Connect this to the progress widgets buttons etc.
		   		@short    This method should be called for correct cancellation of IO operation  Connect this to the progress widgets buttons etc.
	*/
	public native void slotStop();
	/**	
		 This method is called when the widget should be cleaned (after job is finished).
		 redefine this for custom behavior.
		   		@short    This method is called when the widget should be cleaned (after job is finished).
	*/
	public native void slotClean();
	/**	
		 Called to set the total size.
			@param job the TDEIO.Job
			@param size the total size in bytes
		   		@short    Called to set the total size.
	*/
	public native void slotTotalSize(Job job, long size);
	/**	
		 Called to set the total number of files.
			@param job the TDEIO.Job
			@param files the number of files
		   		@short    Called to set the total number of files.
	*/
	public native void slotTotalFiles(Job job, long files);
	/**	
		 Called to set the total number of directories.
			@param job the TDEIO.Job
			@param dirs the number of directories
		   		@short    Called to set the total number of directories.
	*/
	public native void slotTotalDirs(Job job, long dirs);
	/**	
		 Called to set the processed size.
			@param job the TDEIO.Job
			@param bytes the processed size in bytes
		   		@short    Called to set the processed size.
	*/
	public native void slotProcessedSize(Job job, long bytes);
	/**	
		 Called to set the number of processed files.
			@param job the TDEIO.Job
			@param files the number of files
		   		@short    Called to set the number of processed files.
	*/
	public native void slotProcessedFiles(Job job, long files);
	/**	
		 Called to set the number of processed directories.
			@param job the TDEIO.Job
			@param dirs the number of directories
		   		@short    Called to set the number of processed directories.
	*/
	public native void slotProcessedDirs(Job job, long dirs);
	/**	
		 Called to set the speed.
			@param job the TDEIO.Job
			@param speed the speed in bytes/second
		   		@short    Called to set the speed.
	*/
	public native void slotSpeed(Job job, long speed);
	/**	
		 Called to set the percentage.
			@param job the TDEIO.Job
			@param percent the percentage
		   		@short    Called to set the percentage.
	*/
	public native void slotPercent(Job job, long percent);
	/**	
		 Called when the job is copying.
			@param job the TDEIO.Job
			@param src the source of the operation
			@param dest the destination of the operation
		   		@short    Called when the job is copying.
	*/
	public native void slotCopying(Job job, KURL src, KURL dest);
	/**	
		 Called when the job is moving.
			@param job the TDEIO.Job
			@param src the source of the operation
			@param dest the destination of the operation
		   		@short    Called when the job is moving.
	*/
	public native void slotMoving(Job job, KURL src, KURL dest);
	/**	
		 Called when the job is deleting.
			@param job the TDEIO.Job
			@param url the URL to delete
		   		@short    Called when the job is deleting.
	*/
	public native void slotDeleting(Job job, KURL url);
	/**	
		 Called when the job is creating a directory.
			@param job the TDEIO.Job
			@param dir the URL of the directory to create
		   		@short    Called when the job is creating a directory.
	*/
	public native void slotCreatingDir(Job job, KURL dir);
	/**	
		 Called when the job is resuming..
			@param job the TDEIO.Job
			@param from the position to resume from in bytes
		   		@short    Called when the job is resuming.
	*/
	public native void slotCanResume(Job job, long from);
	protected native void closeEvent(TQCloseEvent arg1);
	protected native void slotFinished(Job arg1);
}