#include <qtreeitem.h>
Public Member Functions | |
QTreeItemPointer (QTreeItem *object, QTreeItem *parent=0) | |
Constructor. | |
void | setNull () |
virtual void | itemDeleted () |
The item pointed to is deleted. | |
virtual void | newChildAdded (QTreeItem *) |
A new child was added. | |
QVariant | guiValue () const |
Forwards to access the pointed-items functions. | |
void | guiSetValue (QVariant n) |
Forwards to access the pointed-items functions. | |
QStringList | guiActions () const |
Forwards to access the pointed-items functions. | |
void | guiExecAction (QString action, GuiServer_Interface *gui) |
Forwards to access the pointed-items functions. | |
QVariant | guiIdentifier (int role) const |
Forwards to access the pointed-items functions. | |
Qt::ItemFlags | guiFlags () const |
Forwards to access the pointed-items functions. | |
Private Member Functions | |
QDomNode | saveToXML (QDomDocument) |
Store the information of this element into a new QDomElement. | |
bool | restoreFromXML (QDomNode) |
Restore the state of this element from the given QDomNode. |
This is mostly an extension to the pointer-template but introduces two new functions to derive of.
Constructor.
void NSCore::QTreeItemPointer::setNull | ( | ) | [inline, virtual] |
virtual void NSCore::QTreeItemPointer::itemDeleted | ( | ) | [inline, virtual] |
The item pointed to is deleted.
Implement this functions if you want to be notified of the deletion of the item pointed to. Better not use the item anymore, with threads it can be that the item is already deleted.
Reimplemented in NSCore::QTreeItemNode.
Referenced by setNull().
virtual void NSCore::QTreeItemPointer::newChildAdded | ( | QTreeItem * | ) | [inline, virtual] |
A new child was added.
This signals that a new child was added to the item pointed to. Can be used to create the new pointer to the new child.
Reimplemented from NSCore::QTreeItem.
Reimplemented in NSCore::QTreeItemNode.
QVariant NSCore::QTreeItemPointer::guiValue | ( | ) | const [inline, virtual] |
Forwards to access the pointed-items functions.
Reimplemented from NSCore::QTreeItem.
References NSCore::Pointer_template< T >::_p.
void NSCore::QTreeItemPointer::guiSetValue | ( | QVariant | n | ) | [inline, virtual] |
Forwards to access the pointed-items functions.
Reimplemented from NSCore::QTreeItem.
References NSCore::Pointer_template< T >::_p.
QStringList NSCore::QTreeItemPointer::guiActions | ( | ) | const [inline, virtual] |
Forwards to access the pointed-items functions.
Reimplemented from NSCore::QTreeItem.
References NSCore::Pointer_template< T >::_p.
void NSCore::QTreeItemPointer::guiExecAction | ( | QString | action, | |
GuiServer_Interface * | gui | |||
) | [inline, virtual] |
Forwards to access the pointed-items functions.
Reimplemented from NSCore::QTreeItem.
References NSCore::Pointer_template< T >::_p.
QVariant NSCore::QTreeItemPointer::guiIdentifier | ( | int | role | ) | const [inline, virtual] |
Forwards to access the pointed-items functions.
Reimplemented from NSCore::QTreeItem.
References NSCore::Pointer_template< T >::_p.
Qt::ItemFlags NSCore::QTreeItemPointer::guiFlags | ( | ) | const [inline, virtual] |
Forwards to access the pointed-items functions.
Reimplemented from NSCore::QTreeItem.
References NSCore::Pointer_template< T >::_p.
QDomNode NSCore::QTreeItemPointer::saveToXML | ( | QDomDocument | doc | ) | [inline, private, virtual] |
Store the information of this element into a new QDomElement.
This function is only to save the state of this element, all the recursive stuff will be done by toXml().
doc | The QDomDocument to use for creation of the element |
Implements NSCore::QTreeItem.
bool NSCore::QTreeItemPointer::restoreFromXML | ( | QDomNode | node | ) | [inline, private, virtual] |
Restore the state of this element from the given QDomNode.
You don't have to do the recursive stuff here, that is handled in fromXml() for you. Only the things done in saveToXML need/can be restored here.
If you succeeded and want the childs to be restored too, return true.
node | The QDomNode to restore from |
Implements NSCore::QTreeItem.