• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeparts
 

tdeparts

  • KParts
  • PartManager
Public Types | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KParts::PartManager Class Reference

#include <partmanager.h>

Inherits TQObject.

Public Types

enum  SelectionPolicy { Direct , TriState }
 
enum  Reason { ReasonLeftClick = 100 , ReasonMidClick , ReasonRightClick , NoReason }
 

Signals

void partAdded (KParts::Part *part)
 
void partRemoved (KParts::Part *part)
 
void activePartChanged (KParts::Part *newPart)
 

Public Member Functions

 PartManager (TQWidget *parent, const char *name=0L)
 
 PartManager (TQWidget *topLevel, TQObject *parent, const char *name=0)
 
void setSelectionPolicy (SelectionPolicy policy)
 
SelectionPolicy selectionPolicy () const
 
void setAllowNestedParts (bool allow)
 
bool allowNestedParts () const
 
void setIgnoreScrollBars (bool ignore)
 
bool ignoreScrollBars () const
 
void setActivationButtonMask (short int buttonMask)
 
short int activationButtonMask () const
 
virtual bool eventFilter (TQObject *obj, TQEvent *ev)
 
virtual void addPart (Part *part, bool setActive=true)
 
virtual void removePart (Part *part)
 
virtual void replacePart (Part *oldPart, Part *newPart, bool setActive=true)
 
virtual void setActivePart (Part *part, TQWidget *widget=0L)
 
virtual Part * activePart () const
 
virtual TQWidget * activeWidget () const
 
virtual void setSelectedPart (Part *part, TQWidget *widget=0L)
 
virtual Part * selectedPart () const
 
virtual TQWidget * selectedWidget () const
 
const TQPtrList< Part > * parts () const
 
void addManagedTopLevelWidget (const TQWidget *topLevel)
 
void removeManagedTopLevelWidget (const TQWidget *topLevel)
 
int reason () const
 

Protected Slots

void slotObjectDestroyed ()
 
void slotWidgetDestroyed ()
 
void slotManagedTopLevelWidgetDestroyed ()
 

Protected Member Functions

virtual void setActiveInstance (TDEInstance *instance)
 
virtual void virtual_hook (int id, void *data)
 

Detailed Description

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().

Definition at line 49 of file partmanager.h.

Member Enumeration Documentation

◆ Reason

enum KParts::PartManager::Reason

This extends TQFocusEvent::Reason with the non-focus-event reasons for partmanager to activate a part.

To test for "any focusin reason", use < ReasonLeftClick. NoReason usually means: explicit activation with setActivePart.

Since
3.3

Definition at line 66 of file partmanager.h.

◆ SelectionPolicy

enum KParts::PartManager::SelectionPolicy

Selection policy. The default policy of a PartManager is Direct.

Definition at line 58 of file partmanager.h.

Constructor & Destructor Documentation

◆ PartManager() [1/2]

PartManager::PartManager ( TQWidget *  parent,
const char *  name = 0L 
)

Constructs a part manager.

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

Definition at line 94 of file partmanager.cpp.

◆ PartManager() [2/2]

PartManager::PartManager ( TQWidget *  topLevel,
TQObject *  parent,
const char *  name = 0 
)

Constructs a part manager.

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

Definition at line 106 of file partmanager.cpp.

◆ ~PartManager()

PartManager::~PartManager ( )
virtual

Definition at line 118 of file partmanager.cpp.

Member Function Documentation

◆ activationButtonMask()

short int PartManager::activationButtonMask ( ) const
See also
setActivationButtonMask

Definition at line 170 of file partmanager.cpp.

◆ activePart()

Part * PartManager::activePart ( ) const
virtual

Returns the active part.

Definition at line 494 of file partmanager.cpp.

◆ activePartChanged

void KParts::PartManager::activePartChanged ( KParts::Part *  newPart)
signal

Emitted when the active part has changed.

See also
setActivePart()

◆ activeWidget()

TQWidget * PartManager::activeWidget ( ) const
virtual

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

Definition at line 499 of file partmanager.cpp.

◆ addManagedTopLevelWidget()

