File: qlistboxitem.html

package info (click to toggle)
qt-embedded 2.3.2-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 68,608 kB
  • ctags: 45,998
  • sloc: cpp: 276,654; ansic: 71,987; makefile: 29,074; sh: 12,305; yacc: 2,465; python: 1,863; perl: 481; lex: 480; xml: 68; lisp: 15
file content (137 lines) | stat: -rw-r--r-- 9,185 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Qt Toolkit - QListBoxItem Class</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }
--></style>
</head><body bgcolor="#ffffff">

<table width="100%">
<tr><td><a href="index.html">
<img width="100" height="100" src="qtlogo.png"
alt="Home" border="0"><img width="100"
height="100" src="face.png" alt="Home" border="0">
</a><td valign=top><div align=right><img src="dochead.png" width="472" height="27"><br>
<a href="classes.html"><b>Classes</b></a>
-<a href="annotated.html">Annotated</a>
- <a href="hierarchy.html">Tree</a>
-<a href="functions.html">Functions</a>
-<a href="index.html">Home</a>
-<a href="topicals.html"><b>Structure</b></a>
</div>
</table>

<h1 align=center>QListBoxItem Class Reference</h1><br clear="all">
<p>
This is the base class of all list box items.
<a href="#details">More...</a>
<p>
<code>#include &lt;<a href="qlistbox-h.html">qlistbox.h</a>&gt;</code>
<p>Inherited by <a href="qlistboxpixmap.html">QListBoxPixmap</a> and <a href="qlistboxtext.html">QListBoxText</a>.
<p><a href="qlistboxitem-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class="fn"><a href="#53bac8"><b>QListBoxItem</b></a>(QListBox*listbox=0)</div>
<li><div class="fn"><a href="#fa010e"><b>QListBoxItem</b></a>(QListBox*listbox, QListBoxItem*after)</div>
<li><div class="fn">virtual<a href="#6fcef8"><b>~QListBoxItem</b></a>()</div>
<li><div class="fn">virtualQString<a href="#abfb21"><b>text</b></a>()const</div>
<li><div class="fn">virtualconstQPixmap*<a href="#bb4260"><b>pixmap</b></a>()const</div>
<li><div class="fn">virtualint<a href="#45163a"><b>height</b></a>(constQListBox*)const</div>
<li><div class="fn">virtualint<a href="#483a87"><b>width</b></a>(constQListBox*)const</div>
<li><div class="fn">bool<a href="#430dc5"><b>selected</b></a>()const</div>
<li><div class="fn">bool<a href="#9412be"><b>current</b></a>()const</div>
<li><div class="fn">QListBox*<a href="#6986ba"><b>listBox</b></a>()const</div>
<li><div class="fn">void<a href="#fe255a"><b>setSelectable</b></a>(boolb)</div>
<li><div class="fn">bool<a href="#d3f7ff"><b>isSelectable</b></a>()const</div>
<li><div class="fn">QListBoxItem*<a href="#9d2a77"><b>next</b></a>()const</div>
<li><div class="fn">QListBoxItem*<a href="#02929c"><b>prev</b></a>()const</div>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class="fn">virtualvoid<a href="#4a55dc"><b>paint</b></a>(QPainter*)</div>
<li><div class="fn">virtualvoid<a href="#1a64dd"><b>setText</b></a>(constQString&amp;text)</div>
<li><div class="fn">void<a href="#6b129c"><b>setCustomHighlighting</b></a>(bool)</div>
</ul>
<hr><h2><a name="details"></a>Detailed Description</h2>
This is the base class of all list box items.
<p>
This class is the abstract base class of all list box items. If you
need to insert customized items into a <a href="qlistbox.html">QListBox</a>, you must inherit
this class and reimplement <a href="#4a55dc">paint</a>(), <a href="#45163a">height</a>() and <a href="#483a87">width</a>().
<p>See also  <a href="qlistbox.html">QListBox</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class="fn"><a name="53bac8"></a>QListBoxItem::QListBoxItem(<a href="qlistbox.html">QListBox</a>*listbox=0)</h3>
<p>Constructs an empty list box item in the listbox <em>listbox</em>
<h3 class="fn"><a name="fa010e"></a>QListBoxItem::QListBoxItem(<a href="qlistbox.html">QListBox</a>*listbox, QListBoxItem*after)</h3>
<p>Constructs an empty list box item in the listbox <em>listbox</em> and
inserts it after the item <em>after.</em>
<h3 class="fn"><a name="6fcef8"></a>QListBoxItem::~QListBoxItem() <code>[virtual]</code></h3>
<p>Destroys the list box item.
<h3 class="fn">bool<a name="9412be"></a>QListBoxItem::current()const</h3>
<p>Returns TRUE if the item is the current item, else FALSE.
<p>See also  <a href="qlistbox.html#587403">QListBox::currentItem</a>(), <a href="qlistbox.html#39471d">QListBox::item</a>() and <a href="#430dc5">selected</a>().
<h3 class="fn">int<a name="45163a"></a>QListBoxItem::height(const<a href="qlistbox.html">QListBox</a>*lb)const <code>[virtual]</code></h3>
<p>Implement this function to return the height of your item.
The <em>lb</em> parameter is the same as <a href="#6986ba">listBox</a>() and is provided
for convenience and compatibility.
<p>See also  <a href="#4a55dc">paint</a>() and <a href="#483a87">width</a>().
<p>Reimplemented in <a href="qlistboxpixmap.html#730f8d">QListBoxPixmap</a> and <a href="qlistboxtext.html#68b3d6">QListBoxText</a>.
<h3 class="fn">bool<a name="d3f7ff"></a>QListBoxItem::isSelectable()const</h3>
<p>Returns if this item is selectable or not.
<p>See also  <a href="#fe255a">setSelectable</a>().
<h3 class="fn"><a href="qlistbox.html">QListBox</a>*<a name="6986ba"></a>QListBoxItem::listBox()const</h3>
<p>Returns a pointer to the listbox containing this item.
<h3 class="fn">QListBoxItem*<a name="9d2a77"></a>QListBoxItem::next()const</h3>
<p>Returns the item which comes after this in the
listbox. If this is the last item, 0 is returned.
<h3 class="fn">void<a name="4a55dc"></a>QListBoxItem::paint(<a href="qpainter.html">QPainter</a>*p) <code>[virtualprotected]</code></h3>
<p>Implement this function to draw your item.
<p>See also  <a href="#45163a">height</a>() and <a href="#483a87">width</a>().
<p>Reimplemented in <a href="qlistboxpixmap.html#1e0a5a">QListBoxPixmap</a> and <a href="qlistboxtext.html#2cf14c">QListBoxText</a>.
<h3 class="fn">const<a href="qpixmap.html">QPixmap</a>*<a name="bb4260"></a>QListBoxItem::pixmap()const <code>[virtual]</code></h3>
<p>Returns the pixmap connected with the item, if any.
<p>The default implementation of this function returns a null pointer.
<p>Reimplemented in <a href="qlistboxpixmap.html#0b70c8">QListBoxPixmap</a>.
<h3 class="fn">QListBoxItem*<a name="02929c"></a>QListBoxItem::prev()const</h3>
<p>Returns the item which comes before this in the
listbox. If this is the first item, 0 is returned.
<h3 class="fn">bool<a name="430dc5"></a>QListBoxItem::selected()const</h3>
<p>Returns TRUE if the item is selected, else FALSE.
<p>See also  <a href="qlistbox.html#3d9b58">QListBox::isSelected</a>() and <a href="#9412be">current</a>().
<h3 class="fn">void<a name="6b129c"></a>QListBoxItem::setCustomHighlighting(boolb) <code>[protected]</code></h3>
<p>Defines whether the list box items is responsible to draw itself
in a highlighted state when being selected.
<p>If <em>b</em> is FALSE (the default), then the listbox will draw some
default highlight indicator before calling <a href="#4a55dc">paint</a>().
<p>See also  <a href="#430dc5">selected</a>() and <a href="#4a55dc">paint</a>().
<h3 class="fn">void<a name="fe255a"></a>QListBoxItem::setSelectable(boolb)</h3>
<p>Specifies if this item may be selected by the user or not.
<p>See also  <a href="#d3f7ff">isSelectable</a>().
<h3 class="fn">void<a name="1a64dd"></a>QListBoxItem::setText(const<a href="qstring.html">QString</a>&amp;text) <code>[virtualprotected]</code></h3>
<p>Sets the text of the widget, which is used for sorting too.
The text is not shown unless explicitly drawn in <a href="#4a55dc">paint</a>().
<p>See also  <a href="#abfb21">text</a>().
<h3 class="fn"><a href="qstring.html">QString</a><a name="abfb21"></a>QListBoxItem::text()const <code>[virtual]</code></h3>
<p>Returns the text of the item, which is used for sorting too.
<p>See also  <a href="#1a64dd">setText</a>().
<h3 class="fn">int<a name="483a87"></a>QListBoxItem::width(const<a href="qlistbox.html">QListBox</a>*lb)const <code>[virtual]</code></h3>
<p>Implement this function to return the width of your item.
The <em>lb</em> parameter is the same as <a href="#6986ba">listBox</a>() and is provided
for convenience and compatibility.
<p>See also  <a href="#4a55dc">paint</a>() and <a href="#45163a">height</a>().
<p>Reimplemented in <a href="qlistboxpixmap.html#e37a75">QListBoxPixmap</a> and <a href="qlistboxtext.html#74889b">QListBoxText</a>.
<hr><p>
Search the documentation, FAQ, qt-interest archive and more (uses
<a href="http://www.trolltech.com">www.trolltech.com</a>):<br>
<form method=post action="http://www.trolltech.com/search.cgi">
<input type=hidden name="version" value="2.3.2"><nobr>
<input size="50" name="search"><input type=submit value="Search">
</nobr></form><hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>,
copyright &copy; 1995-2001
<a href="http://www.trolltech.com">Trolltech</a>, all rights reserved.<p><address><hr><div align="center">
<table width="100%" cellspacing="0" border="0"><tr>
<td>Copyright  2001 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.2</div>
</table></div></address></body></html>