~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qtreewidgetitem.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/itemviews/qtreewidget.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QTreeWidgetItem Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QTreeWidgetItem Class Reference</h1>
 
21
<p>The QTreeWidgetItem class provides an item for use with the <a href="qtreewidget.html">QTreeWidget</a> convenience class. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QTreeWidgetItem&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<ul>
 
24
<li><a href="qtreewidgetitem-members.html">List of all members, including inherited members</a></li>
 
25
</ul>
 
26
<a name="public-functions"></a>
 
27
<h3>Public Functions</h3>
 
28
<ul>
 
29
<li><div class="fn"/><b><a href="qtreewidgetitem.html#QTreeWidgetItem">QTreeWidgetItem</a></b> ( int <i>type</i> = Type )</li>
 
30
<li><div class="fn"/><b><a href="qtreewidgetitem.html#QTreeWidgetItem-2">QTreeWidgetItem</a></b> ( QTreeWidget * <i>parent</i>, int <i>type</i> = Type )</li>
 
31
<li><div class="fn"/><b><a href="qtreewidgetitem.html#QTreeWidgetItem-3">QTreeWidgetItem</a></b> ( QTreeWidget * <i>parent</i>, QTreeWidgetItem * <i>preceding</i>, int <i>type</i> = Type )</li>
 
32
<li><div class="fn"/><b><a href="qtreewidgetitem.html#QTreeWidgetItem-4">QTreeWidgetItem</a></b> ( QTreeWidgetItem * <i>parent</i>, int <i>type</i> = Type )</li>
 
33
<li><div class="fn"/><b><a href="qtreewidgetitem.html#QTreeWidgetItem-5">QTreeWidgetItem</a></b> ( QTreeWidgetItem * <i>parent</i>, QTreeWidgetItem * <i>preceding</i>, int <i>type</i> = Type )</li>
 
34
<li><div class="fn"/>virtual <b><a href="qtreewidgetitem.html#dtor.QTreeWidgetItem">~QTreeWidgetItem</a></b> ()</li>
 
35
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#addChild">addChild</a></b> ( QTreeWidgetItem * <i>child</i> )</li>
 
36
<li><div class="fn"/>QColor <b><a href="qtreewidgetitem.html#backgroundColor">backgroundColor</a></b> ( int <i>column</i> ) const</li>
 
37
<li><div class="fn"/>Qt::CheckState <b><a href="qtreewidgetitem.html#checkState">checkState</a></b> ( int <i>column</i> ) const</li>
 
38
<li><div class="fn"/>QTreeWidgetItem * <b><a href="qtreewidgetitem.html#child">child</a></b> ( int <i>index</i> ) const</li>
 
39
<li><div class="fn"/>int <b><a href="qtreewidgetitem.html#childCount">childCount</a></b> () const</li>
 
40
<li><div class="fn"/>virtual QTreeWidgetItem * <b><a href="qtreewidgetitem.html#clone">clone</a></b> () const</li>
 
41
<li><div class="fn"/>int <b><a href="qtreewidgetitem.html#columnCount">columnCount</a></b> () const</li>
 
42
<li><div class="fn"/>virtual QVariant <b><a href="qtreewidgetitem.html#data">data</a></b> ( int <i>column</i>, int <i>role</i> ) const</li>
 
43
<li><div class="fn"/>Qt::ItemFlags <b><a href="qtreewidgetitem.html#flags">flags</a></b> () const</li>
 
44
<li><div class="fn"/>QFont <b><a href="qtreewidgetitem.html#font">font</a></b> ( int <i>column</i> ) const</li>
 
45
<li><div class="fn"/>QIcon <b><a href="qtreewidgetitem.html#icon">icon</a></b> ( int <i>column</i> ) const</li>
 
46
<li><div class="fn"/>int <b><a href="qtreewidgetitem.html#indexOfChild">indexOfChild</a></b> ( QTreeWidgetItem * <i>child</i> ) const</li>
 
