summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KGlobalAccel.java
blob: fabb014bbc58edf60425f534dece7dcec8ba774e (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
//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 org.kde.qt.TQObject;

/**

 TDEGlobalAccel allows you to have global accelerators that are independent of
 the focused window. Unlike KAccel it does not matter which window is 
 currently active.
		@short Configurable global shortcut support.
		@see KAccel
		@see KAccelShortcutList
		@see KKeyChooser
		@see KKeyDialog

*/
public class TDEGlobalAccel extends TQObject  {
	protected TDEGlobalAccel(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**	
		 Creates a new TDEGlobalAccel object with the given pParent and
		 psName.
			@param pParent the parent of the TQObject
			@param psName the name of the TQObject
			 		@short    Creates a new TDEGlobalAccel object with the given pParent and  psName.
	*/
	public TDEGlobalAccel(TQObject pParent, String psName) {
		super((Class) null);
		newTDEGlobalAccel(pParent,psName);
	}
	private native void newTDEGlobalAccel(TQObject pParent, String psName);
	public TDEGlobalAccel(TQObject pParent) {
		super((Class) null);
		newTDEGlobalAccel(pParent);
	}
	private native void newTDEGlobalAccel(TQObject pParent);
	/**	
		 Checks whether the accelerators are enabled.
				@return true if the TDEGlobalAccel is enabled
	 
		@short    Checks whether the accelerators are enabled.
	*/
	public native boolean isEnabled();
	/**	
		 Create an accelerator action.
			 Usage:
		<pre>
		 insert( "Do Something", i18n("Do Something"),
		   i18n("This action allows you to do something really great with this program to "
		        "the currently open document."),
		   ALT+CTRL+Key_Q, KKey.QtWIN+CTRL+Key_Q, this, SLOT("slotDoSomething()") );
		</pre>
			@param sAction The internal name of the action.
			@param sLabel An i18n'ized short description of the action displayed when
		  using KKeyChooser to reconfigure the shortcuts.
			@param sWhatsThis An extended description of the action.
			@param cutDef3 The default 3 modifier scheme shortcut.
			@param cutDef4 The default 4 modifier scheme shortcut.
			@param pObjSlot Pointer to the slot object.
			@param psMethodSlot Pointer to the slot method.
			@param bConfigurable Allow the user to change this shortcut if set to 'true'.
			@param bEnabled The action will be activated by the shortcut if set to 'true'.
			 		@short    Create an accelerator action.
	*/
	public native KAccelAction insert(String sAction, String sLabel, String sWhatsThis, KShortcut cutDef3, KShortcut cutDef4, TQObject pObjSlot, String psMethodSlot, boolean bConfigurable, boolean bEnabled);
	public native KAccelAction insert(String sAction, String sLabel, String sWhatsThis, KShortcut cutDef3, KShortcut cutDef4, TQObject pObjSlot, String psMethodSlot, boolean bConfigurable);
	public native KAccelAction insert(String sAction, String sLabel, String sWhatsThis, KShortcut cutDef3, KShortcut cutDef4, TQObject pObjSlot, String psMethodSlot);
	/**	
		 Removes the accelerator action identified by the name.
		 Remember to also call updateConnections().
			@param sAction the name of the action to remove
				@short    Removes the accelerator action identified by the name.
	*/
	public native boolean remove(String sAction);
	/**	
		 Use this to insert a label into the action list.  This will be
		 displayed when the user configures shortcuts.
			@param sName of the of the action to insert
			@param sLabel a user-readable (i18n!) name for the action
				@return the KAccelAction of the action
	 
		@short    Use this to insert a label into the action list.
	*/
	public native KAccelAction insert(String sName, String sLabel);
	/**	
		 Updates the connections of the accelerations after changing them. 
				@return true if successful, false otherwise
	 
		@short    Updates the connections of the accelerations after changing them.
	*/
	public native boolean updateConnections();
	/**	
		 Return the shortcut associated with the action named by <code>sAction.</code>
			@param sAction the name of the action
				@return the shortcut. If the action does not exist a null shortcut will be returned.
	 
		@short    Return the shortcut associated with the action named by <code>sAction.</code>
	*/
	public native KShortcut shortcut(String sAction);
	/**	
		 Set the shortcut to be associated with the action named by <code>sAction.</code>
			@param sAction the name of the action
			@param shortcut the shortcut for the action
				@return true if successful, false otherwise
	 
		@short    Set the shortcut to be associated with the action named by <code>sAction.</code>
	*/
	public native boolean setShortcut(String sAction, KShortcut shortcut);
	/**	
		 Set the slot to be called when the shortcut of the action named
		 by <code>sAction</code> is pressed.
			@param sAction the name of the action
			@param pObjSlot the receiver of the signal
			@param psMethodSlot the slot to receive the signal
				@return true if successful, false otherwise
	 
		@short    Set the slot to be called when the shortcut of the action named  by <code>sAction</code> is pressed.
	*/
	public native boolean setSlot(String sAction, TQObject pObjSlot, String psMethodSlot);
	/**	
		 Enables or disables action <code>sAction.</code>
				@short    Enables or disables action <code>sAction.</code>
	*/
	public native boolean setActionEnabled(String sAction, boolean bEnable);
	/**	
		 Return the label (i18n'ized short description) associated with the action named by <code>sAction.</code>
			@param sAction the name of the action
				@return the label

		@short    Return the label (i18n'ized short description) associated with the action named by <code>sAction.</code>
	*/
	public native String label(String sAction);
	/**	
		 Returns the configuration group that is used to save the accelerators.
				@return the configuration group

		@short    Returns the configuration group that is used to save the accelerators.
		@see KConfig
	*/
	public native String configGroup();
	/**	
		 Sets the configuration group that is used to save the accelerators.
			@param cg the configuration group
				@short    Sets the configuration group that is used to save the accelerators.
		@see KConfig
	*/
	public native void setConfigGroup(String cg);
	/**	
		 Read all shortcuts from <code>pConfig</code>, or (if <code>pConfig</code>
		 is zero) from the application's configuration file
		 TDEGlobal.config().
			@param pConfig the configuration file to read from, or 0 for the application
		                 configuration file
				@return true if successful, false otherwise
	 
		@short    Read all shortcuts from <code>pConfig</code>, or (if <code>pConfig</code>  is zero) from the application's configuration file  TDEGlobal.config().
	*/
	public native boolean readSettings(KConfigBase pConfig);
	public native boolean readSettings();
	/**	
		 Write the current shortcuts to <code>pConfig</code>,
		 or (if <code>pConfig</code> is zero) to the application's
		 configuration file.
			@param pConfig the configuration file to read from, or 0 for the application
		                 configuration file
				@return true if successful, false otherwise

		@short    Write the current shortcuts to <code>pConfig</code>,  or (if <code>pConfig</code> is zero) to the application's  configuration file.
	*/
	public native boolean writeSettings(KConfigBase pConfig);
	public native boolean writeSettings();
	/**	
		 Write the current shortcuts to <code>pConfig</code>,
		 or (if <code>pConfig</code> is zero) to the application's
		 configuration file.  Alternatively, if bGlobal is true, then write
		 to kdeglobals.
			@param pConfig the configuration file to read from, or 0 for the application
		                 configuration file
			@param bGlobal if true write the configuration to the kde global settings
				@return true if successful, false otherwise
	 
		@short    Write the current shortcuts to <code>pConfig</code>,  or (if <code>pConfig</code> is zero) to the application's  configuration file.
	*/
	public native boolean writeSettings(KConfigBase pConfig, boolean bGlobal);
	/**	
			         		@short
	*/
	public native void disableBlocking(boolean disable);
	/**	
			 KAccelActions.useFourModifierKeys().
			 		@short
	*/
	public static native boolean useFourModifierKeys();
	/**	
			         		@short
	*/
	public static native void blockShortcuts(boolean block);
	/** 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();
}