summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/PartManager.java
blob: 488f4cb8b46e704a85a03044be15bc216678c6d0 (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
//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.QEvent;
import org.kde.qt.QWidget;
import org.kde.qt.QObject;

/**

 The part manager is an object which knows about a collection of parts
 (even nested ones) and handles activation/deactivation.
 Applications that want to embed parts without merging GUIs
 only use a KParts.PartManager. Those who want to merge GUIs use a
 KParts.MainWindow for example, in addition to a part manager.
 Parts know about the part manager to add nested parts to it.
 See also KParts.Part.manager() and KParts.Part.setManager().
  See {@link PartManagerSignals} for signals emitted by PartManager
		@short    The part manager is an object which knows about a collection of parts  (even nested ones) and handles activation/deactivation.

*/
public class PartManager extends QObject  {
	protected PartManager(Class dummy){super((Class) null);}
	public native QMetaObject metaObject();
	public native String className();
	/**	
		 Constructs a part manager.
			@param parent The toplevel widget (window / dialog) the
		               partmanager should monitor for activation/selection
		               events
			@param name The object's name, if any.
		   		@short    Constructs a part manager.
	*/
	public PartManager(QWidget parent, String name) {
		super((Class) null);
		newPartManager(parent,name);
	}
	private native void newPartManager(QWidget parent, String name);
	public PartManager(QWidget parent) {
		super((Class) null);
		newPartManager(parent);
	}
	private native void newPartManager(QWidget parent);
	/**	
		 Constructs a part manager.
			@param topLevel The toplevel widget (window / dialog ) the
		                 partmanager should monitor for activation/selection
		                 events
			@param parent The parent QObject.
			@param name The object's name, if any.
		   		@short    Constructs a part manager.
	*/
	public PartManager(QWidget topLevel, QObject parent, String name) {
		super((Class) null);
		newPartManager(topLevel,parent,name);
	}
	private native void newPartManager(QWidget topLevel, QObject parent, String name);
	public PartManager(QWidget topLevel, QObject parent) {
		super((Class) null);
		newPartManager(topLevel,parent);
	}
	private native void newPartManager(QWidget topLevel, QObject parent);
	/**	
		 Sets the selection policy of the partmanager.
		   		@short    Sets the selection policy of the partmanager.
	*/
	// void setSelectionPolicy(KParts::PartManager::SelectionPolicy arg1); >>>> NOT CONVERTED
	/**	
		 Returns the current selection policy.
		   		@short    Returns the current selection policy.
	*/
	// KParts::PartManager::SelectionPolicy selectionPolicy(); >>>> NOT CONVERTED
	/**	
		 Specifies whether the partmanager should handle/allow nested parts
		 or not.
			  This is a property the shell has to set/specify. Per
		 default we assume that the shell cannot handle nested
		 parts. However in case of a KOffice shell for example we allow
		 nested parts.  A Part is nested (a child part) if its parent
		 object inherits KParts.Part.  If a child part is activated and
		 nested parts are not allowed/handled, then the top parent part in
		 the tree is activated.
		   		@short    Specifies whether the partmanager should handle/allow nested parts  or not.
	*/
	public native void setAllowNestedParts(boolean allow);
	/**	
				@short   
		@see #setAllowNestedParts
	*/
	public native boolean allowNestedParts();
	/**	
		 Specifies whether the partmanager should ignore mouse click events for
		 scrollbars or not. If the partmanager ignores them, then clicking on the
		 scrollbars of a non-active/non-selected part will not change the selection
		 or activation state.
			 The default value is false (read: scrollbars are NOT ignored).
		   		@short    Specifies whether the partmanager should ignore mouse click events for  scrollbars or not.
	*/
	public native void setIgnoreScrollBars(boolean ignore);
	/**	
				@short   
		@see #setIgnoreScrollBars
	*/
	public native boolean ignoreScrollBars();
	/**	
		 Specifies which mouse buttons the partmanager should react upon.
		 By default it reacts on all mouse buttons (LMB/MMB/RMB).
			@param buttonMask a combination of Qt.ButtonState values e.g. Qt.LeftButton | Qt.MidButton
		   		@short    Specifies which mouse buttons the partmanager should react upon.
	*/
	public native void setActivationButtonMask(short buttonMask);
	/**	
				@short   
		@see #setActivationButtonMask
	*/
	public native short activationButtonMask();
	/**	
			   		@short
	*/
	public native boolean eventFilter(QObject arg1, QEvent ev);
	/**	
		 Adds a part to the manager.
			 Sets it to the active part automatically if <code>setActive</code> is true (default ).
		 Behavior fix in KDE3.4: the part's widget is shown only if <code>setActive</code> is true,
		 it used to be shown in all cases before.
		   		@short    Adds a part to the manager.
	*/
	public native void addPart(Part part, boolean setActive);
	public native void addPart(Part part);
	/**	
		 Removes a part from the manager (this does not delete the object) .
			 Sets the active part to 0 if <code>part</code> is the activePart() .
		   		@short    Removes a part from the manager (this does not delete the object) .
	*/
	public native void removePart(Part part);
	/**	
		 Replaces <code>oldPart</code> with <code>newPart</code>, and sets <code>newPart</code> as active if
		 <code>setActive</code> is true.
		 This is an optimised version of removePart + addPart
		   		@short    Replaces <code>oldPart</code> with <code>newPart</code>, and sets <code>newPart</code> as active if  <code>setActive</code> is true.
	*/
	public native void replacePart(Part oldPart, Part newPart, boolean setActive);
	public native void replacePart(Part oldPart, Part newPart);
	/**	
		 Sets the active part.
			 The active part receives activation events.
			 <code>widget</code> can be used to specify which widget was responsible for the activation.
		 This is important if you have multiple views for a document/part, like in KOffice.
		   		@short    Sets the active part.
	*/
	public native void setActivePart(Part part, QWidget widget);
	public native void setActivePart(Part part);
	/**	
		 Returns the active part.
				@short    Returns the active part.
	*/
	public native Part activePart();
	/**	
		 Returns the active widget of the current active part (see activePart()).
		   		@short    Returns the active widget of the current active part (see activePart()).
	*/
	public native QWidget activeWidget();
	/**	
		 Sets the selected part.
			 The selected part receives selection events.
			 <code>widget</code> can be used to specify which widget was responsible for the selection.
		 This is important if you have multiple views for a document/part, like in KOffice.
		   		@short    Sets the selected part.
	*/
	public native void setSelectedPart(Part part, QWidget widget);
	public native void setSelectedPart(Part part);
	/**	
		 Returns the current selected part.
		   		@short    Returns the current selected part.
	*/
	public native Part selectedPart();
	/**	
		 Returns the selected widget of the current selected part (see selectedPart()).
		   		@short    Returns the selected widget of the current selected part (see selectedPart()).
	*/
	public native QWidget selectedWidget();
	/**	
		 Returns the list of parts being managed by the partmanager.
		   		@short    Returns the list of parts being managed by the partmanager.
	*/
	// const QPtrList<KParts::Part>* parts(); >>>> NOT CONVERTED
	/**	
		 Adds the <code>topLevel</code> widget to the list of managed toplevel widgets.
		 Usually a PartManager only listens for events (for activation/selection)
		 for one toplevel widget (and its children), the one specified in the
		 constructor. Sometimes however (like for example when using the KDE dockwidget
		 library), it is necessary to extend this.
		   		@short    Adds the <code>topLevel</code> widget to the list of managed toplevel widgets.
	*/
	public native void addManagedTopLevelWidget(QWidget topLevel);
	/**	
		 Removes the <code>topLevel</code> widget from the list of managed toplevel widgets.
				@short    Removes the <code>topLevel</code> widget from the list of managed toplevel widgets.
		@see #addManagedTopLevelWidget
	*/
	public native void removeManagedTopLevelWidget(QWidget topLevel);
	/**	
				@return the reason for the last activePartChanged signal emitted.

		@short   
		@see Reason
	*/
	public native int reason();
	/**	
		 Changes the active instance when the active part changes.
		 The active instance is used by KBugReport and KAboutDialog.
		 Override if you really need to - usually you don't need to.
		   		@short    Changes the active instance when the active part changes.
	*/
	protected native void setActiveInstance(KInstanceInterface instance);
	/**	
		 Removes a part when it is destroyed.
				@short    Removes a part when it is destroyed.
	*/
	protected native void slotObjectDestroyed();
	/**	
			   		@short
	*/
	protected native void slotWidgetDestroyed();
	/**	
			   		@short
	*/
	protected native void slotManagedTopLevelWidgetDestroyed();
}