KParts::PartBase Class Reference
Base class for all parts. Base class for all parts. More...
#include <part.h>
Inheritance diagram for KParts::PartBase:

Public Member Functions | |
PartBase () | |
virtual | ~PartBase () |
void | setPartObject (QObject *object) |
QObject * | partObject () const |
Protected Types | |
enum | PluginLoadingMode { DoNotLoadPlugins = 0, LoadPlugins = 1, LoadPluginsIfEnabled = 2 } |
Protected Member Functions | |
virtual void | setInstance (KInstance *instance) |
virtual void | setInstance (KInstance *instance, bool loadPlugins) |
void | loadPlugins (QObject *parent, KXMLGUIClient *parentGUIClient, KInstance *instance) |
void | setPluginLoadingMode (PluginLoadingMode loadingMode) |
Friends | |
class | PartBasePrivate |
Detailed Description
Base class for all parts. Base class for all parts.
Definition at line 57 of file part.h.
Member Enumeration Documentation
|
We have three different policies, whether to load new plugins or not. The value in the KConfig object of the KInstance object always overrides LoadPlugins and LoadPluginsIfEnabled.
|
Constructor & Destructor Documentation
|
Constructor.
|
|
Destructor.
|
Member Function Documentation
|
Internal method. Called by KParts::Part to specify the parent object for plugin objects. |
|
Set the instance ( KInstance) for this part. Call this *first* in the inherited class constructor, because it loads the i18n catalogues. Reimplemented from KXMLGUIClient. |
|
Set the instance ( KInstance) for this part. Call this *first* in the inherited class constructor, because it loads the i18n catalogues. Definition at line 110 of file part.cpp. References KStandardDirs::addResourceType(), KGlobal::dirs(), KLocale::insertCatalogue(), KXMLGUIClient::instance(), KStandardDirs::kde_default(), loadPlugins(), KGlobal::locale(), and KXMLGUIClient::setInstance(). |
|
Load the Plugins honoring the PluginLoadingMode. If you call this method in an already constructed GUI (like when the user has changed which plugins are enabled) you need to add the new plugins to the KXMLGUIFactory: if( factory() ) { QPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this ); QPtrListIterator<KParts::Plugin> it( plugins ); KParts::Plugin * plugin; while( ( plugin = it.current() ) != 0 ) { ++it; factory()->addClient( plugin ); } } Definition at line 122 of file part.cpp. References DoNotLoadPlugins, and LoadPlugins. Referenced by KParts::MainWindow::createGUI(), KParts::DockMainWindow::createGUI(), and setInstance(). |
|
For a KParts::Part: call this before setInstance. For a KParts::MainWindow: call this before createGUI. |
The documentation for this class was generated from the following files: