Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Opie::Core::OPluginItem Class Reference

A small item representing the Plugin Information This class contains the information about a Plugin. It contains a translated name if available to the system, a config key, and the path location. More...

#include </home/clem/local/src/opie/libopie2/opiecore/opluginloader.h>

Collaboration diagram for Opie::Core::OPluginItem:

Collaboration graph
[legend]
List of all members.

Public Types

typedef QValueList< OPluginItemList

Public Member Functions

 OPluginItem ()
 Creates an Empty OPluginItem.
 OPluginItem (const QString &name, const QString &path, bool enabled=true, int pos=-1)
 Create an OPluginItem.
 ~OPluginItem ()
 simple d'tor
bool isEmpty () const
 Test if this Item is Empty and does not represent a loadable plugin Test if a OPluginItem is empty. A OPluginItem is empty if name and path are empty ,pos equals -1 and the item is disabled.
bool operator== (const OPluginItem &) const
 test equality operator to test equalness of two OPluginItem
bool operator!= (const OPluginItem &) const
 test non equality operator to test non-equalness of two OPluginItem
QString name () const
 returns the name of the plugin return the name of this Plugin
QString path () const
 return the path of the plugin
bool isEnabled () const
 Return if this item is enabled.
int position () const
 return the position of a plugin. return the position of the item -1 is the default value and means normally that the whole items are unsorted. Higher numbers belong to an upper position. With plugins with the postions 20,19,5,3 the item with pos 20 would be the first in the list returned by the OGenericPluginLoader
void setName (const QString &)
 set the name of a plugin Set the name of the Plugin Item
void setPath (const QString &)
 set the path of a plugin Set the path of Plugin Item. The path must be absolute.
void setEnabled (bool)
 enable or disable the to load attribute Set the Enabled attribute. Such changes won't be saved. If you want to save it use a OPluginManager to configure your plugins manually or Opie::Ui::OPluginConfig for a graphical frontend.
void setPosition (int)
 Set the position. Set the position.

Private Attributes

QString m_name
QString m_path
bool m_enabled: 1
int m_pos
Private * d

Detailed Description

A small item representing the Plugin Information This class contains the information about a Plugin. It contains a translated name if available to the system, a config key, and the path location.

Since:
1.2

Definition at line 29 of file opluginloader.h.


Member Typedef Documentation

typedef QValueList<OPluginItem> Opie::Core::OPluginItem::List
 

Definition at line 31 of file opluginloader.h.


Constructor & Destructor Documentation

Opie::Core::OPluginItem::OPluginItem  ) 
 

Creates an Empty OPluginItem.

create an empty pluginitem. Position is set to -1 and the other things are used with the default ctors

Definition at line 110 of file opluginloader.cpp.

Opie::Core::OPluginItem::OPluginItem const QString name,
const QString path,
bool  b = true,
int  pos = -1
 

Create an OPluginItem.

Todo:
Create Internal name so we can have the plugin names translated. Or only for the gui? I'm not yet sure
Create a Plugin Item with all information. If you for some reasons need to create your own OPluginItems make sure that 'name' is always the same as it if used for positions and exclude list.

Parameters:
name The if available translated Name
path The path to the plugin must be absolute.
b If the OPluginItem is enabled or not
pos The position of the plugin if used for sorting

Definition at line 128 of file opluginloader.cpp.

Opie::Core::OPluginItem::~OPluginItem  ) 
 

simple d'tor

Definition at line 135 of file opluginloader.cpp.


Member Function Documentation

bool Opie::Core::OPluginItem::isEmpty  )  const
 

Test if this Item is Empty and does not represent a loadable plugin Test if a OPluginItem is empty. A OPluginItem is empty if name and path are empty ,pos equals -1 and the item is disabled.

See also:
QString::isEmpty()

Definition at line 146 of file opluginloader.cpp.

References QString::isEmpty(), m_enabled, m_name, m_path, and m_pos.

bool Opie::Core::OPluginItem::isEnabled  )  const
 

Return if this item is enabled.

