class Part

Base class for parts. More...

Full nameKParts::Part
Definition#include <xmlgui.h>
InheritsKParts::PartBase, QObject (kdecore)
Inherited byReadOnlyPart, ReadWritePart
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals

Protected Methods


Detailed Description

Base class for parts.

A "part" is a GUI component, featuring

About the widget : Note that KParts::Part does not inherit QWidget. This is due to the fact that the "visual representation" will probably not be a mere QWidget, 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()).

This class is an abstract interface that you need to inherit from. See also PartReadOnly and PartReadWrite, 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.

void embed ( QWidget * 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 QWidget::reparent(). Note that the Part is still the holder of the QWidget, meaning that if you delete the Part, then the widget gets destroyed as well, and vice-versa. This method is deprecated since creating the widget with the correct parent is simpler anyway.

QWidget * widget ()
[virtual]

Returns: The widget defined by this part, set by setWidget().

PartManager * manager ()

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

Part * hitTest ( QWidget *widget, const QPoint &globalPos )
[virtual]

void setWindowCaption ( const QString & caption )
[signal]

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

void setStatusBarText ( const QString & text )
[signal]

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

void setWidget ( QWidget * widget )
[protected virtual]

Set the main widget.

Call this in the Part-inherited class constructor.


Generated by: root@tantive.terraplex.com on Sun Feb 27 17:39:45 2000, using kdoc 2.0a33.