summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KActionCollection.java
blob: d3d5bdd210dc2d72299344c38d399356b4366866 (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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
//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.TQObject;
import java.util.ArrayList;
import org.kde.qt.TQWidget;
import org.kde.qt.TQObject;

/**

 A managed set of KAction objects.
 If you set the tooltips on KActions and want the tooltip to show in statusbar
 (recommended) then you will need to connect a couple of the actionclass signals
 to the toolbar.
 The easiest way of doing this is in your KMainWindow subclass, where you create
 a statusbar, do:
 <pre>
 actionCollection().setHighlightingEnabled(true);  
 connect(actionCollection(), SIGNAL("actionStatusText( String )"),
           statusBar(), SLOT("message( String )") );
 connect(actionCollection(), SIGNAL("clearStatusText()"),
           statusBar(), SLOT("clear()") );
 </pre>
  See {@link KActionCollectionSignals} for signals emitted by KActionCollection
		@short    A managed set of KAction objects.

*/
public class KActionCollection extends TQObject  {
	protected KActionCollection(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	public KActionCollection(TQWidget parent, String name, KInstanceInterface instance) {
		super((Class) null);
		newKActionCollection(parent,name,instance);
	}
	private native void newKActionCollection(TQWidget parent, String name, KInstanceInterface instance);
	public KActionCollection(TQWidget parent, String name) {
		super((Class) null);
		newKActionCollection(parent,name);
	}
	private native void newKActionCollection(TQWidget parent, String name);
	public KActionCollection(TQWidget parent) {
		super((Class) null);
		newKActionCollection(parent);
	}
	private native void newKActionCollection(TQWidget parent);
	/**	
		 Use this constructor if you want the collection's actions to restrict
		 their accelerator keys to <code>watch</code> rather than the <code>parent.</code>  If
		 you don't retquire shortcuts, you can pass a null to the <code>watch</code> parameter.
		   		@short    Use this constructor if you want the collection's actions to restrict  their accelerator keys to <code>watch</code> rather than the <code>parent.</code>
	*/
	public KActionCollection(TQWidget watch, TQObject parent, String name, KInstanceInterface instance) {
		super((Class) null);
		newKActionCollection(watch,parent,name,instance);
	}
	private native void newKActionCollection(TQWidget watch, TQObject parent, String name, KInstanceInterface instance);
	public KActionCollection(TQWidget watch, TQObject parent, String name) {
		super((Class) null);
		newKActionCollection(watch,parent,name);
	}
	private native void newKActionCollection(TQWidget watch, TQObject parent, String name);
	public KActionCollection(TQWidget watch, TQObject parent) {
		super((Class) null);
		newKActionCollection(watch,parent);
	}
	private native void newKActionCollection(TQWidget watch, TQObject parent);
	public KActionCollection(KActionCollection copy) {
		super((Class) null);
		newKActionCollection(copy);
	}
	private native void newKActionCollection(KActionCollection copy);
	/**	
		 This sets the widget to which the keyboard shortcuts should be attached.
		 You only need to call this if a null pointer was passed in the constructor.
		   		@short    This sets the widget to which the keyboard shortcuts should be attached.
	*/
	public native void setWidget(TQWidget widget);
	/**	
		 This indicates whether new actions which are created in this collection
		 should have their keyboard shortcuts automatically connected on
		 construction.  Set to 'false' if you will be loading XML-based settings.
		 This is automatically done by KParts.  The default is 'true'.
				@short    This indicates whether new actions which are created in this collection  should have their keyboard shortcuts automatically connected on  construction.
		@see #isAutoConnectShortcuts
	*/
	public native void setAutoConnectShortcuts(boolean arg1);
	/**	
		 This indicates whether new actions which are created in this collection
		 have their keyboard shortcuts automatically connected on
		 construction.
				@short    This indicates whether new actions which are created in this collection  have their keyboard shortcuts automatically connected on  construction.
		@see #setAutoConnectShortcuts
	*/
	public native boolean isAutoConnectShortcuts();
	/**	
		 Doc/View model.  This lets you add the action collection of a document
		 to a view's action collection.
		   		@short    Doc/View model.
	*/
	public native boolean addDocCollection(KActionCollection pDoc);
	/**	 Returns the KAccel object of the most recently set widget. 		@short   Returns the KAccel object of the most recently set widget.
	*/
	public native KAccel kaccel();
	/**	 @internal, for KAction.kaccelCurrent() 		@short   @internal, for KAction.kaccelCurrent()
	*/
	public native KAccel builderKAccel();
	/**	 Returns the number of actions in the collection 		@short   Returns the number of actions in the collection
	*/
	public native int count();
	public native boolean isEmpty();
	/**	
		 Return the KAction at position "index" in the action collection.
				@short    Return the KAction  at position "index" in the action collection.
		@see #count
	*/
	public native KAction action(int index);
	/**	
		 Find an action (optionally, of a given subclass of KAction) in the action collection.
			@param name Name of the KAction.
			@param classname Name of the KAction subclass.
				@return A pointer to the first KAction in the collection which matches the parameters or
 null if nothing matches.
   
		@short    Find an action (optionally, of a given subclass of KAction) in the action collection.
	*/
	public native KAction action(String name, String classname);
	public native KAction action(String name);
	/**	 Returns a list of all the groups of all the KActions in this action collection.
				@short   Returns a list of all the groups of all the KActions in this action collection.
		@see KAction#group
		@see KAction#setGroup
	*/
	public native ArrayList groups();
	/**	
		 Returns the list of actions in a particular group managed by this action collection.
			@param group The name of the group.
		   		@short    Returns the list of actions in a particular group managed by this action collection.
	*/
	// KActionPtrList actions(const TQString& arg1); >>>> NOT CONVERTED
	/**	 Returns the list of actions managed by this action collection. 		@short   Returns the list of actions managed by this action collection.
	*/
	// KActionPtrList actions(); >>>> NOT CONVERTED
	/**	
		 Used for reading shortcut configuration from a non-XML rc file.
		   		@short    Used for reading shortcut configuration from a non-XML rc file.
	*/
	public native boolean readShortcutSettings(String sConfigGroup, KConfigBase pConfig);
	public native boolean readShortcutSettings(String sConfigGroup);
	public native boolean readShortcutSettings();
	/**	
		 Used for writing shortcut configuration to a non-XML rc file.
		   		@short    Used for writing shortcut configuration to a non-XML rc file.
	*/
	public native boolean writeShortcutSettings(String sConfigGroup, KConfigBase pConfig);
	public native boolean writeShortcutSettings(String sConfigGroup);
	public native boolean writeShortcutSettings();
	public native void setInstance(KInstanceInterface instance);
	/**	 The instance with which this class is associated. 		@short   The instance with which this class is associated.
	*/
	public native KInstanceInterface instance();
	/**	
		 Enable highlighting notification for specific KActions.
		 This is false by default, so, by default, the highlighting
		 signals will not be emitted.
				@short    Enable highlighting notification for specific KActions.
		@see #connectHighlight
		@see #disconnectHighlight
		@see #actionHighlighted
		@see #actionHighlighted
		@see #highlightingEnabled
	*/
	public native void setHighlightingEnabled(boolean enable);
	/**	
		 Return whether highlighting notifications are enabled.
				@short    Return whether highlighting notifications are enabled.
		@see #connectHighlight
		@see #disconnectHighlight
		@see #actionHighlighted
		@see #setHighlightingEnabled
		@see #actionHighlighted
	*/
	public native boolean highlightingEnabled();
	/**	
		 Call this function if you want to receive a signal whenever a KAction is highlighted in a menu or a toolbar.
		 This is only needed if you do not add this action to this container.
		 You will generally not need to call this function.
			@param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar)
			@param action The action you are interested in
				@short    Call this function if you want to receive a signal whenever a KAction is highlighted in a menu or a toolbar.
		@see #disconnectHighlight
		@see #actionHighlighted
		@see #setHighlightingEnabled
		@see #highlightingEnabled
		@see #actionHighlighted
	*/
	public native void connectHighlight(TQWidget container, KAction action);
	/**	
		 Disconnect highlight notifications for a particular pair of contianer and action.
		 This is only needed if you do not add this action to this container.
		 You will generally not need to call this function.
			@param container A container in which the KAction is plugged (must inherit TQPopupMenu or KToolBar)
			@param action The action you are interested in
				@short    Disconnect highlight notifications for a particular pair of contianer and action.
		@see #connectHighlight
		@see #actionHighlighted
		@see #setHighlightingEnabled
		@see #highlightingEnabled
		@see #actionHighlighted
	*/
	public native void disconnectHighlight(TQWidget container, KAction action);
	/**	
		 The parent KXMLGUIClient, return null if not available.
		   		@short    The parent KXMLGUIClient, return 0L if not available.
	*/
	public native KXMLGUIClientInterface parentGUIClient();
	public KActionCollection(TQObject parent, String name, KInstanceInterface instance) {
		super((Class) null);
		newKActionCollection(parent,name,instance);
	}
	private native void newKActionCollection(TQObject parent, String name, KInstanceInterface instance);
	public KActionCollection(TQObject parent, String name) {
		super((Class) null);
		newKActionCollection(parent,name);
	}
	private native void newKActionCollection(TQObject parent, String name);
	public KActionCollection(TQObject parent) {
		super((Class) null);
		newKActionCollection(parent);
	}
	private native void newKActionCollection(TQObject parent);
	/**	
		 Add an action to the collection.
		 Generally you don't have to call this. The action inserts itself automatically
		 into its parent collection. This can be useful however for a short-lived
		 collection (e.g. for a popupmenu, where the signals from the collection are needed too).
		 (don't forget that in the simple case, a list of actions should be a simple KActionPtrList).
		 If you manually insert actions into a 2nd collection, don't forget to take them out
		 again before destroying the collection.
			@param action The KAction to add.
		   		@short    Add an action to the collection.
	*/
	public native void insert(KAction action);
	/**	
		 Removes an action from the collection and deletes it.
		 Since the KAction destructor removes the action from the collection, you generally
		 don't have to call this.
			@param action The KAction to remove.
		   		@short    Removes an action from the collection and deletes it.
	*/
	public native void remove(KAction action);
	/**	
		 Removes an action from the collection.
		 Since the KAction destructor removes the action from the collection, you generally
		 don't have to call this.
			@param action the KAction to remove.
		   		@return NULL if not found else returns action.

		@short    Removes an action from the collection.
	*/
	public native KAction take(KAction action);
	public native KActionCollection op_plus(KActionCollection arg1);
	public native KActionCollection op_plus_assign(KActionCollection arg1);
	/**	
		 Clears the entire actionCollection, deleting all actions.
				@short    Clears the entire actionCollection, deleting all actions.
		@see #remove
	*/
	public native void clear();
	/** 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();
}