summaryrefslogtreecommitdiffstats
path: root/doc/html/qtuitest-labelwidget.html
blob: e5956c82436db205ab6845734b97fc03458aa3c4 (plain)
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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- ../../lib/qtuitestwidgetinterface.cpp -->
<head>
  <title>LabelWidget Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td align="right" valign="top" width="230"></td></tr></table><h1 class="title">LabelWidget Class Reference<br /><span class="small-subtitle">(QtUiTest::LabelWidget)<br />[QtUiTestModule]</span>
</h1>
<p>The LabelWidget class provides an abstract base class for all test widgets which are conceptually labels. <a href="#details">More...</a></p>
<pre> #include &lt;<a href="qtuitest.html">QtUiTest</a>&gt;</pre><p><b>This class is under development and is subject to change.</b></p>
<ul>
<li><a href="qtuitest-labelwidget-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual QObject * </td><td class="memItemRight" valign="bottom"><b><a href="qtuitest-labelwidget.html#buddy">buddy</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QString </td><td class="memItemRight" valign="bottom"><b><a href="qtuitest-labelwidget.html#labelText">labelText</a></b> () const = 0</td></tr>
</table>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The LabelWidget class provides an abstract base class for all test widgets which are conceptually labels.</p>
<p>Some widgets may act as labels for themselves while also providing other functionality. For example, a button widget labels itself and is also an <a href="qtuitest-activatewidget.html">ActivateWidget</a>.</p>
<p>Examples of widgets suitable for this interface include QLabel.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="buddy"></a>QObject * LabelWidget::buddy () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the label's buddy widget, or 0 if this widget has no buddy. The buddy-label relationship is used by <a href="qtuitest.html">QtUiTest</a> as part of query path resolution.</p>
<p>The returned object may be an actual QWidget, or may be a wrapping test widget. Therefore, the only safe way to use the returned value of this function is to cast it to the desired <a href="qtuitest.html">QtUiTest</a> interface using <a href="qtuitest.html">qtuitest_cast</a>.</p>
<p>See also QLabel::buddy(), <a href="qtuitest-manual.html#query-paths">Query Paths</a>, and <a href="qtuitest-manual.html#querying-objects">Querying Objects</a>.</p>
<h3 class="fn"><a name="labelText"></a>QString LabelWidget::labelText () const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>Returns the text displayed on this label.</p>
<p>Most label widgets will also implement <a href="qtuitest-textwidget.html">QtUiTest::TextWidget</a>. Most commonly, labelText() returns the same value as <a href="qtuitest-textwidget.html#text">QtUiTest::TextWidget::text</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">QtUiTest</div></td>
</tr></table></div></address></body>
</html>