TextNodeContent Class Reference

A text content with syntax informations for the Node. More...

#include <textnodecontent.h>

Inheritance diagram for TextNodeContent:
AbstractNodeContent

List of all members.

Signals

void changed ()

Public Member Functions

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

Detailed Description

A text content with syntax informations for the Node.

This content contains plain text with meta infos and a syntax information wich is part of the meta infos.

Author:
Manuel Unglaub

Constructor & Destructor Documentation

TextNodeContent::TextNodeContent (  ) 

The constructor.

Constructs a TextNodeContent.

TextNodeContent::~TextNodeContent (  ) 

The destructor.

Destroys the object.


Member Function Documentation

void TextNodeContent::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 TextNodeContent::changed (  )  [signal]

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

bool TextNodeContent::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 TextNodeContent::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 > * TextNodeContent::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 TextNodeContent::getMimeType (  )  [virtual]

Get the mimetype of this content.

Returns:
The mimetype of this content.

Implements AbstractNodeContent.

QPixmap TextNodeContent::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 TextNodeContent::getText (  )  const

Get the text of this TextNodeContent.

Returns:
The text of this TextNodeContent.
See also:
setText()
AbstractContentView * TextNodeContent::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 TextNodeContent::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 TextNodeContent::setSyntax ( QString  syntax  ) 

Set the syntax of this TextNodeContent.

Parameters:
syntax The syntax that will be assigned to this TextNodeContent.
See also:
TextEdit::setSyntax()
void TextNodeContent::setText ( QString  text  ) 

Set the text of this TextNodeContent.

Parameters:
text The text that will be assigned to this TextNodeContent.
See also:
getText()
void TextNodeContent::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 TextNodeContent::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:53 2010 for Silence by  doxygen 1.6.3