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

« back to all changes in this revision

Viewing changes to doc/html/qmacstyle.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/styles/qmacstyle_mac.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QMacStyle 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">QMacStyle Class Reference</h1>
 
21
<p>The QMacStyle class implements an Appearance Manager style. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QMacStyle&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qwindowsstyle.html">QWindowsStyle</a>.</p>
 
24
<ul>
 
25
<li><a href="qmacstyle-members.html">List of all members, including inherited members</a></li>
 
26
</ul>
 
27
<a name="public-types"></a>
 
28
<h3>Public Types</h3>
 
29
<ul>
 
30
<li><div class="fn"/>enum <b><a href="qmacstyle.html#FocusRectPolicy-enum">FocusRectPolicy</a></b> { FocusEnabled, FocusDisabled, FocusDefault }</li>
 
31
<li><div class="fn"/>enum <b><a href="qmacstyle.html#WidgetSizePolicy-enum">WidgetSizePolicy</a></b> { SizeSmall, SizeLarge, SizeMini, SizeDefault }</li>
 
32
</ul>
 
33
<a name="public-functions"></a>
 
34
<h3>Public Functions</h3>
 
35
<ul>
 
36
<li><div class="fn"/><b><a href="qmacstyle.html#QMacStyle">QMacStyle</a></b> ()</li>
 
37
<li><div class="fn"/>virtual <b><a href="qmacstyle.html#dtor.QMacStyle">~QMacStyle</a></b> ()</li>
 
38
</ul>
 
39
<ul>
 
40
<li><div class="fn"/>21 public functions inherited from <a href="qstyle.html#public-functions">QStyle</a></li>
 
41
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
42
</ul>
 
43
<a name="static-public-members"></a>
 
44
<h3>Static Public Members</h3>
 
45
<ul>
 
46
<li><div class="fn"/>FocusRectPolicy <b><a href="qmacstyle.html#focusRectPolicy">focusRectPolicy</a></b> ( const QWidget * <i>w</i> )</li>
 
47
<li><div class="fn"/>void <b><a href="qmacstyle.html#setFocusRectPolicy">setFocusRectPolicy</a></b> ( QWidget * <i>w</i>, FocusRectPolicy <i>policy</i> )</li>
 
48
<li><div class="fn"/>void <b><a href="qmacstyle.html#setWidgetSizePolicy">setWidgetSizePolicy</a></b> ( const QWidget * <i>w</i>, WidgetSizePolicy <i>policy</i> )</li>
 
49
<li><div class="fn"/>WidgetSizePolicy <b><a href="qmacstyle.html#widgetSizePolicy">widgetSizePolicy</a></b> ( const QWidget * <i>w</i> )</li>
 
50
</ul>
 
51
<ul>
 
52
<li><div class="fn"/>6 static public members inherited from <a href="qstyle.html#static-public-members">QStyle</a></li>
 
53
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
54
</ul>
 
55
<h3>Additional Inherited Members</h3>
 
56
<ul>
 
57
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
58
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
59
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
60
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
61
</ul>
 
62
<a name="details"></a>
 
63
<hr />
 
64
<h2>Detailed Description</h2>
 
65
<p>The QMacStyle class implements an Appearance Manager style.</p>
 
66
<p>This class is implemented as a wrapper to the Apple Appearance Manager. This allows your application to be styled by whatever theme your Macintosh is using. This is done by having primitives in <a href="qstyle.html">QStyle</a> implemented in terms of what the Macintosh would normally theme (i.e. the Finder).</p>
 
67
<p>There are additional issues that should be taken into consideration to make an application compatible with the <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html">Aqua Style Guidelines</a>. Some of these issues are outlined below.</p>
 
68
<ul>
 
69
<li>Layout - The restrictions on window layout are such that some aspects of layout that are style-dependent cannot be achieved using <a href="qlayout.html">QLayout</a>. Changes are being considered (and feedback would be appreciated) to make layouts <a href="qstyle.html">QStyle</a>-able. Some of the restrictions involve horizontal and vertical widget alignment and widget size (covered below).</li>
 
70
<li>Widget size - Aqua allows widgets to have specific fixed sizes. Qt does not fully implement this behavior so as to maintain cross-platform compatibility. As a result some widgets sizes may be inappropriate (and subsequently not rendered correctly by the Appearance Manager).The <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>() will return the appropriate size for many managed widgets (widgets enumerated in <a href="qstyle.html#ContentsType-enum">QStyle::ContentsType</a>).</li>
 
71
<li>Effects - QMacStyle uses Appearance Manager for performing most of the drawing, but also uses emulation in a few cases where Appearance Manager does not provide the required functionality (for example, <a href="qpushbutton.html">QPushButton</a> pulsing effects). We tried to make the emulation as close to the original as possible. Please report any issues you see in effects or non-standard widgets.</li>
 
72
</ul>
 
73
<p>There are other issues that need to be considered in the feel of your application (including the general color scheme to match the Aqua colors). The Guidelines mentioned above will remain current with new advances and design suggestions for Mac OS X.</p>
 
74
<p>Note that the functions provided by QMacStyle are reimplementations of <a href="qstyle.html">QStyle</a> functions; see <a href="qstyle.html">QStyle</a> for their documentation.</p>
 
75
<center><img src="images/qmacstyle.png" /></center><p>See also <a href="qwindowsxpstyle.html">QWindowsXPStyle</a>, <a href="qwindowsstyle.html">QWindowsStyle</a>, <a href="qplastiquestyle.html">QPlastiqueStyle</a>, <a href="qcdestyle.html">QCDEStyle</a>, and <a href="qmotifstyle.html">QMotifStyle</a>.</p>
 
