An abstract base for the Node contents. More...
#include <abstractnodecontent.h>
Public Member Functions | |
virtual AbstractContentView * | getWidget ()=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 |
An abstract base for the Node contents.
This abstract class provides an interface for the contents of the Node.
virtual void AbstractNodeContent::addMetaInfo | ( | QString | key, | |
QString | value | |||
) | [pure virtual] |
Add a meta info to this content.
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.
value | The QString to look for in this content. |
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.
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.
Implemented in RichTextNodeContent, and TextNodeContent.
virtual QString AbstractNodeContent::getMimeType | ( | ) | [pure virtual] |
Get 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.
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.
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.
doc | The QDomDocument to create the xml elements. |
Implemented in RichTextNodeContent, and TextNodeContent.
virtual void AbstractNodeContent::setXmlData | ( | QDomElement & | xmlNode | ) | [pure virtual] |
Initialize this content with the data provided by the QDomElement.
xmlNode | The QDomElement containing the data for this content. |
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.
Implemented in RichTextNodeContent, and TextNodeContent.