summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KAnimWidget.java
blob: 937d8cd691da8408795cb512792c248a547c9e12 (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
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.TQHideEvent;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQPainter;
import org.kde.qt.TQMouseEvent;
import org.kde.qt.TQShowEvent;
import org.kde.qt.TQEvent;
import org.kde.qt.TQWidget;
import org.kde.qt.TQFrame;

/**

 This is a widget used to display animation using multiple
 individual pixmaps.  This widget allows you to deal with variable
 size icons (e.g., ones that will change based on a global setting)
 as it loads the icons internally.  All you need to do is pass along
 a list of icon names and their size and everything else is taken
 care of.
 This widget also emits a 'clicked()' signal when it received a
 mouse press event.
 A tquick example:
 <pre>
 KAnimWidget anim = new KAnimWidget("kde", 0, this);
 anim.start();
 </pre>
 That example will search for the pixmaps "one.png", "two.png", and
 "three.png" in the share/icons/small/ directories as well as the
 app's pics directory.
 See {@link KAnimWidgetSignals} for signals emitted by KAnimWidget
		@author Kurt Granroth <granroth@kde.org>
 
		@short Standard "About KDE" dialog box.

*/
public class KAnimWidget extends TQFrame  {
	protected KAnimWidget(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**	
		 This is the most common constructor.  Pass along the name of the
		 animated icons to use (e.g., "kde") for the animation and an
		 optional size to load and you're set.  If you omit the size, the
		 default size will be used.
			@param icons The icons name (e.g., "kde") to use for the animation
			@param size The size to load
		               You don't have to set it if the parent is a
		               TDEToolBar; in this case it will use the toolbar's
		               size.
			@param parent The standard parent
			@param name The standard internal name
		   		@short    This is the most common constructor.
	*/
	public KAnimWidget(String icons, int size, TQWidget parent, String name) {
		super((Class) null);
		newKAnimWidget(icons,size,parent,name);
	}
	private native void newKAnimWidget(String icons, int size, TQWidget parent, String name);
	public KAnimWidget(String icons, int size, TQWidget parent) {
		super((Class) null);
		newKAnimWidget(icons,size,parent);
	}
	private native void newKAnimWidget(String icons, int size, TQWidget parent);
	public KAnimWidget(String icons, int size) {
		super((Class) null);
		newKAnimWidget(icons,size);
	}
	private native void newKAnimWidget(String icons, int size);
	public KAnimWidget(String icons) {
		super((Class) null);
		newKAnimWidget(icons);
	}
	private native void newKAnimWidget(String icons);
	/**	
		 Sets the size of the icons.
			@param size The size of the icons
		   		@short    Sets the size of the icons.
	*/
	public native void setSize(int size);
	/**	
		 Returns the current size.
				@short    Returns the current size.
	*/
	public native int iconSize();
	/**	
		 Returns the current icons
		 since 3.4
		  		@short    Returns the current icons  since 3.
	*/
	public native String icons();
	/**	
		 Sets the name of the animated icons to load.  This will use the
		 TDEIconLoader.loadAnimated method for the actual loading.
			@param icons The name of the icons to use for the animation
		   		@short    Sets the name of the animated icons to load.
	*/
	public native void setIcons(String icons);
	/**	
		 Starts the animation from frame 1
		   		@short    Starts the animation from frame 1
	*/
	public native void start();
	/**	
		 Stops the animation.  This will also reset the widget to frame 1.
		   		@short    Stops the animation.
	*/
	public native void stop();
	protected native void drawContents(TQPainter p);
	protected native void leaveEvent(TQEvent e);
	protected native void enterEvent(TQEvent e);
	protected native void hideEvent(TQHideEvent e);
	public native void showEvent(TQShowEvent e);
	protected native void mousePressEvent(TQMouseEvent e);
	protected native void mouseReleaseEvent(TQMouseEvent e);
	protected native void slotTimerUpdate();
	protected native void updateIcons();
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}