#include <namedqvarianttreeitem.h>
Public Member Functions | |
NamedQVariantTreeItem (QString, QVariant, AbstractTreeItem *=0) | |
Constructs a new named QVariant as child of the parent AbstractTreeItem. | |
NamedQVariantTreeItem (NamedQVariantTreeItem &, AbstractTreeItem *=0) | |
Constructs a recursiv copy of the given NamedQVariantTreeItem as a child of the parent NamedQVariantTreeItem. | |
NamedQVariantTreeItem (NamedQVariantTreeItem *, AbstractTreeItem *) | |
~NamedQVariantTreeItem () | |
Deconstructor. | |
NamedQVariantTreeItem * | getQVariant (QString) |
Returns a child QVariant by path. | |
void | addQVariant (QString, QVariant) |
Adds a QVariant as a named child. | |
void | setValue (QVariant) |
Set the value from a QVariant. | |
Private Member Functions | |
QString | debug () const |
Return debug-info for this item. | |
Related Functions | |
(Note that these are not member functions.) | |
QDataStream & | operator<< (QDataStream &, const NamedQVariantTreeItem *) |
Operator to store a NamedQVariantTreeItem in a QDataStream. | |
QDataStream & | operator>> (QDataStream &, NamedQVariantTreeItem *) |
Operator to restore a NamedQVariantTreeItem from a QDataStream. |
This class complements NamedParameterTreeItem. It also stores values but has no signals or slots for manipulating and therefor no dependency on QObject which makes it great for results that aren't changed from various threads and guis.
NSCore::NamedQVariantTreeItem::NamedQVariantTreeItem | ( | QString | , | |
QVariant | , | |||
AbstractTreeItem * | = 0 | |||
) |
Constructs a new named QVariant as child of the parent AbstractTreeItem.
NSCore::NamedQVariantTreeItem::NamedQVariantTreeItem | ( | NamedQVariantTreeItem & | , | |
AbstractTreeItem * | = 0 | |||
) |
Constructs a recursiv copy of the given NamedQVariantTreeItem as a child of the parent NamedQVariantTreeItem.
NSCore::NamedQVariantTreeItem::NamedQVariantTreeItem | ( | NamedQVariantTreeItem * | , | |
AbstractTreeItem * | ||||
) |
NSCore::NamedQVariantTreeItem::~NamedQVariantTreeItem | ( | ) |
Deconstructor.
NamedQVariantTreeItem* NSCore::NamedQVariantTreeItem::getQVariant | ( | QString | ) |
Returns a child QVariant by path.
void NSCore::NamedQVariantTreeItem::addQVariant | ( | QString | , | |
QVariant | ||||
) |
Adds a QVariant as a named child.
void NSCore::NamedQVariantTreeItem::setValue | ( | QVariant | ) |
Set the value from a QVariant.
QVariant is missing one very important function: setting the value from another QVariant! But only if the types are the same...
QString NSCore::NamedQVariantTreeItem::debug | ( | ) | const [inline, private, virtual] |
Return debug-info for this item.
This has to be implemented by the implementations to print class- specific information in debugPrint().
Implements NSCore::AbstractTreeItem.
References NSCore::AbstractTreeItem::name().
QDataStream & operator<< | ( | QDataStream & | , | |
const NamedQVariantTreeItem * | ||||
) | [related] |
Operator to store a NamedQVariantTreeItem in a QDataStream.
QDataStream & operator>> | ( | QDataStream & | , | |
NamedQVariantTreeItem * | ||||
) | [related] |
Operator to restore a NamedQVariantTreeItem from a QDataStream.