org.kde.koala

Class PartManager

public class PartManager extends 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 PartManagerSignals for signals emitted by PartManager

UNKNOWN: The part manager is an object which knows about a collection of parts (even nested ones) and handles activation/deactivation.

Constructor Summary
protected PartManager(Class dummy)
PartManager(QWidget parent, String name)
Constructs a part manager.
PartManager(QWidget parent)
PartManager(QWidget topLevel, QObject parent, String name)
Constructs a part manager.
PartManager(QWidget topLevel, QObject parent)
Method Summary
shortactivationButtonMask()
PartactivePart()
Returns the active part.
QWidgetactiveWidget()
Returns the active widget of the current active part (see activePart()).
voidaddManagedTopLevelWidget(QWidget topLevel)
Adds the topLevel widget to the list of managed toplevel widgets.
voidaddPart(Part part, boolean setActive)
Adds a part to the manager.
voidaddPart(Part part)
booleanallowNestedParts()
StringclassName()
booleaneventFilter(QObject arg1, QEvent ev)
booleanignoreScrollBars()
QMetaObjectmetaObject()
intreason()
voidremoveManagedTopLevelWidget(QWidget topLevel)
Removes the topLevel widget from the list of managed toplevel widgets.
voidremovePart(Part part)
Removes a part from the manager (this does not delete the object) .
voidreplacePart(Part oldPart, Part newPart, boolean setActive)
Replaces oldPart with newPart, and sets newPart as active if setActive is true.
voidreplacePart(Part oldPart, Part newPart)
PartselectedPart()
Returns the current selected part.
QWidgetselectedWidget()
Returns the selected widget of the current selected part (see selectedPart()).
voidsetActivationButtonMask(short buttonMask)
Specifies which mouse buttons the partmanager should react upon.
protected voidsetActiveInstance(KInstanceInterface instance)
Changes the active instance when the active part changes.
voidsetActivePart(Part part, QWidget widget)
Sets the active part.
voidsetActivePart(Part part)
voidsetAllowNestedParts(boolean allow)
Specifies whether the partmanager should handle/allow nested parts or not.
voidsetIgnoreScrollBars(boolean ignore)
Specifies whether the partmanager should ignore mouse click events for scrollbars or not.
voidsetSelectedPart(Part part, QWidget widget)
Sets the selected part.
voidsetSelectedPart(Part part)
protected voidslotManagedTopLevelWidgetDestroyed()
protected voidslotObjectDestroyed()
Removes a part when it is destroyed.
protected voidslotWidgetDestroyed()

Constructor Detail

PartManager

protected PartManager(Class dummy)

PartManager

public PartManager(QWidget parent, String name)
Constructs a part manager.

Parameters: parent The toplevel widget (window / dialog) the partmanager should monitor for activation/selection events name The object's name, if any.

UNKNOWN: Constructs a part manager.

PartManager

public PartManager(QWidget parent)

PartManager

public PartManager(QWidget topLevel, QObject parent, String name)
Constructs a part manager.

Parameters: topLevel The toplevel widget (window / dialog ) the partmanager should monitor for activation/selection events parent The parent QObject. name The object's name, if any.

UNKNOWN: Constructs a part manager.

PartManager

public PartManager(QWidget topLevel, QObject parent)

Method Detail

activationButtonMask

public short activationButtonMask()

See Also: PartManager

UNKNOWN:

activePart

public Part activePart()
Returns the active part.

UNKNOWN: Returns the active part.

activeWidget

public QWidget activeWidget()
Returns the active widget of the current active part (see activePart()).

UNKNOWN: Returns the active widget of the current active part (see activePart()).

addManagedTopLevelWidget

public void addManagedTopLevelWidget(QWidget topLevel)
Adds the topLevel 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.

UNKNOWN: Adds the topLevel widget to the list of managed toplevel widgets.

addPart

public void addPart(Part part, boolean setActive)
Adds a part to the manager. Sets it to the active part automatically if setActive is true (default ). Behavior fix in KDE3.4: the part's widget is shown only if setActive is true, it used to be shown in all cases before.

UNKNOWN: Adds a part to the manager.

addPart

public void addPart(Part part)

allowNestedParts

public boolean allowNestedParts()

See Also: PartManager

UNKNOWN:

className

public String className()

eventFilter

public boolean eventFilter(QObject arg1, QEvent ev)

UNKNOWN:

ignoreScrollBars

public boolean ignoreScrollBars()

See Also: PartManager

UNKNOWN:

metaObject

public QMetaObject metaObject()

reason

public int reason()

Returns: the reason for the last activePartChanged signal emitted.

See Also: Reason

UNKNOWN:

removeManagedTopLevelWidget

public void removeManagedTopLevelWidget(QWidget topLevel)
Removes the topLevel widget from the list of managed toplevel widgets.

See Also: PartManager

UNKNOWN: Removes the topLevel widget from the list of managed toplevel widgets.

removePart

public void removePart(Part part)
Removes a part from the manager (this does not delete the object) . Sets the active part to 0 if part is the activePart() .

UNKNOWN: Removes a part from the manager (this does not delete the object) .

replacePart

public void replacePart(Part oldPart, Part newPart, boolean setActive)
Replaces oldPart with newPart, and sets newPart as active if setActive is true. This is an optimised version of removePart + addPart

UNKNOWN: Replaces oldPart with newPart, and sets newPart as active if setActive is true.

replacePart

public void replacePart(Part oldPart, Part newPart)

selectedPart

public Part selectedPart()
Returns the current selected part.

UNKNOWN: Returns the current selected part.

selectedWidget

public QWidget selectedWidget()
Returns the selected widget of the current selected part (see selectedPart()).

UNKNOWN: Returns the selected widget of the current selected part (see selectedPart()).

setActivationButtonMask

public void setActivationButtonMask(short buttonMask)
Specifies which mouse buttons the partmanager should react upon. By default it reacts on all mouse buttons (LMB/MMB/RMB).

Parameters: buttonMask a combination of Qt.ButtonState values e.g. Qt.LeftButton | Qt.MidButton

UNKNOWN: Specifies which mouse buttons the partmanager should react upon.

setActiveInstance

protected void setActiveInstance(KInstanceInterface instance)
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.

UNKNOWN: Changes the active instance when the active part changes.

setActivePart

public void setActivePart(Part part, QWidget widget)
Sets the active part. The active part receives activation events. widget 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.

UNKNOWN: Sets the active part.

setActivePart

public void setActivePart(Part part)

setAllowNestedParts

public void setAllowNestedParts(boolean allow)
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.

UNKNOWN: Specifies whether the partmanager should handle/allow nested parts or not.

setIgnoreScrollBars

public void setIgnoreScrollBars(boolean ignore)
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).

UNKNOWN: Specifies whether the partmanager should ignore mouse click events for scrollbars or not.

setSelectedPart

public void setSelectedPart(Part part, QWidget widget)
Sets the selected part. The selected part receives selection events. widget 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.

UNKNOWN: Sets the selected part.

setSelectedPart

public void setSelectedPart(Part part)

slotManagedTopLevelWidgetDestroyed

protected void slotManagedTopLevelWidgetDestroyed()

UNKNOWN:

slotObjectDestroyed

protected void slotObjectDestroyed()
Removes a part when it is destroyed.

UNKNOWN: Removes a part when it is destroyed.

slotWidgetDestroyed

protected void slotWidgetDestroyed()

UNKNOWN: