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

« back to all changes in this revision

Viewing changes to doc/html/q3checktableitem.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/qt3support/itemviews/q3table.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: Q3CheckTableItem 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">Q3CheckTableItem Class Reference</h1>
 
21
<p>The Q3CheckTableItem class provides checkboxes in Q3Tables. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;Q3CheckTableItem&gt;</pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See the <a href="porting4.html">Porting Guide</a> for more information.</p>
 
23
<p>Part of the <a href="qt3support.html">Qt3Support</a> module.</p>
 
24
<p>Inherits <a href="q3tableitem.html">Q3TableItem</a>.</p>
 
25
<ul>
 
26
<li><a href="q3checktableitem-members.html">List of all members, including inherited members</a></li>
 
27
</ul>
 
28
<a name="public-functions"></a>
 
29
<h3>Public Functions</h3>
 
30
<ul>
 
31
<li><div class="fn"/><b><a href="q3checktableitem.html#Q3CheckTableItem">Q3CheckTableItem</a></b> ( Q3Table * <i>table</i>, const QString &amp; <i>txt</i> )</li>
 
32
<li><div class="fn"/>bool <b><a href="q3checktableitem.html#isChecked">isChecked</a></b> () const</li>
 
33
<li><div class="fn"/>virtual int <b><a href="q3checktableitem.html#rtti">rtti</a></b> () const</li>
 
34
<li><div class="fn"/>virtual void <b><a href="q3checktableitem.html#setChecked">setChecked</a></b> ( bool <i>b</i> )</li>
 
35
</ul>
 
36
<ul>
 
37
<li><div class="fn"/>26 public functions inherited from <a href="q3tableitem.html#public-functions">Q3TableItem</a></li>
 
38
</ul>
 
39
<a name="details"></a>
 
40
<hr />
 
41
<h2>Detailed Description</h2>
 
42
<p>The Q3CheckTableItem class provides checkboxes in Q3Tables.</p>
 
43
<p>A Q3CheckTableItem is a table item which looks and behaves like a checkbox. The advantage of using Q3CheckTableItems rather than real checkboxes is that a Q3CheckTableItem uses far less resources than a real checkbox would in a <a href="q3table.html">Q3Table</a>. When the cell has the focus it displays a real checkbox which the user can interact with. When the cell does not have the focus the cell <i>looks</i> like a checkbox. Pixmaps may not be used in Q3CheckTableItems.</p>
 
44
<p>Q3CheckTableItem items have the edit type <tt>WhenCurrent</tt> (see <a href="q3tableitem.html#EditType-enum">EditType</a>).</p>
 
45
<p>To change the checkbox's label use <a href="q3checktableitem.html#setText">setText</a>(). The checkbox can be checked and unchecked with <a href="q3checktableitem.html#setChecked">setChecked</a>() and its state retrieved using <a href="q3checktableitem.html#isChecked">isChecked</a>().</p>
 
46
<p>To populate a table cell with a Q3CheckTableItem use <a href="q3table.html#setItem">Q3Table::setItem</a>().</p>
 
47
<p>Q3CheckTableItems can be distinguished from <a href="q3tableitem.html">Q3TableItem</a>s and <a href="q3combotableitem.html">Q3ComboTableItem</a>s using their Run Time Type Identification (rtti) value.</p>
 
48
<center><img src="images/qtableitems.png" alt="Table Items" /></center><p>See also <a href="q3checktableitem.html#rtti">rtti</a>(), <a href="q3tableitem.html#EditType-enum">EditType</a>, <a href="q3combotableitem.html">Q3ComboTableItem</a>, <a href="q3tableitem.html">Q3TableItem</a>, and <a href="qcheckbox.html">QCheckBox</a>.</p>
 
49
<hr />
 
50
<h2>Member Function Documentation</h2>
 
51
<h3 class="fn"><a name="Q3CheckTableItem"></a>Q3CheckTableItem::Q3CheckTableItem ( <a href="q3table.html">Q3Table</a> * <i>table</i>, const <a href="qstring.html">QString</a> &amp; <i>txt</i> )</h3>
 
52
<p>Creates a <a href="q3checktableitem.html">Q3CheckTableItem</a> with an <a href="q3tableitem.html#EditType-enum">EditType</a> of <tt>WhenCurrent</tt> as a child of <i>table</i>. The checkbox is initially unchecked and its label is set to the string <i>txt</i>.</p>
 
53
<h3 class="fn"><a name="isChecked"></a>bool Q3CheckTableItem::isChecked () const</h3>
 
54
<p>Returns true if the checkbox table item is checked; otherwise returns false.</p>
 
55
<p>See also <a href="q3checktableitem.html#setChecked">setChecked</a>().</p>
 
56
<h3 class="fn"><a name="rtti"></a>int Q3CheckTableItem::rtti () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
57
<p>Returns 2.</p>
 
58
<p>Make your derived classes return their own values for rtti()to distinguish between different table item subclasses. You should use values greater than 1000, preferably a large random number, to allow for extensions to this class.</p>
 
59
<p>Reimplemented from <a href="q3tableitem.html#rtti">Q3TableItem</a>.</p>
 
60
<p>See also <a href="q3tableitem.html#rtti">Q3TableItem::rtti</a>().</p>
 
61
<h3 class="fn"><a name="setChecked"></a>void Q3CheckTableItem::setChecked ( bool <i>b</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
62
<p>If <i>b</i> is true the checkbox is checked; if <i>b</i> is false the checkbox is unchecked.</p>
 
63
<p>See also <a href="q3checktableitem.html#isChecked">isChecked</a>().</p>
 
64
<p /><address><hr /><div align="center">
 
65
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
66
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
67
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
68
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
69
</tr></table></div></address></body>
 
70
</html>