summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KToolBarButton.java
blob: 34117b3b6b99a905cd3940149224ef4836b7e60f (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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.QMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.QObject;
import org.kde.qt.QPopupMenu;
import org.kde.qt.QPixmap;
import org.kde.qt.QSize;
import org.kde.qt.QPainter;
import org.kde.qt.QMouseEvent;
import org.kde.qt.QEvent;
import org.kde.qt.QIconSet;
import org.kde.qt.QWidget;
import org.kde.qt.QPalette;
import org.kde.qt.QToolButton;

/**

 A toolbar button. This is used internally by KToolBar, use the
 KToolBar methods instead.
  See {@link KToolBarButtonSignals} for signals emitted by KToolBarButton
		@short    A toolbar button.

*/
public class KToolBarButton extends QToolButton  {
	protected KToolBarButton(Class dummy){super((Class) null);}
	public native QMetaObject metaObject();
	public native String className();
	/**	
		 Construct a button with an icon loaded by the button itself.
		 This will trust the button to load the correct icon with the
		 correct size.
			@param icon Name of icon to load (may be absolute or relative)
			@param id Id of this button
			@param parent This button's parent
			@param name This button's internal name
			@param txt This button's text (in a tooltip or otherwise)
			@param _instance the instance to use for this button
		   		@short    Construct a button with an icon loaded by the button itself.
	*/
	public KToolBarButton(String icon, int id, QWidget parent, String name, String txt, KInstanceInterface _instance) {
		super((Class) null);
		newKToolBarButton(icon,id,parent,name,txt,_instance);
	}
	private native void newKToolBarButton(String icon, int id, QWidget parent, String name, String txt, KInstanceInterface _instance);
	public KToolBarButton(String icon, int id, QWidget parent, String name, String txt) {
		super((Class) null);
		newKToolBarButton(icon,id,parent,name,txt);
	}
	private native void newKToolBarButton(String icon, int id, QWidget parent, String name, String txt);
	public KToolBarButton(String icon, int id, QWidget parent, String name) {
		super((Class) null);
		newKToolBarButton(icon,id,parent,name);
	}
	private native void newKToolBarButton(String icon, int id, QWidget parent, String name);
	public KToolBarButton(String icon, int id, QWidget parent) {
		super((Class) null);
		newKToolBarButton(icon,id,parent);
	}
	private native void newKToolBarButton(String icon, int id, QWidget parent);
	/**	
		 Construct a button with an existing pixmap.  It is not
		 recommended that you use this as the internal icon loading code
		 will almost always get it "right".
			@param pixmap Name of icon to load (may be absolute or relative)
			@param id Id of this button
			@param parent This button's parent
			@param name This button's internal name
			@param txt This button's text (in a tooltip or otherwise)
		   		@short    Construct a button with an existing pixmap.
	*/
	public KToolBarButton(QPixmap pixmap, int id, QWidget parent, String name, String txt) {
		super((Class) null);
		newKToolBarButton(pixmap,id,parent,name,txt);
	}
	private native void newKToolBarButton(QPixmap pixmap, int id, QWidget parent, String name, String txt);
	public KToolBarButton(QPixmap pixmap, int id, QWidget parent, String name) {
		super((Class) null);
		newKToolBarButton(pixmap,id,parent,name);
	}
	private native void newKToolBarButton(QPixmap pixmap, int id, QWidget parent, String name);
	public KToolBarButton(QPixmap pixmap, int id, QWidget parent) {
		super((Class) null);
		newKToolBarButton(pixmap,id,parent);
	}
	private native void newKToolBarButton(QPixmap pixmap, int id, QWidget parent);
	/**	
		 Construct a separator button
			@param parent This button's parent
			@param name This button's internal name
		   		@short    Construct a separator button
	*/
	public KToolBarButton(QWidget parent, String name) {
		super((Class) null);
		newKToolBarButton(parent,name);
	}
	private native void newKToolBarButton(QWidget parent, String name);
	public KToolBarButton(QWidget parent) {
		super((Class) null);
		newKToolBarButton(parent);
	}
	private native void newKToolBarButton(QWidget parent);
	public KToolBarButton() {
		super((Class) null);
		newKToolBarButton();
	}
	private native void newKToolBarButton();
	/**	
		 Set the text for this button.  The text will be either used as a
		 tooltip (IconOnly) or will be along side the icon
			@param text The button (or tooltip) text
		   		@short    Set the text for this button.
	*/
	public native void setText(String text);
	/**	
		 Set the icon for this button. The icon will be loaded internally
		 with the correct size. This function is preferred over setIconSet
			@param icon The name of the icon
		   		@short    Set the icon for this button.
	*/
	public native void setIcon(String icon);
	public native void setIcon(QPixmap pixmap);
	/**	
		 Set the pixmaps for this toolbar button from a QIconSet.
		 If you call this you don't need to call any of the other methods
		 that set icons or pixmaps.
			@param iconset The iconset to use
		   		@short    Set the pixmaps for this toolbar button from a QIconSet.
	*/
	public native void setIconSet(QIconSet iconset);
	/**	
		 Turn this button on or off
			@param flag true or false
		   		@short    Turn this button on or off
	*/
	public native void on(boolean flag);
	public native void on();
	/**	
		 Toggle this button
		   		@short    Toggle this button
	*/
	public native void toggle();
	/**	
		 Turn this button into a toggle button or disable the toggle
		 aspects of it.  This does not toggle the button itself.
		 Use toggle() for that.
			@param toggle true or false
		   		@short    Turn this button into a toggle button or disable the toggle  aspects of it.
	*/
	public native void setToggle(boolean toggle);
	public native void setToggle();
	/**	
		 Return a pointer to this button's popup menu (if it exists)
		   		@short    Return a pointer to this button's popup menu (if it exists)
	*/
	public native QPopupMenu popup();
	/**	
		 Returns the button's id.
				@short    Returns the button's id.
	*/
	public native int id();
	/**	
		 Give this button a popup menu.  There will not be a delay when
		 you press the button.  Use setDelayedPopup if you want that
		 behavior.
			@param p The new popup menu
			@param unused Has no effect - ignore it.
		   		@short    Give this button a popup menu.
	*/
	public native void setPopup(QPopupMenu p, boolean unused);
	public native void setPopup(QPopupMenu p);
	/**	
		 Gives this button a delayed popup menu.
			 This function allows you to add a delayed popup menu to the button.
		 The popup menu is then only displayed when the button is pressed and
		 held down for about half a second.
			@param p the new popup menu
			@param unused Has no effect - ignore it.
		   		@short    Gives this button a delayed popup menu.
	*/
	public native void setDelayedPopup(QPopupMenu p, boolean unused);
	public native void setDelayedPopup(QPopupMenu p);
	/**	
		 Turn this button into a radio button
			@param f true or false
		   		@short    Turn this button into a radio button
	*/
	public native void setRadio(boolean f);
	public native void setRadio();
	/**	
		 Toolbar buttons naturally will assume the global styles
		 concerning icons, icons sizes, etc.  You can use this function to
		 explicitly turn this off, if you like.
			@param no_style Will disable styles if true
		   		@short    Toolbar buttons naturally will assume the global styles  concerning icons, icons sizes, etc.
	*/
	public native void setNoStyle(boolean no_style);
	public native void setNoStyle();
	/**	
		 This slot should be called whenever the toolbar mode has
		 potentially changed.  This includes such events as text changing,
		 orientation changing, etc.
		   		@short    This slot should be called whenever the toolbar mode has  potentially changed.
	*/
	public native void modeChange();
	public native void setTextLabel(String arg1, boolean tipToo);
	public native boolean event(QEvent e);
	protected native void paletteChange(QPalette arg1);
	protected native void leaveEvent(QEvent e);
	protected native void enterEvent(QEvent e);
	protected native void drawButton(QPainter p);
	public native boolean eventFilter(QObject o, QEvent e);
	protected native void mousePressEvent(QMouseEvent arg1);
	protected native void mouseReleaseEvent(QMouseEvent arg1);
	protected native void showMenu();
	public native QSize sizeHint();
	public native QSize minimumSizeHint();
	public native QSize minimumSize();
	protected native boolean isRaised();
	protected native boolean isActive();
	protected native int iconTextMode();
	protected native void slotClicked();
	protected native void slotPressed();
	protected native void slotReleased();
	protected native void slotToggled();
	protected native void slotDelayTimeout();
	/** 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();
}