• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Kross

Kross::ActionCollection

Kross::ActionCollection Class Reference

#include <actioncollection.h>

Inheritance diagram for Kross::ActionCollection:

Inheritance graph
[legend]

List of all members.


Detailed Description

The ActionCollection class manages collections of Action instances.

Definition at line 39 of file actioncollection.h.


Signals

void updated ()

Public Member Functions

Action * action (const QString &name) const
 ActionCollection (const QString &name, ActionCollection *parent=0)
QList< Action * > actions () const
void addAction (const QString &name, Action *action)
void addAction (Action *action)
ActionCollection * collection (const QString &name) const
QStringList collections () const
QString description () const
bool hasCollection (const QString &name) const
QIcon icon () const
QString iconName () const
bool isEnabled () const
QString name () const
ActionCollection * parentCollection () const
bool readXml (QIODevice *device, const QDir &directory=QDir())
bool readXml (const QDomElement &element, const QDir &directory=QDir())
bool readXmlFile (const QString &file)
void removeAction (Action *action)
void removeAction (const QString &name)
void setDescription (const QString &description)
void setEnabled (bool enabled)
void setIconName (const QString &iconname)
void setText (const QString &text)
QString text () const
bool writeXml (QIODevice *device, int indent=2)
QDomElement writeXml ()
virtual ~ActionCollection ()

Protected Member Functions

void registerCollection (ActionCollection *collection)
void unregisterCollection (const QString &name)

Constructor & Destructor Documentation

ActionCollection::ActionCollection ( const QString &  name,
ActionCollection *  parent = 0 
) [explicit]

Constructor.

Parameters:
name The objectName the ActionCollection has.
parent The parent ActionCollection this ActionCollection will be child of. If parent is not NULL, this ActionCollection instance will register itself as child of the parent parent by using the registerCollection method.

Definition at line 59 of file actioncollection.cpp.

ActionCollection::~ActionCollection (  )  [virtual]

Destructor.

Definition at line 70 of file actioncollection.cpp.


Member Function Documentation

Action * ActionCollection::action ( const QString &  name  )  const

Returns:
action with given name or 0 if it wasn't found

Definition at line 139 of file actioncollection.cpp.

QList< Action * > ActionCollection::actions (  )  const

Definition at line 134 of file actioncollection.cpp.

void ActionCollection::addAction ( const QString &  name,
Action *  action 
)

Definition at line 150 of file actioncollection.cpp.

void ActionCollection::addAction ( Action *  action  ) 

Definition at line 144 of file actioncollection.cpp.

ActionCollection * ActionCollection::collection ( const QString &  name  )  const

Returns:
the ActionCollection instance which objectName is name or NULL if there exists no such ActionCollection .

Definition at line 102 of file actioncollection.cpp.

QStringList ActionCollection::collections (  )  const

Returns:
a list of names of child ActionCollection instances this collection has

Definition at line 107 of file actioncollection.cpp.

QString ActionCollection::description (  )  const

Returns:
the optional description for this ActionCollection.

Definition at line 82 of file actioncollection.cpp.

bool ActionCollection::hasCollection ( const QString &  name  )  const

Returns:
true if this collection has a child ActionCollection instance which objectName is name .

Definition at line 97 of file actioncollection.cpp.

QIcon ActionCollection::icon (  )  const

Returns:
the icon defined with setIconName() .

Definition at line 87 of file actioncollection.cpp.

QString ActionCollection::iconName (  )  const

Returns:
the name of the icon.

Definition at line 85 of file actioncollection.cpp.

bool ActionCollection::isEnabled (  )  const

Return the enable this ActionCollection has.

Definition at line 89 of file actioncollection.cpp.

QString ActionCollection::name (  )  const

Returns:
the objectName for this ActionCollection.

Definition at line 77 of file actioncollection.cpp.

ActionCollection * ActionCollection::parentCollection (  )  const

Returns:
the parent ActionCollection instance this is child of or NULL oif this collection does not have a parent.

Definition at line 92 of file actioncollection.cpp.

bool ActionCollection::readXml ( QIODevice *  device,
const QDir &  directory = QDir() 
)

Read XML from the QIODevice device .

Definition at line 253 of file actioncollection.cpp.

bool ActionCollection::readXml ( const QDomElement &  element,
const QDir &  directory = QDir() 
)

Load child Action and ActionCollection instances this collection has from the element .

Parameters:
element The QDomElement that contains the XML.
directory The current directory used for relative paths defined within a script-tag for the file-attribute. If the directory is QDir() relative paths are not resolved.
Returns:
true on success else false.

Definition at line 189 of file actioncollection.cpp.

bool ActionCollection::readXmlFile ( const QString &  file  ) 

Read the XML from the file file .

Parameters:
file The existing XML file that should be readed.
Returns:
true if reading was successful else false.

Definition at line 268 of file actioncollection.cpp.

void ActionCollection::registerCollection ( ActionCollection *  collection  )  [protected]

Definition at line 112 of file actioncollection.cpp.

void ActionCollection::removeAction ( Action *  action  ) 

Definition at line 172 of file actioncollection.cpp.

void ActionCollection::removeAction ( const QString &  name  ) 

Definition at line 161 of file actioncollection.cpp.

void ActionCollection::setDescription ( const QString &  description  ) 

Set the optional description for this ActionCollection.

Definition at line 83 of file actioncollection.cpp.

void ActionCollection::setEnabled ( bool  enabled  ) 

Enable or disable this ActionCollection.

Definition at line 90 of file actioncollection.cpp.

void ActionCollection::setIconName ( const QString &  iconname  ) 

Set the name of the icon to iconname .

Definition at line 86 of file actioncollection.cpp.

void ActionCollection::setText ( const QString &  text  ) 

Set the display text to text .

Definition at line 80 of file actioncollection.cpp.

QString ActionCollection::text (  )  const

Returns:
the display text

Definition at line 79 of file actioncollection.cpp.

void ActionCollection::unregisterCollection ( const QString &  name  )  [protected]

Definition at line 123 of file actioncollection.cpp.

void Kross::ActionCollection::updated (  )  [signal]

This signal is emitted if the content of the ActionCollection was changed.

bool ActionCollection::writeXml ( QIODevice *  device,
int  indent = 2 
)

Write XML to the QIODevice device and use a space-idention of indent for the XML.

Definition at line 336 of file actioncollection.cpp.

QDomElement ActionCollection::writeXml (  ) 

Returns:
a QDomElement that represents the child Action and ActionCollection instances this collection has.

Definition at line 296 of file actioncollection.cpp.


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

Kross

Skip menu "Kross"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs 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