• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

umbrello/umbrello

  • Umbrello
  • Plugin
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Umbrello::Plugin Class Reference
Umbrello2 API

#include <plugin.h>

Inheritance diagram for Umbrello::Plugin:
Inheritance graph
[legend]

Public Member Functions

virtual ~Plugin ()
 
virtual QString category ()
 
KConfig * config ()
 
QByteArray instanceName () const
 
void unload ()
 
- Public Member Functions inherited from Umbrello::Configurable
 Configurable ()
 
virtual ~Configurable ()
 

Protected Member Functions

 Plugin (QObject *parent, const char *name, const QStringList &args)
 
virtual bool onInit ()
 
virtual bool onShutdown ()
 
- Protected Member Functions inherited from Umbrello::Configurable
bool loadPlugins (KConfig *config, const QString &group, const QString &key)
 
bool unloadPlugins ()
 

Protected Attributes

KConfig * _config
 
QByteArray _instanceName
 
uint _ref
 

Detailed Description

The Plugin class is the base class for all modular functionality in the core Umbrello library.

Because Umbrello is a plugin architecture, this class is derived from many times. Plugins are created via the KLibFactory of the encapsulating shared library and created from some other functional object (application, tool or plugin). After the plugin has been created, the init method is called. Before unloading, the shutdown method is called. Derived plugins can implement specific startup/shutdown behavior by overloading the onInit and onShutdown methods respectively.

By default, plugins use a configuration group called [LoadActions] in the config file. Entries in this group define any dependant or on-demand plugins that should be loaded in conjunction with this plugin. Known entries (actions) are "Load" and "LoadGUI". Because plugins can be used by both GUI and command line tools, they must be selective about some functionality. Specifically, during configuration, a plugin for a tool must not load GUI plugins.

In order to provide application-like functionality, this class offers support for accessing the configuration records of the KComponentData object corresponding to the shared library. Because the KComponentData object is only available within the scope of the shared library, the configuration records must be set in the constructor of the derived plugin class. However, because the construction name is passed to this constructor (as are the parent object and args), we can simply capture the name when the object is constructed.

Definition at line 87 of file plugin.h.

Constructor & Destructor Documentation

Plugin::~Plugin ( )
virtual

Destroy a plugin.

Definition at line 42 of file plugin.cpp.

Plugin::Plugin ( QObject *  parent,
const char *  name,
const QStringList &  args 
)
protected

Construct a plugin.

Definition at line 31 of file plugin.cpp.

Member Function Documentation

QString Plugin::category ( )
virtual

Return the category descriptor string.

Definition at line 159 of file plugin.cpp.

KConfig * Plugin::config ( )

Return the configuration record for the plugin.

Definition at line 116 of file plugin.cpp.

QByteArray Plugin::instanceName ( ) const

Return the instance name of the plugin.

Definition at line 110 of file plugin.cpp.

bool Plugin::onInit ( )
protectedvirtual

Can be reimplemented to define plugin specific startup behavior.

Definition at line 122 of file plugin.cpp.

bool Plugin::onShutdown ( )
protectedvirtual

Can be reimplemented to define plugin specific shutdown behavior.

Definition at line 128 of file plugin.cpp.

void Plugin::unload ( )

Unload the plugin.

This method actually only decrements the reference count. When the refcount is 0, the object calls shutdown and deletes itself.

Definition at line 53 of file plugin.cpp.

Member Data Documentation

KConfig* Umbrello::Plugin::_config
protected

Configuration record.

Definition at line 159 of file plugin.h.

QByteArray Umbrello::Plugin::_instanceName
protected

Instance name of the plugin.

Definition at line 158 of file plugin.h.

uint Umbrello::Plugin::_ref
protected

Reference counter.

Definition at line 157 of file plugin.h.


The documentation for this class was generated from the following files:
  • plugin.h
  • plugin.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal