The AbstractTreeItem is an abstract base class which can be used to build tree items. More...
#include <AbstractTreeItem.h>
Public Member Functions | |
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. | |
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 . | |
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. | |
virtual bool | hasCategory () const |
Checks if the item has a category. | |
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. | |
virtual bool | removeCategory (int observer_id=-1) |
Removes the current category of this tree item for the specified observer context. | |
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. | |
virtual bool | setCategory (const QtilitiesCategory &category, TreeNode *tree_node) |
Sets the category of the tree item in the specified tree node. | |
virtual bool | setCategory (const QtilitiesCategory &category, int observer_id=-1) |
Sets the category of the tree item in the context specified by the given observer ID. | |
virtual bool | setCategoryString (const QString &category_string, const QString &sep="::") |
Sets the category in a string format where different hierarchies of the category is split using sep . | |
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. |
Protected Member Functions | |
IExportable::ExportResultFlags | saveFormattingToXML (QDomDocument *doc, QDomElement *object_node, Qtilities::ExportVersion version) const |
The AbstractTreeItem is an abstract base class which can be used to build tree items.
This class was added in Qtilities v0.2.
QColor Qtilities::CoreGui::AbstractTreeItem::getBackgroundColor | ( | ) | const |
Gets the background color of the tree item.
|
virtual |
Gets the category of the tree item in the specified tree node.
tree_node | The node context for which the category must be obtained for. |
Reimplemented in Qtilities::CoreGui::TreeItemBase.
|
virtual |
Gets the category of the tree item in the context specified by the given observer ID.
observer_id | The observer ID of the context for which the category must be obtained for. When -1, the function will find the parent in the following way:
|
If none of the above conditions were met the function will print an error message.
Reimplemented in Qtilities::CoreGui::TreeItemBase.
|
virtual |
Gets the category in a string format where different hierarchies of the category is split using sep
.
observer_id | The observer ID of the context for which the category must be obtained for. When -1, the function will find the parent in the following way:
|
If none of the above conditions were met the function will print an error message.
Reimplemented in Qtilities::CoreGui::TreeItemBase.
QColor Qtilities::CoreGui::AbstractTreeItem::getForegroundColor | ( | ) | const |
Gets the foreground color of the tree item.
QString Qtilities::CoreGui::AbstractTreeItem::getName | ( | TreeNode * | parent = 0 | ) | const |
Function to get the name of this tree item.
parent | The name of the parent node which provides the context in which we want to get the name. By default gets the objectName(). If a parent is specified which does not contain this item, QString() is returned. |
|
virtual |
Removes the current category of this tree item for the specified observer context.
If no context is specified, the complete multi context category property is removed.
Reimplemented in Qtilities::CoreGui::TreeItemBase.
|
protected |
This function will add a formatting node to object_node
with the formatting information of this item. At present the following information is part of the formatting export:
The following information is not part of the formatting export:
void Qtilities::CoreGui::AbstractTreeItem::setBackgroundColor | ( | const QColor & | color | ) |
Sets the background color of the tree item.
|
virtual |
Sets the category of the tree item in the specified tree node.
Reimplemented in Qtilities::CoreGui::TreeNode, and Qtilities::CoreGui::TreeItemBase.
|
virtual |
Sets the category of the tree item in the context specified by the given observer ID.
observer_id | The observer ID of the context for which the category must be obtained for. When -1, the function will find the parent in the following way:
|
If none of the above conditions were met the function will print an error message in release mode and assert in debug mode.
Reimplemented in Qtilities::CoreGui::TreeNode, and Qtilities::CoreGui::TreeItemBase.
|
virtual |
Sets the category in a string format where different hierarchies of the category is split using sep
.
Reimplemented in Qtilities::CoreGui::TreeItemBase.
void Qtilities::CoreGui::AbstractTreeItem::setForegroundColor | ( | const QColor & | color | ) |
Sets the foreground color of the tree item.
bool Qtilities::CoreGui::AbstractTreeItem::setName | ( | const QString & | new_name, |
Observer * | parent = 0 |
||
) |
Function to set the name of this tree item.
parent | The name of the parent node which provides the context in which we want to set the name. |
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|