AbstractNodeContent Class Reference

An abstract base for the Node contents. More...

#include <abstractnodecontent.h>

Inheritance diagram for AbstractNodeContent:
RichTextNodeContent TextNodeContent

List of all members.

Public Member Functions

virtual AbstractContentViewgetWidget ()=0
virtual QHash< QString, QString > * getMetaInfos ()=0
virtual void addMetaInfo (QString key, QString value)=0
virtual QString getMimeType ()=0
virtual bool contains (const QString &value)=0
virtual QDomElement getXmlData (QDomDocument &doc)=0
virtual void setXmlData (QDomElement &xmlNode)=0
virtual QPixmap getPixmap ()=0
virtual QIcon getIcon ()=0
virtual QString toString ()=0

Detailed Description

An abstract base for the Node contents.

This abstract class provides an interface for the contents of the Node.

Author:
Manuel Unglaub

Member Function Documentation

virtual void AbstractNodeContent::addMetaInfo ( QString  key,
QString  value 
) [pure virtual]

Add a meta info to this content.

Parameters:
key The key of the meta info.
value The value of the meta info.

Implemented in RichTextNodeContent, and TextNodeContent.

virtual bool AbstractNodeContent::contains ( const QString &  value  )  [pure virtual]

Find out if the content contains a specific string.

Parameters:
value The QString to look for in this content.
Returns:
True if the content contains the string.

Implemented in RichTextNodeContent, and TextNodeContent.

virtual QIcon AbstractNodeContent::getIcon (  )  [pure virtual]

Get an icon as a QIcon to indicate the type of the content. The icon should be the size of 64x64 pixel. It should also be similar to the icon provided by the get Pixmap() function.

Returns:
A icon which indicates the type of the content.
See also:
getPixmap()

Implemented in RichTextNodeContent, and TextNodeContent.

virtual QHash<QString, QString>* AbstractNodeContent::getMetaInfos (  )  [pure virtual]

Get the meta infos of this content. The meta infos are key value pairs.

Returns:
The meta infos of this content.

Implemented in RichTextNodeContent, and TextNodeContent.

virtual QString AbstractNodeContent::getMimeType (  )  [pure virtual]

Get the mimetype of this content.

Returns:
The mimetype of this content.

Implemented in RichTextNodeContent, and TextNodeContent.

virtual QPixmap AbstractNodeContent::getPixmap (  )  [pure virtual]

Get an icon as a QPixmap to indicate the type of the content. The Pixmap should be the size of 16x16 pixel. It should also be similar to the icon provided by the getIcon() function.

Returns:
A pixmap which indicates the type of the content.
See also:
getIcon()

Implemented in RichTextNodeContent, and TextNodeContent.

virtual AbstractContentView* AbstractNodeContent::getWidget (  )  [pure virtual]

Get a widget to view and modify this content. The content will configure the widget properly for its needs and fill it with the necessary data.

Returns:
A widget to view and modify this content.

Implemented in RichTextNodeContent, and TextNodeContent.

virtual QDomElement AbstractNodeContent::getXmlData ( QDomDocument &  doc  )  [pure virtual]

Creates a QDomElemet which contains the data of this content. Only the main part of the data, not the meta infos.

Parameters:
doc The QDomDocument to create the xml elements.
Returns:
The QDomElement which contains the data of this content.
See also:
setXmlData()

Implemented in RichTextNodeContent, and TextNodeContent.

virtual void AbstractNodeContent::setXmlData ( QDomElement &  xmlNode  )  [pure virtual]

Initialize this content with the data provided by the QDomElement.

Parameters:
xmlNode The QDomElement containing the data for this content.
See also:
getXmlData()

Implemented in RichTextNodeContent, and TextNodeContent.

virtual QString AbstractNodeContent::toString (  )  [pure virtual]

Transform the content to a QString. This string should only contain plain text information.

Returns:
The content as a QString.

Implemented in RichTextNodeContent, and TextNodeContent.


The documentation for this class was generated from the following file:
Generated on Fri May 14 19:12:51 2010 for Silence by  doxygen 1.6.3