47
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#insertChild">insertChild</a></b> ( int <i>index</i>, QTreeWidgetItem * <i>child</i> )</li>
 
48
<li><div class="fn"/>QTreeWidgetItem * <b><a href="qtreewidgetitem.html#parent">parent</a></b> () const</li>
 
49
<li><div class="fn"/>virtual void <b><a href="qtreewidgetitem.html#read">read</a></b> ( QDataStream &amp; <i>in</i> )</li>
 
50
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#setBackgroundColor">setBackgroundColor</a></b> ( int <i>column</i>, const QColor &amp; <i>color</i> )</li>
 
51
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#setCheckState">setCheckState</a></b> ( int <i>column</i>, Qt::CheckState <i>state</i> )</li>
 
52
<li><div class="fn"/>virtual void <b><a href="qtreewidgetitem.html#setData">setData</a></b> ( int <i>column</i>, int <i>role</i>, const QVariant &amp; <i>value</i> )</li>
 
53
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#setFlags">setFlags</a></b> ( Qt::ItemFlags <i>flags</i> )</li>
 
54
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#setFont">setFont</a></b> ( int <i>column</i>, const QFont &amp; <i>font</i> )</li>
 
55
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#setIcon">setIcon</a></b> ( int <i>column</i>, const QIcon &amp; <i>icon</i> )</li>
 
56
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#setStatusTip">setStatusTip</a></b> ( int <i>column</i>, const QString &amp; <i>statusTip</i> )</li>
 
57
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#setText">setText</a></b> ( int <i>column</i>, const QString &amp; <i>text</i> )</li>
 
58
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#setTextAlignment">setTextAlignment</a></b> ( int <i>column</i>, int <i>alignment</i> )</li>
 
59
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#setTextColor">setTextColor</a></b> ( int <i>column</i>, const QColor &amp; <i>color</i> )</li>
 
60
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#setToolTip">setToolTip</a></b> ( int <i>column</i>, const QString &amp; <i>toolTip</i> )</li>
 
61
<li><div class="fn"/>void <b><a href="qtreewidgetitem.html#setWhatsThis">setWhatsThis</a></b> ( int <i>column</i>, const QString &amp; <i>whatsThis</i> )</li>
 
62
<li><div class="fn"/>QString <b><a href="qtreewidgetitem.html#statusTip">statusTip</a></b> ( int <i>column</i> ) const</li>
 
63
<li><div class="fn"/>QTreeWidgetItem * <b><a href="qtreewidgetitem.html#takeChild">takeChild</a></b> ( int <i>index</i> )</li>
 
64
<li><div class="fn"/>QString <b><a href="qtreewidgetitem.html#text">text</a></b> ( int <i>column</i> ) const</li>
 
65
<li><div class="fn"/>int <b><a href="qtreewidgetitem.html#textAlignment">textAlignment</a></b> ( int <i>column</i> ) const</li>
 
66
<li><div class="fn"/>QColor <b><a href="qtreewidgetitem.html#textColor">textColor</a></b> ( int <i>column</i> ) const</li>
 
67
<li><div class="fn"/>QString <b><a href="qtreewidgetitem.html#toolTip">toolTip</a></b> ( int <i>column</i> ) const</li>
 
68
<li><div class="fn"/>QTreeWidget * <b><a href="qtreewidgetitem.html#treeWidget">treeWidget</a></b> () const</li>
 
69
<li><div class="fn"/>int <b><a href="qtreewidgetitem.html#type">type</a></b> () const</li>
 
70
<li><div class="fn"/>QString <b><a href="qtreewidgetitem.html#whatsThis">whatsThis</a></b> ( int <i>column</i> ) const</li>
 
71
<li><div class="fn"/>virtual void <b><a href="qtreewidgetitem.html#write">write</a></b> ( QDataStream &amp; <i>out</i> ) const</li>
 
