RichTextNodeContent Class Reference

A content with formatted text for the Node. More...

#include <richtextnodecontent.h>

Inheritance diagram for RichTextNodeContent:
AbstractNodeContent

List of all members.

Signals

void changed ()

Public Member Functions

 RichTextNodeContent ()
 ~RichTextNodeContent ()
AbstractContentViewgetWidget ()
QHash< QString, QString > * getMetaInfos ()
void addMetaInfo (QString key, QString value)
QString getMimeType ()
bool contains (const QString &value)
void setText (QString text)
QString getText () const
QDomElement getXmlData (QDomDocument &doc)
void setXmlData (QDomElement &xmlNode)
QPixmap getPixmap ()
QIcon getIcon ()
QString toString ()

Detailed Description

A content with formatted text for the Node.

This content contains formatted text with meta infos.

Author:
Manuel Unglaub

Constructor & Destructor Documentation

RichTextNodeContent::RichTextNodeContent (  ) 

The constructor.

Constructs a RichTextNodeContent.

RichTextNodeContent::~RichTextNodeContent (  ) 

The destructor.

Destroys the object.


Member Function Documentation

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

Add a meta info to this content.

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

Implements AbstractNodeContent.

void RichTextNodeContent::changed (  )  [signal]

This signal will be emitted after calling addMetaInfo() and setText().

bool RichTextNodeContent::contains ( const QString &  value  )  [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.

Implements AbstractNodeContent.

QIcon RichTextNodeContent::getIcon (  )  [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()

Implements AbstractNodeContent.

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

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

Returns:
The meta infos of this content.

Implements AbstractNodeContent.

QString RichTextNodeContent::getMimeType (  )  [virtual]

Get the mimetype of this content.

Returns:
The mimetype of this content.

Implements AbstractNodeContent.

QPixmap RichTextNodeContent::getPixmap (  )  [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()

Implements AbstractNodeContent.

QString RichTextNodeContent::getText (  )  const

Get the text of this RichTextNodeContent.

Returns:
The text of this RichTextNodeContent.
See also:
setText()
AbstractContentView * RichTextNodeContent::getWidget (  )  [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.

Implements AbstractNodeContent.

QDomElement RichTextNodeContent::getXmlData ( QDomDocument &  doc  )  [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()

Implements AbstractNodeContent.

void RichTextNodeContent::setText ( QString  text  ) 

Set the text of this RichTextNodeContent.

Parameters:
text The text that will be assigned to this RichTextNodeContent.
See also:
getText()
void RichTextNodeContent::setXmlData ( QDomElement &  xmlNode  )  [virtual]

Initialize this content with the data provided by the QDomElement.

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

Implements AbstractNodeContent.

QString RichTextNodeContent::toString (  )  [virtual]

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

Returns:
The content as a QString.

Implements AbstractNodeContent.


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