source: trunk/doc/html/qchecktableitem.html

Last change on this file was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 5.6 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/table/qtable.cpp:1468 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QCheckTableItem Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QCheckTableItem Class Reference<br><small>[<a href="table.html">table module</a>]</small></h1>
33
34<p>The QCheckTableItem class provides checkboxes in QTables.
35<a href="#details">More...</a>
36<p><tt>#include &lt;<a href="qtable-h.html">qtable.h</a>&gt;</tt>
37<p>Inherits <a href="qtableitem.html">QTableItem</a>.
38<p><a href="qchecktableitem-members.html">List of all member functions.</a>
39<h2>Public Members</h2>
40<ul>
41<li class=fn><a href="#QCheckTableItem"><b>QCheckTableItem</b></a> ( QTable&nbsp;*&nbsp;table, const&nbsp;QString&nbsp;&amp;&nbsp;txt )</li>
42<li class=fn>virtual void <a href="#setChecked"><b>setChecked</b></a> ( bool&nbsp;b )</li>
43<li class=fn>bool <a href="#isChecked"><b>isChecked</b></a> () const</li>
44<li class=fn>virtual int <a href="#rtti"><b>rtti</b></a> () const</li>
45</ul>
46<hr><a name="details"></a><h2>Detailed Description</h2>
47
48
49The QCheckTableItem class provides checkboxes in QTables.
50
51<p>
52
53<p> A QCheckTableItem is a table item which looks and behaves like a
54checkbox. The advantage of using QCheckTableItems rather than real
55checkboxes is that a QCheckTableItem uses far less resources than
56a real checkbox would in a <a href="qtable.html">QTable</a>. When the cell has the focus
57it displays a real checkbox which the user can interact with. When
58the cell does not have the focus the cell <em>looks</em> like a
59checkbox. Pixmaps may not be used in QCheckTableItems.
60<p> QCheckTableItem items have the edit type <a href="qtableitem.html#EditType-enum">WhenCurrent</a> (see
61<a href="qtableitem.html#EditType-enum">EditType</a>).
62<p> To change the checkbox's label use <a href="qtableitem.html#setText">setText</a>(). The checkbox can be
63checked and unchecked with <a href="#setChecked">setChecked</a>() and its state retrieved
64using <a href="#isChecked">isChecked</a>().
65<p> To populate a table cell with a QCheckTableItem use
66<a href="qtable.html#setItem">QTable::setItem</a>().
67<p> QCheckTableItems can be distinguished from <a href="qtableitem.html">QTableItem</a>s and
68<a href="qcombotableitem.html">QComboTableItem</a>s using their Run Time Type Identification
69(rtti) value.
70<p> <center><img src="qtableitems.png" alt="Table Items"></center>
71<p> <p>See also <a href="#rtti">rtti</a>(), <a href="qtableitem.html#EditType-enum">EditType</a>, <a href="qcombotableitem.html">QComboTableItem</a>, <a href="qtableitem.html">QTableItem</a>, <a href="qcheckbox.html">QCheckBox</a>, and <a href="advanced.html">Advanced Widgets</a>.
72
73<hr><h2>Member Function Documentation</h2>
74<h3 class=fn><a name="QCheckTableItem"></a>QCheckTableItem::QCheckTableItem ( <a href="qtable.html">QTable</a>&nbsp;*&nbsp;table, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;txt )
75</h3>
76Creates a QCheckTableItem with an <a href="qtableitem.html#EditType-enum">EditType</a> of <a href="qtableitem.html#EditType-enum">WhenCurrent</a>
77as a child of <em>table</em>. The checkbox is initially unchecked and
78its label is set to the string <em>txt</em>.
79
80<h3 class=fn>bool <a name="isChecked"></a>QCheckTableItem::isChecked () const
81</h3>
82Returns TRUE if the checkbox table item is checked; otherwise
83returns FALSE.
84<p> <p>See also <a href="#setChecked">setChecked</a>().
85
86<h3 class=fn>int <a name="rtti"></a>QCheckTableItem::rtti () const<tt> [virtual]</tt>
87</h3>
88
89<p> Returns 2.
90<p> Make your derived classes return their own values for <a href="#rtti">rtti</a>()to
91distinguish between different table item subclasses. You should
92use values greater than 1000, preferably a large random number, to
93allow for extensions to this class.
94<p> <p>See also <a href="qtableitem.html#rtti">QTableItem::rtti</a>().
95
96<p>Reimplemented from <a href="qtableitem.html#rtti">QTableItem</a>.
97<h3 class=fn>void <a name="setChecked"></a>QCheckTableItem::setChecked ( bool&nbsp;b )<tt> [virtual]</tt>
98</h3>
99If <em>b</em> is TRUE the checkbox is checked; if <em>b</em> is FALSE the
100checkbox is unchecked.
101<p> <p>See also <a href="#isChecked">isChecked</a>().
102
103<!-- eof -->
104<hr><p>
105This file is part of the <a href="index.html">Qt toolkit</a>.
106Copyright &copy; 1995-2007
107<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
108<table width=100% cellspacing=0 border=0><tr>
109<td>Copyright &copy; 2007
110<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
111<td align=right><div align=right>Qt 3.3.8</div>
112</table></div></address></body>
113</html>
Note: See TracBrowser for help on using the repository browser.