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

tdeparts

  • KParts
  • PartBase
Public Member Functions | Protected Types | Protected Member Functions | Friends | List of all members
KParts::PartBase Class Reference

#include <part.h>

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

Public Member Functions

 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 Types

enum  PluginLoadingMode { DoNotLoadPlugins = 0 , LoadPlugins = 1 , LoadPluginsIfEnabled = 2 }
 

Protected Member Functions

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)
 

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

◆ PluginLoadingMode

enum KParts::PartBase::PluginLoadingMode
protected

We have three different policies, whether to load new plugins or not.

The value in the TDEConfig object of the TDEInstance object always overrides LoadPlugins and LoadPluginsIfEnabled.

Enumerator
DoNotLoadPlugins 

Don't load any plugins at all.

LoadPlugins 

Load new plugins automatically.

Can be overridden by the plugin if it sets EnabledByDefault=false in the corresponding .desktop file.

LoadPluginsIfEnabled 

New plugins are disabled by default.

Can be overridden by the plugin if it sets EnabledByDefault=true in the corresponding .desktop file.

Definition at line 102 of file part.h.

Constructor & Destructor Documentation

◆ PartBase()

PartBase::PartBase ( )

Constructor.

Definition at line 84 of file part.cpp.

◆ ~PartBase()

PartBase::~PartBase ( )
virtual

Destructor.

Definition at line 90 of file part.cpp.

Member Function Documentation

◆ loadPlugins()

void PartBase::loadPlugins ( TQObject *  parent,
KXMLGUIClient *  parentGUIClient,
TDEInstance *  instance 
)
protected

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() )
{
TQPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this );
TQPtrListIterator<KParts::Plugin> it( plugins );
KParts::Plugin * plugin;
while( ( plugin = it.current() ) != 0 )
{
++it;
factory()->addClient( plugin );
}
}
KParts::Plugin
A plugin is the way to add actions to an existing KParts application, or to a Part.
Definition: plugin.h:50
KParts::Plugin::pluginObjects
static TQPtrList< Plugin > pluginObjects(TQObject *parent)
Returns a list of plugin objects loaded for parent.
Definition: plugin.cpp:185
KXMLGUIClient::factory
KXMLGUIFactory * factory() const
KXMLGUIFactory::addClient
void addClient(KXMLGUIClient *client)

Definition at line 122 of file part.cpp.

◆ partObject()

TQObject * PartBase::partObject ( ) const

Definition at line 100 of file part.cpp.

◆ setInstance() [1/2]

void PartBase::setInstance ( TDEInstance *  instance)
protectedvirtual

Set the instance ( TDEInstance) for this part.

Call this first in the inherited class constructor, because it loads the i18n catalogues.

Reimplemented from KXMLGUIClient.

Definition at line 105 of file part.cpp.

◆ setInstance() [2/2]

void PartBase::setInstance ( TDEInstance *  instance,
bool  loadPlugins 
)
protectedvirtual

Set the instance ( TDEInstance) 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.

◆ setPartObject()

void PartBase::setPartObject ( TQObject *  object)

Internal method.

Called by KParts::Part to specify the parent object for plugin objects.

Definition at line 95 of file part.cpp.

◆ setPluginLoadingMode()

void PartBase::setPluginLoadingMode ( PluginLoadingMode  loadingMode)
protected

For a KParts::Part: call this before setInstance().

For a KParts::MainWindow: call this before createGUI().

Definition at line 128 of file part.cpp.

Friends And Related Function Documentation

◆ PartBasePrivate

friend class PartBasePrivate
friend

Definition at line 59 of file part.h.


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.