|
| Part (PartPrivate &dd, QObject *parent) |
|
virtual void | customEvent (QEvent *event) |
|
virtual void | guiActivateEvent (GUIActivateEvent *event) |
|
QWidget * | hostContainer (const QString &containerName) |
|
void | loadPlugins () |
|
virtual void | partActivateEvent (PartActivateEvent *event) |
|
virtual void | partSelectEvent (PartSelectEvent *event) |
|
virtual void | setWidget (QWidget *widget) |
|
| PartBase (PartBasePrivate &dd) |
|
void | loadPlugins (QObject *parent, KXMLGUIClient *parentGUIClient, const KComponentData &componentData) |
|
virtual void | setComponentData (const KComponentData &componentData) |
|
virtual void | setComponentData (const KComponentData &componentData, bool loadPlugins) |
|
void | setPluginInterfaceVersion (int version) |
|
void | setPluginLoadingMode (PluginLoadingMode loadingMode) |
|
void | loadStandardsXmlFile () |
|
virtual void | setDOMDocument (const QDomDocument &document, bool merge=false) |
|
virtual void | setLocalXMLFile (const QString &file) |
|
virtual void | setXML (const QString &document, bool merge=false) |
|
virtual void | setXMLFile (const QString &file, bool merge=false, bool setXMLDoc=true) |
|
virtual void | stateChanged (const QString &newstate, ReverseStateChange reverse=StateNoReverse) |
|
virtual void | virtual_hook (int id, void *data) |
|
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 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()).
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 215 of file part.h.
void Part::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 not recommended since creating the widget with the correct parent is simpler anyway.
Definition at line 215 of file part.cpp.
Use this icon loader to load any icons that are specific to this part, i.e.
icons installed into this part's own directories as opposed to standard kde icons. Use KIcon("myicon", iconLoader()).
Make sure to call setComponentData before calling iconLoader.
Definition at line 246 of file part.cpp.
void Part::setAutoDeletePart |
( |
bool |
autoDeletePart | ) |
|
By default, the part deletes itself when its widget is deleted.
The hosting application can call setAutoDeletePart(false) to disable this behavior, to be able to delete the widget and then the part, independently. This is a method for the hosting application only, Part subclasses should never call this.
Definition at line 238 of file part.cpp.
void Part::setAutoDeleteWidget |
( |
bool |
autoDeleteWidget | ) |
|
By default, the widget is deleted by the part when the part is deleted.
The hosting application can call setAutoDeleteWidget(false) to disable this behavior, given that the widget is usually deleted by its parent widget anyway. This is a method for the hosting application only, Part subclasses should never call this.
Definition at line 232 of file part.cpp.