76
<hr />
 
77
<h2>Member Type Documentation</h2>
 
78
<h3 class="fn"><a name="FocusRectPolicy-enum"></a>enum QMacStyle::FocusRectPolicy</h3>
 
79
<p>This type is used to signify a widget's focus rectangle policy.</p>
 
80
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
81
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
82
<tr><td valign="top"><tt>QMacStyle::FocusEnabled</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">show a focus rectangle when the widget has focus.</td></tr>
 
83
<tr><td valign="top"><tt>QMacStyle::FocusDisabled</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">never show a focus rectangle for the widget.</td></tr>
 
84
<tr><td valign="top"><tt>QMacStyle::FocusDefault</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">show a focus rectangle when the widget has focus and the widget is a QSpinWidget, <a href="qdatetimeedit.html">QDateTimeEdit</a>, <a href="qlineedit.html">QLineEdit</a>, <a href="porting4.html#qlistbox">QListBox</a>, <a href="qlistview.html">QListView</a>, editable <a href="qtextedit.html">QTextEdit</a>, or one of their subclasses.</td></tr>
 
85
</table>
 
86
<h3 class="fn"><a name="WidgetSizePolicy-enum"></a>enum QMacStyle::WidgetSizePolicy</h3>
 
87
<table border="1" cellpadding="2" cellspacing="1" width="40%">
 
88
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
 
89
<tr><td valign="top"><tt>QMacStyle::SizeSmall</tt></td><td align="center" valign="top"><tt>0</tt></td></tr>
 
90
<tr><td valign="top"><tt>QMacStyle::SizeLarge</tt></td><td align="center" valign="top"><tt>1</tt></td></tr>
 
91
<tr><td valign="top"><tt>QMacStyle::SizeMini</tt></td><td align="center" valign="top"><tt>2</tt></td></tr>
 
92
<tr><td valign="top"><tt>QMacStyle::SizeDefault</tt></td><td align="center" valign="top"><tt>3</tt></td></tr>
 
93
</table>
 
94
<hr />
 
95
<h2>Member Function Documentation</h2>
 
96
<h3 class="fn"><a name="QMacStyle"></a>QMacStyle::QMacStyle ()</h3>
 
97
<p>Constructs a <a href="qmacstyle.html">QMacStyle</a> object.</p>
 
98
<h3 class="fn"><a name="dtor.QMacStyle"></a>QMacStyle::~QMacStyle ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
99
<p>Destructs a <a href="qmacstyle.html">QMacStyle</a> object.</p>
 
100
<h3 class="fn"><a name="focusRectPolicy"></a><a href="qmacstyle.html#FocusRectPolicy-enum">FocusRectPolicy</a> QMacStyle::focusRectPolicy ( const <a href="qwidget.html">QWidget</a> * <i>w</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
 
101
<p>Returns the focus rectangle policy for the widget <i>w</i>.</p>
 
102
<p>The focus rectangle policy can be one of <a href="qmacstyle.html#FocusRectPolicy-enum">QMacStyle::FocusRectPolicy</a>.</p>
 
103
<p>See also <a href="qmacstyle.html#setFocusRectPolicy">setFocusRectPolicy</a>().</p>
 
104
<h3 class="fn"><a name="setFocusRectPolicy"></a>void QMacStyle::setFocusRectPolicy ( <a href="qwidget.html">QWidget</a> * <i>w</i>, <a href="qmacstyle.html#FocusRectPolicy-enum">FocusRectPolicy</a> <i>policy</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
 
105
<p>Sets the focus rectangle policy of <i>w</i>. The <i>policy</i> can be one of <a href="qmacstyle.html#FocusRectPolicy-enum">QMacStyle::FocusRectPolicy</a>.</p>
 
106
<p>See also <a href="qmacstyle.html#focusRectPolicy">focusRectPolicy</a>().</p>
 
107
<h3 class="fn"><a name="setWidgetSizePolicy"></a>void QMacStyle::setWidgetSizePolicy ( const <a href="qwidget.html">QWidget</a> * <i>w</i>, <a href="qmacstyle.html#WidgetSizePolicy-enum">WidgetSizePolicy</a> <i>policy</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
 
108
<p>Sets the widget size policy of <i>w</i>. The <i>policy</i> can be one of <a href="qmacstyle.html#WidgetSizePolicy-enum">QMacStyle::WidgetSizePolicy</a>.</p>
 
109
<p>See also <a href="qmacstyle.html#widgetSizePolicy">widgetSizePolicy</a>().</p>
 
110
<h3 class="fn"><a name="widgetSizePolicy"></a><a href="qmacstyle.html#WidgetSizePolicy-enum">WidgetSizePolicy</a> QMacStyle::widgetSizePolicy ( const <a href="qwidget.html">QWidget</a> * <i>w</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
 
111
<p>Returns the widget size policy for the widget <i>w</i>.</p>
 
112
<p>The widget size policy can be one of <a href="qmacstyle.html#WidgetSizePolicy-enum">QMacStyle::WidgetSizePolicy</a>.</p>
 
113
<p>See also <a href="qmacstyle.html#setWidgetSizePolicy">setWidgetSizePolicy</a>().</p>
 
114
<p /><address><hr /><div align="center">
 
115
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
116
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
117
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
118
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
119
</tr></table></div></address></body>
 
120
</html>