Class overview   Alphabetical list   Annotated list   Header Files   Member List  

TreeNode Class Reference


This is a class for internal use. It is used by the TreeWidget class to hold data for the nodes in the tree More...

#include <tree.h>

List of all member functions.

Public Members

Private Members


Detailed Description

This is a class for internal use. It is used by the TreeWidget class to hold data for the nodes in the tree

This class is used by the TreeWidget to implement the tree nodes. It can be used to get information on the data, text and pixmap information of this node.

The treenode provides some functionality which is only available to the TreeWidget class. This is necessary to shield users of the TreeNode from functionality they do not require.

See also: TreeWidget


Member Function Documentation

TreeNode::TreeNode(const char *txt, QPixmap *pic, void *data)

Constructs a TreeNode

TreeNode::~TreeNode()

Destroys a TreeNode

void TreeNode::setHighlighted(bool val)

Set the highlighted attribute of a TreeNode.

bool TreeNode::highlighted()

Returns the highlighted attribute of a TreeNode.

void TreeNode::setExpanded(bool val)

Set the expanded attribute of a TreeNode.

bool TreeNode::expanded()

Returns the expanded attribute of a TreeNode.

void TreeNode::setText(const char *txt)

Sets the text that will be drawn in the TreeNode.

const char *TreeNode::text()

Returns the text that is drawn in the TreeNode.

void TreeNode::setPixmap(QPixmap *pic)

Sets the pixmap that will be drawn in the TreeNode. If pic is 0, no pixmap will be drawn.

QPixmap *TreeNode::pixmap()

Returns the pixmap that is use to draw the TreeNode.

void TreeNode::setData(void *data)

Sets the data associated with the TreeNode.

void *TreeNode::data()

Returns the data associated with the TreeNode.

void TreeNode::draw(QPaintDevice *dev, int x, int y) [private]

Draw a treenode on paintdevice dev at coordinates x, y. The node is drawn on a dark background if the node is highlighted.

void TreeNode::setLevel(int val) [private]

Set the indentation level of the TreeNode.

int TreeNode::level() [private]

Returns the indentation level of the TreeNode.

QRect TreeNode::rect() [private]

Returns the rectangle occupied by the treeNode. The coordinates are relative to the upper left corner of the screen area.


Member Variable Documentation

bool TreeNode::_highlighted [private]

Flag for highlighting

bool TreeNode::_expanded [private]

Flag for expanding

int TreeNode::_level [private]

Indentation level for this node. Used by TreeNode::draw

QPixmap* TreeNode::_pic [private]

Pixmap data for this node.

QString TreeNode::_txt [private]

Text data for this node.

void* TreeNode::_data [private]

Data associated to this node

QRect TreeNode::_rect [private]

The on-screen rectangle occupied by this node


This file was generated from the following files:
Generated at 14:38, 1998/04/17 for Ebuilder by doxygen  written by Dimitri van Heesch, © 1997-1998