Definition at line 193 of file opluginloader.cpp.

References m_enabled.

Referenced by Opie::Core::OPluginManager::save().

QString Opie::Core::OPluginItem::name  )  const
 

returns the name of the plugin return the name of this Plugin

Definition at line 179 of file opluginloader.cpp.

References m_name.

Referenced by Opie::Core::OGenericPluginLoader::load(), Opie::Core::OPluginManager::replace(), and Opie::Core::OPluginManager::save().

bool Opie::Core::OPluginItem::operator!= const OPluginItem  )  const
 

test non equality operator to test non-equalness of two OPluginItem

Definition at line 171 of file opluginloader.cpp.

bool Opie::Core::OPluginItem::operator== const OPluginItem  )  const
 

test equality operator to test equalness of two OPluginItem

Definition at line 159 of file opluginloader.cpp.

References m_enabled, m_name, m_path, and m_pos.

QString Opie::Core::OPluginItem::path  )  const
 

return the path of the plugin

Definition at line 186 of file opluginloader.cpp.

References m_path.

Referenced by Opie::Core::OGenericPluginLoader::load(), Opie::Core::OPluginManager::replace(), and Opie::Core::OPluginManager::save().

int Opie::Core::OPluginItem::position  )  const
 

return the position of a plugin. return the position of the item -1 is the default value and means normally that the whole items are unsorted. Higher numbers belong to an upper position. With plugins with the postions 20,19,5,3 the item with pos 20 would be the first in the list returned by the OGenericPluginLoader

See also:
OGenericPluginLoader::allAvailable

OGenericPluginLoader::filtered

Definition at line 207 of file opluginloader.cpp.

References m_pos.

Referenced by Opie::Core::operator<(), Opie::Core::operator<=(), Opie::Core::operator>(), and Opie::Core::OPluginManager::save().

void Opie::Core::OPluginItem::setEnabled bool  enabled  ) 
 

enable or disable the to load attribute Set the Enabled attribute. Such changes won't be saved. If you want to save it use a OPluginManager to configure your plugins manually or Opie::Ui::OPluginConfig for a graphical frontend.

Parameters:
enabled Enable or Disable the Enabled Attribute

Definition at line 237 of file opluginloader.cpp.

References m_enabled.

Referenced by Opie::Core::OGenericPluginLoader::plugins(), and Opie::Core::OPluginManager::setEnabled().

void Opie::Core::OPluginItem::setName const QString name  ) 
 

set the name of a plugin Set the name of the Plugin Item

Parameters:
name 

Definition at line 216 of file opluginloader.cpp.

References m_name.

void Opie::Core::OPluginItem::setPath const QString name  ) 
 

set the path of a plugin Set the path of Plugin Item. The path must be absolute.

Parameters:
name The path of the plugin

Definition at line 225 of file opluginloader.cpp.

References m_path.

void Opie::Core::OPluginItem::setPosition int  pos  ) 
 

Set the position. Set the position.

Parameters:
pos The position
See also:
position()

Definition at line 248 of file opluginloader.cpp.

References m_pos.

Referenced by Opie::Core::OGenericPluginLoader::plugins().


Member Data Documentation

Private* Opie::Core::OPluginItem::d [private]
 

Definition at line 57 of file opluginloader.h.

bool Opie::Core::OPluginItem::m_enabled [private]
 

Definition at line 55 of file opluginloader.h.

Referenced by isEmpty(), isEnabled(), operator==(), and setEnabled().

QString Opie::Core::OPluginItem::m_name [private]
 

Definition at line 53 of file opluginloader.h.

Referenced by isEmpty(), name(), operator==(), and setName().

QString Opie::Core::OPluginItem::m_path [private]
 

Definition at line 54 of file opluginloader.h.

Referenced by isEmpty(), operator==(), path(), and setPath().

int Opie::Core::OPluginItem::m_pos [private]
 

Definition at line 56 of file opluginloader.h.

Referenced by isEmpty(), operator==(), position(), and setPosition().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 18:00:45 2005 for OPIE by  doxygen 1.4.2