20 #ifndef __kpartmanager_h__
21 #define __kpartmanager_h__
25 #include <tqptrlist.h>
27 #include <tdelibs_export.h>
36 class PartManagerPrivate;
53 TQ_PROPERTY(
SelectionPolicy selectionPolicy READ selectionPolicy WRITE setSelectionPolicy )
54 TQ_PROPERTY(
bool allowNestedParts READ allowNestedParts WRITE setAllowNestedParts )
55 TQ_PROPERTY(
bool ignoreScrollBars READ ignoreScrollBars WRITE setIgnoreScrollBars )
66 enum Reason { ReasonLeftClick = 100, ReasonMidClick, ReasonRightClick, NoReason };
76 PartManager( TQWidget * parent,
const char * name = 0L );
86 PartManager( TQWidget * topLevel, TQObject *parent,
const char *name = 0 );
92 void setSelectionPolicy( SelectionPolicy policy );
96 SelectionPolicy selectionPolicy()
const;
110 void setAllowNestedParts(
bool allow );
114 bool allowNestedParts()
const;
124 void setIgnoreScrollBars(
bool ignore );
128 bool ignoreScrollBars()
const;
135 void setActivationButtonMask(
short int buttonMask );
139 short int activationButtonMask()
const;
144 virtual bool eventFilter( TQObject *obj, TQEvent *ev );
153 virtual void addPart(
Part *part,
bool setActive =
true );
160 virtual void removePart(
Part *part );
167 virtual void replacePart(
Part * oldPart,
Part * newPart,
bool setActive =
true );
177 virtual void setActivePart(
Part *part, TQWidget *widget = 0L );
182 virtual Part *activePart()
const;
187 virtual TQWidget *activeWidget()
const;
197 virtual void setSelectedPart(
Part *part, TQWidget *widget = 0L );
202 virtual Part *selectedPart()
const;
207 virtual TQWidget *selectedWidget()
const;
212 const TQPtrList<Part> *parts()
const;
221 void addManagedTopLevelWidget(
const TQWidget *topLevel );
226 void removeManagedTopLevelWidget(
const TQWidget *topLevel );
258 virtual void setActiveInstance(
TDEInstance * instance );
264 void slotObjectDestroyed();
269 void slotWidgetDestroyed();
274 void slotManagedTopLevelWidgetDestroyed();
276 Part * findPartFromWidget( TQWidget * widget,
const TQPoint &pos );
277 Part * findPartFromWidget( TQWidget * widget );
280 virtual void virtual_hook(
int id,
void* data );
282 PartManagerPrivate *d;
The part manager is an object which knows about a collection of parts (even nested ones) and handles ...
void partAdded(KParts::Part *part)
Emitted when a new part has been added.
Reason
This extends TQFocusEvent::Reason with the non-focus-event reasons for partmanager to activate a part...
SelectionPolicy
Selection policy. The default policy of a PartManager is Direct.
void activePartChanged(KParts::Part *newPart)
Emitted when the active part has changed.
void partRemoved(KParts::Part *part)
Emitted when a part has been removed.