A content with formatted text for the Node. More...
#include <richtextnodecontent.h>
Signals | |
void | changed () |
Public Member Functions | |
RichTextNodeContent () | |
~RichTextNodeContent () | |
AbstractContentView * | getWidget () |
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 () |
A content with formatted text for the Node.
This content contains formatted text with meta infos.
RichTextNodeContent::RichTextNodeContent | ( | ) |
The constructor.
Constructs a RichTextNodeContent.
RichTextNodeContent::~RichTextNodeContent | ( | ) |
The destructor.
Destroys the object.
void RichTextNodeContent::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 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.
value | The QString to look for in this content. |
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.
Implements AbstractNodeContent.
QHash< QString, QString > * RichTextNodeContent::getMetaInfos | ( | ) | [virtual] |
Get the meta infos of this content. The meta infos are key value pairs.
Implements AbstractNodeContent.
QString RichTextNodeContent::getMimeType | ( | ) | [virtual] |
Get 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.
Implements AbstractNodeContent.
QString RichTextNodeContent::getText | ( | ) | const |
Get the text of this RichTextNodeContent.
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.
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.
doc | The QDomDocument to create the xml elements. |
Implements AbstractNodeContent.
void RichTextNodeContent::setText | ( | QString | text | ) |
Set the text of this RichTextNodeContent.
text | The text that will be assigned to this RichTextNodeContent. |
void RichTextNodeContent::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 RichTextNodeContent::toString | ( | ) | [virtual] |
Transform the content to a QString. This string should only contain plain text information.
Implements AbstractNodeContent.