void PartManager::addManagedTopLevelWidget ( const TQWidget *  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.

Definition at line 562 of file partmanager.cpp.

◆ addPart()

void PartManager::addPart ( Part *  part,
bool  setActive = true 
)
virtual

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.

Definition at line 332 of file partmanager.cpp.

◆ allowNestedParts()

bool PartManager::allowNestedParts ( ) const
See also
setAllowNestedParts

Definition at line 150 of file partmanager.cpp.

◆ eventFilter()

bool PartManager::eventFilter ( TQObject *  obj,
TQEvent *  ev 
)
virtual

Definition at line 175 of file partmanager.cpp.

◆ ignoreScrollBars()

bool PartManager::ignoreScrollBars ( ) const
See also
setIgnoreScrollBars

Definition at line 160 of file partmanager.cpp.

◆ partAdded

void KParts::PartManager::partAdded ( KParts::Part *  part)
signal

Emitted when a new part has been added.

See also
addPart()

◆ partRemoved

void KParts::PartManager::partRemoved ( KParts::Part *  part)
signal

Emitted when a part has been removed.

See also
removePart()

◆ parts()

const TQPtrList< Part > * PartManager::parts ( ) const

Returns the list of parts being managed by the partmanager.

Definition at line 557 of file partmanager.cpp.

◆ reason()

int PartManager::reason ( ) const
Returns
the reason for the last activePartChanged signal emitted.
See also
Reason
Since
3.3

Definition at line 592 of file partmanager.cpp.

◆ removeManagedTopLevelWidget()

void PartManager::removeManagedTopLevelWidget ( const TQWidget *  topLevel)

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

See also
addManagedTopLevelWidget

Definition at line 575 of file partmanager.cpp.

◆ removePart()

void PartManager::removePart ( Part *  part)
virtual

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

Sets the active part to 0 if part is the activePart() .

Definition at line 368 of file partmanager.cpp.

◆ replacePart()

void PartManager::replacePart ( Part *  oldPart,
Part *  newPart,
bool  setActive = true 
)
virtual

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

This is an optimised version of removePart + addPart

Definition at line 392 of file partmanager.cpp.

◆ selectedPart()

Part * PartManager::selectedPart ( ) const
virtual

Returns the current selected part.

Definition at line 533 of file partmanager.cpp.

◆ selectedWidget()

TQWidget * PartManager::selectedWidget ( ) const
virtual

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

Definition at line 538 of file partmanager.cpp.

◆ selectionPolicy()

PartManager::SelectionPolicy PartManager::selectionPolicy ( ) const

Returns the current selection policy.

Definition at line 140 of file partmanager.cpp.

◆ setActivationButtonMask()

void PartManager::setActivationButtonMask ( short int  buttonMask)

Specifies which mouse buttons the partmanager should react upon.

By default it reacts on all mouse buttons (LMB/MMB/RMB).

Parameters
buttonMaska combination of TQt::ButtonState values e.g. TQt::LeftButton | TQt::MidButton

Definition at line 165 of file partmanager.cpp.

◆ setActiveInstance()

void PartManager::setActiveInstance ( TDEInstance *  instance)
protectedvirtual

Changes the active instance when the active part changes.

The active instance is used by KBugReport and TDEAboutDialog. Override if you really need to - usually you don't need to.

Definition at line 488 of file partmanager.cpp.

◆ setActivePart()

void PartManager::setActivePart ( Part *  part,
TQWidget *  widget = 0L 
)
virtual

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.

Definition at line 410 of file partmanager.cpp.

◆ setAllowNestedParts()

void PartManager::setAllowNestedParts ( bool  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.

Definition at line 145 of file partmanager.cpp.

◆ setIgnoreScrollBars()

void PartManager::setIgnoreScrollBars ( bool  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).

Definition at line 155 of file partmanager.cpp.

◆ setSelectedPart()

void PartManager::setSelectedPart ( Part *  part,
TQWidget *  widget = 0L 
)
virtual

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.

Definition at line 504 of file partmanager.cpp.

◆ setSelectionPolicy()

void PartManager::setSelectionPolicy ( SelectionPolicy  policy)

Sets the selection policy of the partmanager.

Definition at line 135 of file partmanager.cpp.

◆ slotManagedTopLevelWidgetDestroyed

void PartManager::slotManagedTopLevelWidgetDestroyed ( )
protectedslot

Definition at line 586 of file partmanager.cpp.

◆ slotObjectDestroyed

void PartManager::slotObjectDestroyed ( )
protectedslot

Removes a part when it is destroyed.

Definition at line 543 of file partmanager.cpp.

◆ slotWidgetDestroyed

void PartManager::slotWidgetDestroyed ( )
protectedslot

Definition at line 549 of file partmanager.cpp.

◆ virtual_hook()

void PartManager::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 597 of file partmanager.cpp.


The documentation for this class was generated from the following files:
  • partmanager.h
  • partmanager.cpp

tdeparts

Skip menu "tdeparts"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeparts

Skip menu "tdeparts"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeparts by doxygen 1.9.4
This website is maintained by Timothy Pearson.