72
<li><div class="fn"/>virtual bool <b><a href="qtreewidgetitem.html#operator-lt">operator&lt;</a></b> ( const QTreeWidgetItem &amp; <i>other</i> ) const</li>
 
73
<li><div class="fn"/>QTreeWidgetItem &amp; <b><a href="qtreewidgetitem.html#operator-eq">operator=</a></b> ( const QTreeWidgetItem &amp; <i>other</i> )</li>
 
74
</ul>
 
75
<a name="static-public-members"></a>
 
76
<h3>Static Public Members</h3>
 
77
<ul>
 
78
<li><div class="fn"/>const int <b><a href="qtreewidgetitem.html#Type-var">Type</a></b></li>
 
79
<li><div class="fn"/>const int <b><a href="qtreewidgetitem.html#UserType-var">UserType</a></b></li>
 
80
</ul>
 
81
<a name="related-non-members"></a>
 
82
<h3>Related Non-Members</h3>
 
83
<ul>
 
84
<li><div class="fn"/>QDataStream &amp; <b><a href="qtreewidgetitem.html#operator-lt-lt-59">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>out</i>, const QTreeWidgetItem &amp; <i>item</i> )</li>
 
85
<li><div class="fn"/>QDataStream &amp; <b><a href="qtreewidgetitem.html#operator-gt-gt-40">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>in</i>, QTreeWidgetItem &amp; <i>item</i> )</li>
 
86
</ul>
 
87
<a name="details"></a>
 
88
<hr />
 
89
<h2>Detailed Description</h2>
 
90
<p>The QTreeWidgetItem class provides an item for use with the <a href="qtreewidget.html">QTreeWidget</a> convenience class.</p>
 
91
<p>Tree widget items are used to hold rows of information for tree widgets. Rows usually contain several columns of data, each of which can contain a text label and an icon.</p>
 
92
<p>The QTreeWidgetItem class is a convenience class that replaces the <tt>QListViewItem</tt> class in Qt 3. It provides an item for use with the <a href="qtreewidget.html">QTreeWidget</a> class.</p>
 
93
<p>Items are usually constructed with a parent that is either a <a href="qtreewidget.html">QTreeWidget</a> (for top-level items) or a QTreeWidgetItem (for items on lower levels of the tree). For example, the following code constructs a top-level item to represent cities of the world, and adds a entry for Oslo as a child item:</p>
 
94
<pre>&nbsp;       QTreeWidgetItem *cities = new QTreeWidgetItem(treeWidget);
 
95
        cities-&gt;setText(0, tr(&quot;Cities&quot;));
 
96
        QTreeWidgetItem *osloItem = new QTreeWidgetItem(cities);
 
97
        osloItem-&gt;setText(0, tr(&quot;Oslo&quot;));
 
98
        osloItem-&gt;setText(1, tr(&quot;Yes&quot;));</pre>
 
99
<p>Items can be added in a particular order by specifying the item they follow when they are constructed:</p>
 
100
<pre>&nbsp;       QTreeWidgetItem *planets = new QTreeWidgetItem(treeWidget, cities);
 
101
        planets-&gt;setText(0, tr(&quot;Planets&quot;));</pre>
 
102
<p>Each column in an item can have its own background color which is set with the <a href="qtreewidgetitem.html#setBackgroundColor">setBackgroundColor</a>() function. The current background color can be found with <a href="qtreewidgetitem.html#backgroundColor">backgroundColor</a>(). The text label for each column can be rendered with its own font and text color. These are specified with the <a href="qtreewidgetitem.html#setFont">setFont</a>() and <a href="qtreewidgetitem.html#setTextColor">setTextColor</a>() functions, and read with <a href="qtreewidgetitem.html#font">font</a>() and <a href="qtreewidgetitem.html#textColor">textColor</a>().</p>
 
103
<p>The main difference between top-level items and those in lower levels of the tree is that a top-level item has no <a href="qtreewidgetitem.html#parent">parent</a>(). This information can be used to tell the difference between items, and is useful to know when inserting and removing items from the tree. Children of an item can be removed with <a href="qtreewidgetitem.html#takeChild">takeChild</a>() and inserted at a given index in the list of children with the <a href="qtreewidgetitem.html#insertChild">insertChild</a>() function.</p>
 
104
<p>See also <a href="qtreewidget.html">QTreeWidget</a>.</p>
 
105
<hr />
 
106
<h2>Member Function Documentation</h2>
 
107
<h3 class="fn"><a name="QTreeWidgetItem"></a>QTreeWidgetItem::QTreeWidgetItem ( int <i>type</i> = Type )</h3>
 
108
<p>Constructs a tree widget item of the specified <i>type</i>. The item must be inserted into a tree widget.</p>
 
109
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
 
110
<h3 class="fn"><a name="QTreeWidgetItem-2"></a>QTreeWidgetItem::QTreeWidgetItem ( <a href="qtreewidget.html">QTreeWidget</a> * <i>parent</i>, int <i>type</i> = Type )</h3>
 
111
<p>Constructs a tree widget item of the specified <i>type</i> and appends it to the items in the given <i>parent</i>.</p>
 
112
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
 
113
<h3 class="fn"><a name="QTreeWidgetItem-3"></a>QTreeWidgetItem::QTreeWidgetItem ( <a href="qtreewidget.html">QTreeWidget</a> * <i>parent</i>, QTreeWidgetItem * <i>preceding</i>, int <i>type</i> = Type )</h3>
 
114
<p>Constructs a tree widget item of the specified <i>type</i> and inserts it into the given <i>parent</i> after the <i>preceding</i> item.</p>
 
115
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
 
116
<h3 class="fn"><a name="QTreeWidgetItem-4"></a>QTreeWidgetItem::QTreeWidgetItem ( QTreeWidgetItem * <i>parent</i>, int <i>type</i> = Type )</h3>
 
117
<p>Constructs a tree widget item and append it to the given <i>parent</i>.</p>
 
118
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
 
119
<h3 class="fn"><a name="QTreeWidgetItem-5"></a>QTreeWidgetItem::QTreeWidgetItem ( QTreeWidgetItem * <i>parent</i>, QTreeWidgetItem * <i>preceding</i>, int <i>type</i> = Type )</h3>
 
120
<p>Constructs a tree widget item of the specified <i>type</i> that is inserted into the <i>parent</i> after the <i>preceding</i> child item.</p>
 
121
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
 
122
<h3 class="fn"><a name="dtor.QTreeWidgetItem"></a>QTreeWidgetItem::~QTreeWidgetItem ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
123
<p>Destroys this tree widget item.</p>
 
124
<h3 class="fn"><a name="addChild"></a>void QTreeWidgetItem::addChild ( QTreeWidgetItem * <i>child</i> )</h3>
 
125
<p>Appends the <i>child</i> item to the list of children.</p>
 
126
<p>See also <a href="qtreewidgetitem.html#insertChild">insertChild</a>() and <a href="qtreewidgetitem.html#takeChild">takeChild</a>().</p>
 
127
<h3 class="fn"><a name="backgroundColor"></a><a href="qcolor.html">QColor</a> QTreeWidgetItem::backgroundColor ( int <i>column</i> ) const</h3>
 
128
<p>Returns the color used to render the background of the specified <i>column</i>.</p>
 
129
<p>See also <a href="qtreewidgetitem.html#textColor">textColor</a>() and <a href="qtreewidgetitem.html#setBackgroundColor">setBackgroundColor</a>().</p>
 
130
<h3 class="fn"><a name="checkState"></a><a href="qt.html#CheckState-enum">Qt::CheckState</a> QTreeWidgetItem::checkState ( int <i>column</i> ) const</h3>
 
131
<p>Returns the check state of the label in the given <i>column</i>.</p>
 
