• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

ksim

KSim::PluginLoader

KSim::PluginLoader Class Reference

#include <pluginloader.h>

Inheritance diagram for KSim::PluginLoader:

Inheritance graph
[legend]

List of all members.


Detailed Description

Provides a loader for the plugins.

Author:
Robbie Ward <linuxphreak@gmx.co.uk>

Definition at line 66 of file pluginloader.h.


Public Types

enum  SearchType { Name = 0, DesktopFile, LibName }
enum  ErrorCode { EmptyLibName = -3, LibNotFound = -2, UnSymbols = -1, LibLoaded = 0 }

Signals

void pluginLoaded (const KSim::Plugin &)

Public Member Functions

bool loadPlugin (const KDesktopFile &file)
bool unloadPlugin (const Q3CString &name)
void unloadAllPlugins ()
bool isLoaded (const KSim::Plugin &info) const
bool isLoaded (const Q3CString &library) const
KSim::PluginInfo findPluginInfo (const QString &name, SearchType type=DesktopFile) const
KSim::Plugin & find (const Q3CString &libName)
const KSim::Plugin & find (const Q3CString &libName) const
KSim::Plugin & find (const KSim::PluginInfo &info)
const KSim::Plugin & find (const KSim::PluginInfo &info) const
const KSim::PluginList & pluginList () const
KSim::PluginList & pluginList ()
const KSim::Plugin & plugin () const
KSim::Plugin & plugin ()

Static Public Member Functions

static PluginLoader & self ()

Protected Member Functions

 PluginLoader ()
 ~PluginLoader ()

Friends

class MainView

Member Enumeration Documentation

enum KSim::PluginLoader::SearchType

Enumerator:
Name 
DesktopFile 
LibName 

Definition at line 71 of file pluginloader.h.

enum KSim::PluginLoader::ErrorCode

Enumerator:
EmptyLibName 
LibNotFound 
UnSymbols 
LibLoaded 

Definition at line 72 of file pluginloader.h.


Constructor & Destructor Documentation

KSim::PluginLoader::PluginLoader (  )  [protected]

constructor for PluginLoader, use self() to get an instance

Definition at line 282 of file pluginloader.cpp.

KSim::PluginLoader::~PluginLoader (  )  [protected]

Definition at line 85 of file pluginloader.cpp.


Member Function Documentation

KSim::PluginLoader & KSim::PluginLoader::self (  )  [static]

Returns:
a reference to the instance

Definition at line 77 of file pluginloader.cpp.

bool KSim::PluginLoader::loadPlugin ( const KDesktopFile &  file  ) 

loads a plugin, example:

   KDesktopFile deskfile("/home/user/foo.desktop");
   KSim::PluginLoader::self().loadPlugin(deskFile);
 
you can then use pluginList() to access the plugin, view, config page and plugin information
Parameters:
file is the desktop file of the lib
Returns:
true if the plugin is successfully loaded

Definition at line 91 of file pluginloader.cpp.

bool KSim::PluginLoader::unloadPlugin ( const Q3CString &  name  ) 

unloads a loaded plugin and removes plugin entries from pluginList()

Definition at line 124 of file pluginloader.cpp.

void KSim::PluginLoader::unloadAllPlugins (  ) 

unloads all loaded plugins

Definition at line 141 of file pluginloader.cpp.

bool KSim::PluginLoader::isLoaded ( const KSim::Plugin &  info  )  const

convenience function

returns true if info is loaded

Definition at line 156 of file pluginloader.cpp.

bool KSim::PluginLoader::isLoaded ( const Q3CString &  library  )  const

returns true if library is loaded

Definition at line 161 of file pluginloader.cpp.

KSim::PluginInfo KSim::PluginLoader::findPluginInfo ( const QString &  name,
SearchType  type = DesktopFile 
) const

finds the plugins desktopfile and returns information on the plugin

Returns:
a KSim::PluginInfo object
See also:
KSim::PluginInfo

Definition at line 169 of file pluginloader.cpp.

KSim::Plugin & KSim::PluginLoader::find ( const Q3CString &  libName  ) 

looks through the list of loaded plugins and returns the one that matches libName, or returns KSim::Plugin::null if a plugin could not be found.

if libName does not start with "ksim_" then the function will prepend this automatically.

Returns:
a KSim::Plugin object
See also:
KSim::Plugin

Definition at line 216 of file pluginloader.cpp.

const KSim::Plugin & KSim::PluginLoader::find ( const Q3CString &  libName  )  const

convenience function, see the above function for details.

Definition at line 234 of file pluginloader.cpp.

KSim::Plugin & KSim::PluginLoader::find ( const KSim::PluginInfo &  info  ) 

equivalent to find(info.libName());

Definition at line 252 of file pluginloader.cpp.

const KSim::Plugin & KSim::PluginLoader::find ( const KSim::PluginInfo &  info  )  const

convenience function, see the above function for details.

Definition at line 257 of file pluginloader.cpp.

const KSim::PluginList & KSim::PluginLoader::pluginList (  )  const

provides plugin(), view(), config page and plugin information

See also:
KSim::Plugin KSim::PluginList

Definition at line 262 of file pluginloader.cpp.

KSim::PluginList & KSim::PluginLoader::pluginList (  ) 

Overloaded member function, This behaves essentially like the above function.

Definition at line 267 of file pluginloader.cpp.

const KSim::Plugin & KSim::PluginLoader::plugin (  )  const

Returns:
a reference to the last plugin loaded (or a null plugin if the plugin was unable to load)

Definition at line 272 of file pluginloader.cpp.

KSim::Plugin & KSim::PluginLoader::plugin (  ) 

Overloaded member function, This behaves essentially like the above function.

Definition at line 277 of file pluginloader.cpp.

void KSim::PluginLoader::pluginLoaded ( const KSim::Plugin &   )  [signal]


Friends And Related Function Documentation

friend class MainView [friend]

Definition at line 69 of file pluginloader.h.


The documentation for this class was generated from the following files:
  • pluginloader.h
  • pluginloader.cpp

ksim

Skip menu "ksim"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal