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

tdeparts

  • KParts
  • Part
Signals | Public Member Functions | Protected Member Functions | List of all members
KParts::Part Class Reference

#include <part.h>

Inheritance diagram for KParts::Part:
KParts::PartBase KXMLGUIClient KParts::ReadOnlyPart KParts::ReadWritePart

Signals

void setWindowCaption (const TQString &caption)
 
void setStatusBarText (const TQString &text)
 

Public Member Functions

 Part (TQObject *parent=0, const char *name=0)
 
virtual ~Part ()
 
virtual void embed (TQWidget *parentWidget)
 
virtual TQWidget * widget ()
 
virtual void setManager (PartManager *manager)
 
PartManager * manager () const
 
virtual Part * hitTest (TQWidget *widget, const TQPoint &globalPos)
 
virtual void setSelectable (bool selectable)
 
bool isSelectable () const
 
- Public Member Functions inherited from KParts::PartBase
 PartBase ()
 
virtual ~PartBase ()
 
void setPartObject (TQObject *object)
 
TQObject * partObject () const
 
- Public Member Functions inherited from KXMLGUIClient
 KXMLGUIClient (KXMLGUIClient *parent)
 
TDEAction * action (const char *name) const
 
virtual TDEAction * action (const TQDomElement &element) const
 
virtual TDEActionCollection * actionCollection () const
 
virtual TDEInstance * instance () const
 
virtual TQDomDocument domDocument () const
 
virtual TQString xmlFile () const
 
void setXMLGUIBuildDocument (const TQDomDocument &doc)
 
TQDomDocument xmlguiBuildDocument () const
 
void setFactory (KXMLGUIFactory *factory)
 
KXMLGUIFactory * factory () const
 
KXMLGUIClient * parentClient () const
 
void insertChildClient (KXMLGUIClient *child)
 
void removeChildClient (KXMLGUIClient *child)
 
const TQPtrList< KXMLGUIClient > * childClients ()
 
void setClientBuilder (KXMLGUIBuilder *builder)
 
KXMLGUIBuilder * clientBuilder () const
 
void reloadXML ()
 
void plugActionList (const TQString &name, const TQPtrList< TDEAction > &actionList)
 
void unplugActionList (const TQString &name)
 
void beginXMLPlug (TQWidget *)
 
void endXMLPlug ()
 
void prepareXMLUnplug (TQWidget *)
 

Protected Member Functions

virtual void setWidget (TQWidget *widget)
 
virtual void customEvent (TQCustomEvent *event)
 
virtual void partActivateEvent (PartActivateEvent *event)
 
virtual void partSelectEvent (PartSelectEvent *event)
 
virtual void guiActivateEvent (GUIActivateEvent *event)
 
TQWidget * hostContainer (const TQString &containerName)
 
- Protected Member Functions inherited from KParts::PartBase
virtual void setInstance (TDEInstance *instance)
 
virtual void setInstance (TDEInstance *instance, bool loadPlugins)
 
void loadPlugins (TQObject *parent, KXMLGUIClient *parentGUIClient, TDEInstance *instance)
 
void setPluginLoadingMode (PluginLoadingMode loadingMode)
 
- Protected Member Functions inherited from KXMLGUIClient
virtual void setInstance (TDEInstance *instance)
 
virtual void setXMLFile (const TQString &file, bool merge=false, bool setXMLDoc=true)
 
virtual void setXML (const TQString &document, bool merge=false)
 
virtual void setDOMDocument (const TQDomDocument &document, bool merge=false)
 
virtual void conserveMemory ()
 
virtual void stateChanged (const TQString &newstate, ReverseStateChange reverse=StateNoReverse)
 

Additional Inherited Members

- Protected Types inherited from KParts::PartBase
enum  PluginLoadingMode { DoNotLoadPlugins = 0 , LoadPlugins = 1 , LoadPluginsIfEnabled = 2 }
 

Detailed Description

Base class for parts.

A "part" is a GUI component, featuring:

  • A widget embeddedable in any application.
  • GUI elements that will be merged in the "host" user interface (menubars, toolbars... ).

About the widget:
Note that KParts::Part does not inherit TQWidget. This is due to the fact that the "visual representation" will probably not be a mere TQWidget, but an elaborate one. That's why when implementing your KParts::Part (or derived) you should call KParts::Part::setWidget() in your constructor.

About the GUI elements:
Those elements trigger actions, defined by the part (action()). The layout of the actions in the GUI is defined by an XML file (setXMLFile()).

See also ReadOnlyPart and ReadWritePart, which define the framework for a "viewer" part and for an "editor"-like part. Use Part directly only if your part doesn't fit into those.

Definition at line 181 of file part.h.

Constructor & Destructor Documentation

◆ Part()

Part::Part ( TQObject *  parent = 0,
const char *  name = 0 
)

Constructor.

Parameters
parentParent object of the part.
nameQT-internal name of the part.

Definition at line 133 of file part.cpp.

◆ ~Part()

Part::~Part ( )
virtual

Destructor.

Definition at line 142 of file part.cpp.

Member Function Documentation

◆ customEvent()

void Part::customEvent ( TQCustomEvent *  event)
protectedvirtual

Definition at line 221 of file part.cpp.

◆ embed()

void Part::embed ( TQWidget *  parentWidget)
virtual

Embed this part into a host widget.

You don't need to do this if you created the widget with the correct parent widget - this is just a TQWidget::reparent(). Note that the Part is still the holder of the TQWidget, meaning that if you delete the Part, then the widget gets destroyed as well, and vice-versa. This method is not recommended since creating the widget with the correct parent is simpler anyway.

Definition at line 165 of file part.cpp.

◆ guiActivateEvent()

void Part::guiActivateEvent ( GUIActivateEvent *  event)
protectedvirtual

Convenience method which is called when the Part received a GUIActivateEvent .

Reimplement this if you don't want to reimplement event and test for the event yourself or even install an event filter.

Reimplemented in KParts::ReadOnlyPart.

Definition at line 252 of file part.cpp.

◆ hitTest()

Part * Part::hitTest ( TQWidget *  widget,
const TQPoint &  globalPos 
)
virtual

Returns the part (this, or a child part) at the given global position.

This is called by the part manager to ask whether a part should be activated when clicking somewhere. In most cases the default implementation is enough. Reimplement this if your part has child parts in some areas (like in tdehtml or koffice)

Parameters
widgetthe part widget being clicked - usually the same as widget(), except in koffice.
globalPosthe mouse coordinates in global coordinates

Definition at line 186 of file part.cpp.

◆ hostContainer()

TQWidget * Part::hostContainer ( const TQString &  containerName)
protected

Convenience method for KXMLGUIFactory::container.

Returns
a container widget owned by the Part's GUI.

Definition at line 256 of file part.cpp.

◆ isSelectable()

bool Part::isSelectable ( ) const

Returns whether the part is selectable or not.

Definition at line 216 of file part.cpp.

◆ manager()

PartManager * Part::manager ( ) const

Returns the part manager handling this part, if any (0L otherwise).

Definition at line 181 of file part.cpp.

◆ partActivateEvent()

void Part::partActivateEvent ( PartActivateEvent *  event)
protectedvirtual

Convenience method which is called when the Part received a PartActivateEvent .

Reimplement this if you don't want to reimplement event and test for the event yourself or even install an event filter.

Definition at line 244 of file part.cpp.

◆ partSelectEvent()

void Part::partSelectEvent ( PartSelectEvent *  event)
protectedvirtual

Convenience method which is called when the Part received a PartSelectEvent .

Reimplement this if you don't want to reimplement event and test for the event yourself or even install an event filter.

Definition at line 248 of file part.cpp.

◆ setManager()

void Part::setManager ( PartManager *  manager)
virtual

Definition at line 176 of file part.cpp.

◆ setSelectable()

void Part::setSelectable ( bool  selectable)
virtual
Parameters
selectableIndicates whether the part is selectable or not.

Definition at line 211 of file part.cpp.

◆ setStatusBarText

void KParts::Part::setStatusBarText ( const TQString &  text)
signal

Emited by the part, to set a text in the statusbar of the window(s) hosting this part.

◆ setWidget()

void Part::setWidget ( TQWidget *  widget)
protectedvirtual

Set the main widget.

Call this in the Part-inherited class constructor.

Definition at line 194 of file part.cpp.

◆ setWindowCaption

void KParts::Part::setWindowCaption ( const TQString &  caption)
signal

Emitted by the part, to set the caption of the window(s) hosting this part.

◆ widget()

TQWidget * Part::widget ( )
virtual
Returns
The widget defined by this part, set by setWidget().

Definition at line 171 of file part.cpp.


The documentation for this class was generated from the following files:
  • part.h
  • part.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.