The TreeItem class is an item in a tree. It can be attached to a TreeNode. More...
#include <TreeItem.h>
Public Member Functions | |
IExportable::ExportResultFlags | exportBinary (QDataStream &stream) const |
Allows exporting to a QDataStream. | |
IExportable::ExportResultFlags | exportXml (QDomDocument *doc, QDomElement *object_node) const |
Allows exporting to an XML document. A reference to the QDomElement to which the object's information must be added is provided, along with a reference to the QDomDocument. | |
IExportable::ExportResultFlags | importBinary (QDataStream &stream, QList< QPointer< QObject > > &import_list) |
Allows importing and reconstruction of the object state from information provided in a QDataStream. | |
IExportable::ExportResultFlags | importXml (QDomDocument *doc, QDomElement *object_node, QList< QPointer< QObject > > &import_list) |
Allows importing and reconstruction of data from information provided in a XML document. A reference to the QDomElement which contains the object's information is provided, along with a reference to the QDomDocument. | |
InstanceFactoryInfo | instanceFactoryInfo () const |
The instance factory information which must be used when the exported object is reconstructed during an import. | |
ExportModeFlags | supportedFormats () const |
Provides information about the export format(s) supported by your implementation of IExportable. | |
Public Member Functions inherited from Qtilities::CoreGui::TreeItemBase | |
virtual QtilitiesCategory | getCategory (TreeNode *tree_node) const |
Gets the category of the tree item in the specified tree node. | |
virtual QtilitiesCategory | getCategory (int observer_id=-1) const |
Gets the category of the tree item in the context specified by the given observer ID. | |
virtual QString | getCategoryString (const QString &sep="::", int observer_id=-1) const |
Gets the category in a string format where different hierarchies of the category is split using sep . | |
virtual bool | hasCategory () const |
Checks if the item has a category. | |
virtual bool | isModified () const |
Indicates the modification state of the object. | |
QObject * | objectBase () |
Returns the QObject* base of the interface. | |
const QObject * | objectBase () const |
Returns a const QObject* base of the interface. | |
virtual bool | removeCategory (int observer_id=-1) |
virtual bool | setCategory (const QtilitiesCategory &category, TreeNode *tree_node) |
virtual bool | setCategory (const QtilitiesCategory &category, int observer_id=-1) |
virtual bool | setCategoryString (const QString &category_string, const QString &sep="::") |
TreeItemBase (const QString &name=QString(), QObject *parent=0) | |
Constructs the base of a tree item. | |
Public Member Functions inherited from Qtilities::CoreGui::AbstractTreeItem | |
Qt::AlignmentFlag | getAlignment () const |
Gets the alignement of the tree item. | |
QColor | getBackgroundColor () const |
Gets the background color of the tree item. | |
QBrush | getBackgroundRole () const |
Gets the background role of the tree item. | |
QFont | getFont () const |
Gets the font of the tree item. | |
QColor | getForegroundColor () const |
Gets the foreground color of the tree item. | |
QBrush | getForegroundRole () const |
Gets the foreground role of the tree item. | |
QIcon | getIcon () const |
Gets the icon of the tree item. | |
QString | getName (TreeNode *parent=0) const |
Function to get the name of this tree item. | |
QSize | getSizeHint () const |
Gets the size hint of the tree item. | |
QString | getStatusTip () const |
Gets the status tip of the tree item. | |
QString | getToolTip () const |
Gets the tool tip of the tree item. | |
QString | getWhatsThis () const |
Gets the what's this text of the tree item. | |
bool | hasAlignment () const |
Checks if the item has a font. | |
bool | hasBackgroundRole () const |
Checks if the item has a background role. | |
bool | hasFont () const |
Checks if the item has a font. | |
bool | hasForegroundRole () const |
Checks if the item has a foreground role. | |
bool | hasIcon () const |
Checks if the item has an icon. | |
bool | hasSizeHint () const |
Checks if the item has a size hint. | |
bool | hasStatusTip () const |
Checks if the item has status tip text. | |
bool | hasToolTip () const |
Checks if the item has a tool tip. | |
bool | hasWhatsThis () const |
Checks if the item has what's this text. | |
void | setAlignment (const Qt::AlignmentFlag &alignment) |
Sets the alignment of the tree item. | |
void | setBackgroundColor (const QColor &color) |
Sets the background color of the tree item. | |
void | setBackgroundRole (const QBrush &background_role) |
Sets the background role of the tree item. | |
void | setFont (const QFont &font) |
Sets the font of the tree item. | |
void | setForegroundColor (const QColor &color) |
Sets the foreground color of the tree item. | |
void | setForegroundRole (const QBrush &foreground_role) |
Sets the foreground role of the tree item. | |
void | setIcon (const QIcon &icon) |
Sets the icon of the tree item. | |
bool | setName (const QString &new_name, Observer *parent=0) |
Function to set the name of this tree item. | |
void | setSizeHint (const QSize &size) |
Sets the size hint of the tree item. | |
void | setStatusTip (const QString &status_tip) |
Sets the status tip of the tree item. | |
void | setToolTip (const QString &tooltip) |
Sets the tool tip of the tree item. | |
void | setWhatsThis (const QString &whats_this) |
Sets the what's this text of the tree item. | |
Public Member Functions inherited from Qtilities::Core::Interfaces::IModificationNotifier | |
virtual void | setModificationState (bool new_state, NotificationTargets notification_targets=NotifyListeners, bool force_notifications=false)=0 |
Sets the modification state of the object. Returns true if it was successfull. | |
Public Member Functions inherited from Qtilities::Core::Interfaces::IObjectBase | |
QString | objectOriginID () const |
Allows interfaces to provide some sort of source identification. | |
void | setObjectOriginID (const QString &object_origin_id) |
Allows setting of the object source ID of this interface implementation. | |
Public Member Functions inherited from Qtilities::Core::Interfaces::IExportable | |
quint32 | applicationExportVersion () const |
Returns the application export version currently used by all your application's classes. | |
virtual void | clearExportTask () |
Clears the export task. | |
IExportable * | duplicate (QString *error_msg=0, int properties_to_copy=0, ExportResultFlags *result_flags=0) const |
Function which will create a duplicate (copy) of this object. | |
virtual ITask * | exportTask () const |
Gets the task which must be used to log import/export information to. | |
Qtilities::ExportVersion | exportVersion () const |
Returns the export version currently used by all Qtilities classes. | |
bool | isExportable () const |
Gets if this object must be part of it's parents' exports. | |
virtual void | setApplicationExportVersion (quint32 version) |
Sets the application export version currently used by all your application's classes. | |
virtual void | setExportTask (ITask *task) |
Sets the task which must be used to log import/export information to. | |
virtual void | setExportVersion (Qtilities::ExportVersion version) |
Returns the export version currently used by all Qtilities classes. | |
virtual void | setIsExportable (bool new_is_exportable) |
Sets if this object must be part of it's parents' exports. |
Additional Inherited Members | |
Signals inherited from Qtilities::CoreGui::TreeItemBase | |
void | modificationStateChanged (bool is_modified) const |
Implement this function as a signal when implementing the object. |
The TreeItem class is an item in a tree. It can be attached to a TreeNode.
This class was added in Qtilities v0.2.
|
virtual |
Allows exporting to a QDataStream.
See Serializing Qtilities Data Types Overview for more information about the expected output format.
stream | A reference to the QDataStream to which the object's information must be appended is provided. |
Reimplemented from Qtilities::Core::Interfaces::IExportable.
|
virtual |
Allows exporting to an XML document. A reference to the QDomElement to which the object's information must be added is provided, along with a reference to the QDomDocument.
See Serializing Qtilities Data Types Overview for more information about the expected output format.
Reimplemented from Qtilities::Core::Interfaces::IExportable.
|
virtual |
Allows importing and reconstruction of the object state from information provided in a QDataStream.
See Serializing Qtilities Data Types Overview for more information about the expected output format.
stream | The QDataStream which contains the object's information. |
import_list | All objects constructed during the import operation must be added to the import list. When the operation fails, all objects in this list will be deleted. |
Reimplemented from Qtilities::Core::Interfaces::IExportable.
|
virtual |
Allows importing and reconstruction of data from information provided in a XML document. A reference to the QDomElement which contains the object's information is provided, along with a reference to the QDomDocument.
See Serializing Qtilities Data Types Overview for more information about the expected output format.
Reimplemented from Qtilities::Core::Interfaces::IExportable.
|
virtual |
The instance factory information which must be used when the exported object is reconstructed during an import.
For more information see The IExportable interface, what does it have to do with factories?.
Reimplemented from Qtilities::Core::Interfaces::IExportable.
|
virtual |
Provides information about the export format(s) supported by your implementation of IExportable.
Reimplemented from Qtilities::Core::Interfaces::IExportable.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|