132
<p>See also <a href="qt.html#CheckState-enum">Qt::CheckState</a>.</p>
 
133
<h3 class="fn"><a name="child"></a>QTreeWidgetItem * QTreeWidgetItem::child ( int <i>index</i> ) const</h3>
 
134
<p>Returns the item at the given <i>index</i> in the list of the item's children.</p>
 
135
<p>See also <a href="qtreewidgetitem.html#parent">parent</a>().</p>
 
136
<h3 class="fn"><a name="childCount"></a>int QTreeWidgetItem::childCount () const</h3>
 
137
<p>Returns the number of child items.</p>
 
138
<h3 class="fn"><a name="clone"></a>QTreeWidgetItem * QTreeWidgetItem::clone () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
139
<p>Creates an exact copy of the item and it's children.</p>
 
140
<h3 class="fn"><a name="columnCount"></a>int QTreeWidgetItem::columnCount () const</h3>
 
141
<p>Returns the number of columns in the item.</p>
 
142
<h3 class="fn"><a name="data"></a><a href="qvariant.html">QVariant</a> QTreeWidgetItem::data ( int <i>column</i>, int <i>role</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
143
<p>Returns the value for the item's <i>column</i> and <i>role</i>.</p>
 
144
<h3 class="fn"><a name="flags"></a><a href="qt.html#ItemFlag-enum">Qt::ItemFlags</a> QTreeWidgetItem::flags () const</h3>
 
145
<p>Returns the flags used to describe the item. These determine whether the item can be checked, edited, and selected.</p>
 
146
<p>See also <a href="qtreewidgetitem.html#setFlags">setFlags</a>().</p>
 
147
<h3 class="fn"><a name="font"></a><a href="qfont.html">QFont</a> QTreeWidgetItem::font ( int <i>column</i> ) const</h3>
 
148
<p>Returns the font used to render the text in the specified <i>column</i>.</p>
 
149
<p>See also <a href="qtreewidgetitem.html#setFont">setFont</a>().</p>
 
150
<h3 class="fn"><a name="icon"></a><a href="qicon.html">QIcon</a> QTreeWidgetItem::icon ( int <i>column</i> ) const</h3>
 
151
<p>Returns the icon that is displayed in the specified <i>column</i>.</p>
 
152
<p>See also <a href="qtreewidgetitem.html#setIcon">setIcon</a>().</p>
 
153
<h3 class="fn"><a name="indexOfChild"></a>int QTreeWidgetItem::indexOfChild ( QTreeWidgetItem * <i>child</i> ) const</h3>
 
154
<p>Returns the index of the given <i>child</i> in the item's list of children.</p>
 
155
<h3 class="fn"><a name="insertChild"></a>void QTreeWidgetItem::insertChild ( int <i>index</i>, QTreeWidgetItem * <i>child</i> )</h3>
 
156
<p>Inserts the <i>child</i> item at <i>index</i> in the list of children.</p>
 
157
<h3 class="fn"><a name="parent"></a>QTreeWidgetItem * QTreeWidgetItem::parent () const</h3>
 
158
<p>Returns the item's parent.</p>
 
159
<p>See also <a href="qtreewidgetitem.html#child">child</a>().</p>
 
160
<h3 class="fn"><a name="read"></a>void QTreeWidgetItem::read ( <a href="qdatastream.html">QDataStream</a> &amp; <i>in</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
161
<p>Reads the item from stream <i>in</i>. This only reads data into a single item.</p>
 
162
<p>See also <a href="qtreewidgetitem.html#write">write</a>().</p>
 
163
<h3 class="fn"><a name="setBackgroundColor"></a>void QTreeWidgetItem::setBackgroundColor ( int <i>column</i>, const <a href="qcolor.html">QColor</a> &amp; <i>color</i> )</h3>
 
164
<p>Sets the background color of the label in the given <i>column</i> to the specified <i>color</i>.</p>
 
165
<p>See also <a href="qtreewidgetitem.html#backgroundColor">backgroundColor</a>() and <a href="qtreewidgetitem.html#setTextColor">setTextColor</a>().</p>
 
166
<h3 class="fn"><a name="setCheckState"></a>void QTreeWidgetItem::setCheckState ( int <i>column</i>, <a href="qt.html#CheckState-enum">Qt::CheckState</a> <i>state</i> )</h3>
 
167
<p>Sets the item in the given <i>column</i> check state to be <i>state</i>.</p>
 
168
<p>See also <a href="qtreewidgetitem.html#checkState">checkState</a>().</p>
 
169
<h3 class="fn"><a name="setData"></a>void QTreeWidgetItem::setData ( int <i>column</i>, int <i>role</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>value</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
170
<p>Sets the value for the item's <i>column</i> and <i>role</i> to the given <i>value</i>.</p>
 
171
<h3 class="fn"><a name="setFlags"></a>void QTreeWidgetItem::setFlags ( <a href="qt.html#ItemFlag-enum">Qt::ItemFlags</a> <i>flags</i> )</h3>
 
172
<p>Sets the flags for the item to the given <i>flags</i>. These determine whether the item can be selected or modified.</p>
 
173
<p>See also <a href="qtreewidgetitem.html#flags">flags</a>().</p>
 
174
<h3 class="fn"><a name="setFont"></a>void QTreeWidgetItem::setFont ( int <i>column</i>, const <a href="qfont.html">QFont</a> &amp; <i>font</i> )</h3>
 
175
<p>Sets the font used to display the text in the given <i>column</i> to the given <i>font</i>.</p>
 
176
<p>See also <a href="qtreewidgetitem.html#font">font</a>(), <a href="qtreewidgetitem.html#setText">setText</a>(), and <a href="qtreewidgetitem.html#setTextColor">setTextColor</a>().</p>
 
177
<h3 class="fn"><a name="setIcon"></a>void QTreeWidgetItem::setIcon ( int <i>column</i>, const <a href="qicon.html">QIcon</a> &amp; <i>icon</i> )</h3>
 
178
<p>Sets the icon to be displayed in the given <i>column</i> to <i>icon</i>.</p>
 
179
<p>See also <a href="qtreewidgetitem.html#icon">icon</a>() and <a href="qtreewidgetitem.html#setText">setText</a>().</p>
 
180
<h3 class="fn"><a name="setStatusTip"></a>void QTreeWidgetItem::setStatusTip ( int <i>column</i>, const <a href="qstring.html">QString</a> &amp; <i>statusTip</i> )</h3>
 
181
<p>Sets the status tip for the given <i>column</i> to the given <i>statusTip</i>.</p>
 
182
<p>See also <a href="qtreewidgetitem.html#statusTip">statusTip</a>(), <a href="qtreewidgetitem.html#setToolTip">setToolTip</a>(), and <a href="qtreewidgetitem.html#setWhatsThis">setWhatsThis</a>().</p>
 
183
<h3 class="fn"><a name="setText"></a>void QTreeWidgetItem::setText ( int <i>column</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i> )</h3>
 
184
<p>Sets the text to be displayed in the given <i>column</i> to the given <i>text</i>.</p>
 
185
<p>See also <a href="qtreewidgetitem.html#text">text</a>(), <a href="qtreewidgetitem.html#setFont">setFont</a>(), and <a href="qtreewidgetitem.html#setTextColor">setTextColor</a>().</p>
 
186
<h3 class="fn"><a name="setTextAlignment"></a>void QTreeWidgetItem::setTextAlignment ( int <i>column</i>, int <i>alignment</i> )</h3>
 
187
<p>Sets the text alignment for the label in the given <i>column</i> to the <i>alignment</i> specified (see <a href="qt.html#AlignmentFlag-enum">Qt::AlignmentFlag</a>).</p>
 
188
<h3 class="fn"><a name="setTextColor"></a>void QTreeWidgetItem::setTextColor ( int <i>column</i>, const <a href="qcolor.html">QColor</a> &amp; <i>color</i> )</h3>
 
189
<p>Sets the color used to display the text in the given <i>column</i> to <i>color</i>.</p>
 
190
<p>See also <a href="qtreewidgetitem.html#textColor">textColor</a>(), <a href="qtreewidgetitem.html#setFont">setFont</a>(), and <a href="qtreewidgetitem.html#setText">setText</a>().</p>
 
191
<h3 class="fn"><a name="setToolTip"></a>void QTreeWidgetItem::setToolTip ( int <i>column</i>, const <a href="qstring.html">QString</a> &amp; <i>toolTip</i> )</h3>
 
192
<p>Sets the tooltip for the given <i>column</i> to <i>toolTip</i>.</p>
 
193
<p>See also <a href="qtreewidgetitem.html#toolTip">toolTip</a>(), <a href="qtreewidgetitem.html#setStatusTip">setStatusTip</a>(), and <a href="qtreewidgetitem.html#setWhatsThis">setWhatsThis</a>().</p>
 
194
<h3 class="fn"><a name="setWhatsThis"></a>void QTreeWidgetItem::setWhatsThis ( int <i>column</i>, const <a href="qstring.html">QString</a> &amp; <i>whatsThis</i> )</h3>
 
195
<p>Sets the &quot;What's This?&quot; help for the given <i>column</i> to <i>whatsThis</i>.</p>
 
196
<p>See also <a href="qtreewidgetitem.html#whatsThis">whatsThis</a>(), <a href="qtreewidgetitem.html#setStatusTip">setStatusTip</a>(), and <a href="qtreewidgetitem.html#setToolTip">setToolTip</a>().</p>
 
197
<h3 class="fn"><a name="statusTip"></a><a href="qstring.html">QString</a> QTreeWidgetItem::statusTip ( int <i>column</i> ) const</h3>
 
198
<p>Returns the status tip for the contents of the given <i>column</i>.</p>
 
199
<p>See also <a href="qtreewidgetitem.html#setStatusTip">setStatusTip</a>().</p>
 
200
<h3 class="fn"><a name="takeChild"></a>QTreeWidgetItem * QTreeWidgetItem::takeChild ( int <i>index</i> )</h3>
 
201
<p>Removes the item at <i>index</i> and returns it, otherwise return 0.</p>
 
202
<h3 class="fn"><a name="text"></a><a href="qstring.html">QString</a> QTreeWidgetItem::text ( int <i>column</i> ) const</h3>
 
203
<p>Returns the text in the specified <i>column</i>.</p>
 
204
<p>See also <a href="qtreewidgetitem.html#setText">setText</a>().</p>
 
205
<h3 class="fn"><a name="textAlignment"></a>int QTreeWidgetItem::textAlignment ( int <i>column</i> ) const</h3>
 
206
<p>Returns the text alignment for the label in the given <i>column</i> (see <a href="qt.html#AlignmentFlag-enum">Qt::AlignmentFlag</a>).</p>
 
207
<h3 class="fn"><a name="textColor"></a><a href="qcolor.html">QColor</a> QTreeWidgetItem::textColor ( int <i>column</i> ) const</h3>
 
208
<p>Returns the color used to render the text in the specified <i>column</i>.</p>
 
209
<p>See also <a href="qtreewidgetitem.html#backgroundColor">backgroundColor</a>() and <a href="qtreewidgetitem.html#setTextColor">setTextColor</a>().</p>
 
210
<h3 class="fn"><a name="toolTip"></a><a href="qstring.html">QString</a> QTreeWidgetItem::toolTip ( int <i>column</i> ) const</h3>
 
211
<p>Returns the tool tip for the given <i>column</i>.</p>
 
212
<p>See also <a href="qtreewidgetitem.html#setToolTip">setToolTip</a>().</p>
 
213
<h3 class="fn"><a name="treeWidget"></a><a href="qtreewidget.html">QTreeWidget</a> * QTreeWidgetItem::treeWidget () const</h3>
 
214
<p>Returns the tree widget that contains the item.</p>
 
215
<h3 class="fn"><a name="type"></a>int QTreeWidgetItem::type () const</h3>
 
216
<p>Returns the type passed to the <a href="qtreewidgetitem.html">QTreeWidgetItem</a> constructor.</p>
 
217
<h3 class="fn"><a name="whatsThis"></a><a href="qstring.html">QString</a> QTreeWidgetItem::whatsThis ( int <i>column</i> ) const</h3>
 
218
<p>Returns the &quot;What's This?&quot; help for the contents of the given <i>column</i>.</p>
 
219
<p>See also <a href="qtreewidgetitem.html#setWhatsThis">setWhatsThis</a>().</p>
 
220
<h3 class="fn"><a name="write"></a>void QTreeWidgetItem::write ( <a href="qdatastream.html">QDataStream</a> &amp; <i>out</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
221
<p>Writes the item to stream <i>out</i>. This only writes data from one single item.</p>
 
222
<p>See also <a href="qtreewidgetitem.html#read">read</a>().</p>
 
223
<h3 class="fn"><a name="operator-lt"></a>bool QTreeWidgetItem::operator&lt; ( const QTreeWidgetItem &amp; <i>other</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
224
<p>Returns true if the text in the item is less than the text in the <i>other</i> item, otherwise returns false.</p>
 
225
<h3 class="fn"><a name="operator-eq"></a>QTreeWidgetItem &amp; QTreeWidgetItem::operator= ( const QTreeWidgetItem &amp; <i>other</i> )</h3>
 
226
<p>Assigns the <i>other</i> item to this item.</p>
 
227
<hr />
 
228
<h2>Member Variable Documentation</h2>
 
229
<h3 class="fn"><a name="Type-var"></a>const int QTreeWidgetItem::Type</h3>
 
230
<p>The default type for tree widget items.</p>
 
231
<p>See also <a href="qtreewidgetitem.html#UserType-var">UserType</a> and <a href="qtreewidgetitem.html#type">type</a>().</p>
 
232
<h3 class="fn"><a name="UserType-var"></a>const int QTreeWidgetItem::UserType</h3>
 
233
<p>The minimum value for custom types. Values below UserType are reserved by Qt.</p>
 
234
<p>See also <a href="qtreewidgetitem.html#Type-var">Type</a> and <a href="qtreewidgetitem.html#type">type</a>().</p>
 
235
<hr />
 
236
<h2>Related Non-Members</h2>
 
237
<h3 class="fn"><a name="operator-lt-lt-59"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&lt;&lt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>out</i>, const QTreeWidgetItem &amp; <i>item</i> )</h3>
 
238
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
239
<p>Writes the tree widget item <i>item</i> to stream <i>out</i>.</p>
 
240
<p>This operator uses <a href="qtreewidgetitem.html#write">QTreeWidgetItem::write</a>().</p>
 
241
<p>See also <a href="datastreamformat.html">Format of the QDataStream Operators</a>.</p>
 
242
<h3 class="fn"><a name="operator-gt-gt-40"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&gt;&gt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>in</i>, QTreeWidgetItem &amp; <i>item</i> )</h3>
 
243
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
244
<p>Reads a tree widget item from stream <i>in</i> into <i>item</i>.</p>
 
245
<p>This operator uses <a href="qtreewidgetitem.html#read">QTreeWidgetItem::read</a>().</p>
 
246
<p>See also <a href="datastreamformat.html">Format of the QDataStream Operators</a>.</p>
 
247
<p /><address><hr /><div align="center">
 
248
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
249
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
250
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
251
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
252
</tr></table></div></address></body>
 
253
</html>