A text content with syntax informations for the Node. More...
#include <textnodecontent.h>
Signals | |
void | changed () |
Public Member Functions | |
TextNodeContent () | |
~TextNodeContent () | |
void | setText (QString text) |
QString | getText () const |
QDomElement | getXmlData (QDomDocument &doc) |
void | setXmlData (QDomElement &xmlNode) |
AbstractContentView * | getWidget () |
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 () |
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.
TextNodeContent::TextNodeContent | ( | ) |
The constructor.
Constructs a TextNodeContent.
TextNodeContent::~TextNodeContent | ( | ) |
The destructor.
Destroys the object.
void TextNodeContent::addMetaInfo | ( | QString | key, | |
QString | value | |||
) | [virtual] |
Add a meta info to this content.
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.
value | The QString to look for in this content. |
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.
Implements AbstractNodeContent.
QHash< QString, QString > * TextNodeContent::getMetaInfos | ( | ) | [virtual] |
Get the meta infos of this content. The meta infos are key value pairs.
Implements AbstractNodeContent.
QString TextNodeContent::getMimeType | ( | ) | [virtual] |
Get 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.
Implements AbstractNodeContent.
QString TextNodeContent::getText | ( | ) | const |
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.
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.
doc | The QDomDocument to create the xml elements. |
Implements AbstractNodeContent.
void TextNodeContent::setSyntax | ( | QString | syntax | ) |
Set the syntax of this TextNodeContent.
syntax | The syntax that will be assigned to this TextNodeContent. |
void TextNodeContent::setText | ( | QString | text | ) |
Set the text of this TextNodeContent.
text | The text that will be assigned to this TextNodeContent. |
void TextNodeContent::setXmlData | ( | QDomElement & | xmlNode | ) | [virtual] |
Initialize this content with the data provided by the QDomElement.
xmlNode | The QDomElement containing the data for this content. |
Implements AbstractNodeContent.
QString TextNodeContent::toString | ( | ) | [virtual] |
Transform the content to a QString. This string should only contain plain text information.
Implements AbstractNodeContent.