This repository has been archived by the owner on May 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdtk-widget-dbuttonbox.html
160 lines (160 loc) · 11.8 KB
/
dtk-widget-dbuttonbox.html
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- dbuttonbox.cpp -->
<title>DButtonBox Class | Dtk Reference Documentation 1.0.0</title>
<link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
<script type="text/javascript">
document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
// loading style sheet breaks anchors that were jumped to before
// so force jumping to anchor again
setTimeout(function() {
var anchor = location.hash;
// need to jump to different anchor first (e.g. none)
location.hash = "#";
setTimeout(function() {
location.hash = anchor;
}, 0);
}, 0);
</script>
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li><a href="index.html">Dtk Doc</a></li>
<li><a href="index.html">Dtk Reference Documentation</a></li>
<li>DButtonBox</li>
<li id="buildversion"><a href="index.html">Qt 5.15.2 Reference Documentation</a></li>
</ul>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">DButtonBox Class</h1>
<span class="small-subtitle">class <a href="dtk.html">Dtk</a>::<a href="dtk-widget.html">Widget</a>::DButtonBox</span>
<!-- $$$DButtonBox-brief -->
<p>DButtonBox 类似于 <a href="http://doc.qt.io/qt-5/qbuttongroup.html">QButtonGroup</a> 的类. <a href="#details">More...</a></p>
<!-- @@@DButtonBox -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <DButtonBox></span>
</td></tr></table></div><ul>
<li><a href="dtk-widget-dbuttonbox-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="dtk-widget-dbuttonbox.html#DButtonBox">DButtonBox</a></b>(QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractButton *</td><td class="memItemRight bottomAlign"><b><a href="dtk-widget-dbuttonbox.html#button">button</a></b>(int <i>id</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList<QAbstractButton *> </td><td class="memItemRight bottomAlign"><b><a href="dtk-widget-dbuttonbox.html#buttonList">buttonList</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractButton *</td><td class="memItemRight bottomAlign"><b><a href="dtk-widget-dbuttonbox.html#checkedButton">checkedButton</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="dtk-widget-dbuttonbox.html#checkedId">checkedId</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="dtk-widget-dbuttonbox.html#id">id</a></b>(QAbstractButton *<i>button</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::Orientation </td><td class="memItemRight bottomAlign"><b><a href="dtk-widget-dbuttonbox.html#orientation">orientation</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="dtk-widget-dbuttonbox.html#setButtonList">setButtonList</a></b>(const QList<Dtk::Widget::DButtonBoxButton *> &<i>list</i>, bool <i>checkable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="dtk-widget-dbuttonbox.html#setId">setId</a></b>(QAbstractButton *<i>button</i>, int <i>id</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="dtk-widget-dbuttonbox.html#setOrientation">setOrientation</a></b>(Qt::Orientation <i>orientation</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$DButtonBox-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>DButtonBox 提供了对按钮的布局方向</p>
<pre class="cpp">
DButtonBox box;
DButtonBoxButton <span class="operator">*</span>btn1 <span class="operator">=</span> <span class="keyword">new</span> DButtonBoxButton(<span class="string">"btn1"</span>);
DButtonBoxButton <span class="operator">*</span>btn2 <span class="operator">=</span> <span class="keyword">new</span> DButtonBoxButton(<span class="string">"btn2"</span>);
btn1<span class="operator">-</span><span class="operator">></span>setIcon(<span class="type"><a href="http://doc.qt.io/qt-5/qstyle.html">QStyle</a></span><span class="operator">::</span>StandardPixmap<span class="operator">::</span>SP_ArrowUp);
box<span class="operator">.</span>setButtonList({btn1<span class="operator">,</span> btn2}<span class="operator">,</span> <span class="keyword">true</span>);
</pre>
<p class="centerAlign"><img src="images/DButtonBox.png" alt="" /></p></div>
<p><b>See also </b><a href="dtk-widget-dbuttonboxbutton.html">Dtk::Widget::DButtonBoxButton</a>.</p>
<!-- @@@DButtonBox -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$DButtonBox[overload1]$$$DButtonBoxQWidget* -->
<h3 class="fn" id="DButtonBox"><a name="DButtonBox"></a>DButtonBox::<span class="name">DButtonBox</span>(<span class="type"><a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a></span> *<i>parent</i> = nullptr)</h3>
<p><a href="dtk-widget-dbuttonbox.html">DButtonBox::DButtonBox</a> 构造函数.</p>
<p><i>parent</i> 参数被发送到 <a href="http://doc.qt.io/qt-5/qwidget.html">QWidget</a> 构造函数</p>
<!-- @@@DButtonBox -->
<!-- $$$button[overload1]$$$buttonint -->
<h3 class="fn" id="button"><a name="button"></a><span class="type"><a href="http://doc.qt.io/qt-5/qabstractbutton.html">QAbstractButton</a></span> *DButtonBox::<span class="name">button</span>(<span class="type">int</span> <i>id</i>) const</h3>
<p>DButtonBox::button</p>
<p><i>id</i> 按钮的ID,与 <a href="dtk-widget-dbuttonbox.html#setId">DButtonBox::setId</a> 设置的参数一致. Returns 返回对应<i>id</i> 的按钮,不存在返回 nullptr .</p>
<p><b>See also </b><a href="http://doc.qt.io/qt-5/qbuttongroup.html#button">QButtonGroup::button</a>().</p>
<!-- @@@button -->
<!-- $$$buttonList[overload1]$$$buttonList -->
<h3 class="fn" id="buttonList"><a name="buttonList"></a><span class="type"><a href="http://doc.qt.io/qt-5/qlist.html">QList</a></span><<span class="type"><a href="http://doc.qt.io/qt-5/qabstractbutton.html">QAbstractButton</a></span> *> DButtonBox::<span class="name">buttonList</span>() const</h3>
<p>DButtonBox::buttonList.</p>
<p>Returns 返回按钮列表.</p>
<p><b>See also </b><a href="dtk-widget-dbuttonbox.html#setButtonList">setButtonList</a>() and <a href="http://doc.qt.io/qt-5/qbuttongroup.html#buttons">QButtonGroup::buttons</a>().</p>
<!-- @@@buttonList -->
<!-- $$$checkedButton[overload1]$$$checkedButton -->
<h3 class="fn" id="checkedButton"><a name="checkedButton"></a><span class="type"><a href="http://doc.qt.io/qt-5/qabstractbutton.html">QAbstractButton</a></span> *DButtonBox::<span class="name">checkedButton</span>() const</h3>
<p>DButtonBox::checkedButton.</p>
<p>Returns 返回 checked 状态的按钮.</p>
<p><b>See also </b><a href="http://doc.qt.io/qt-5/qbuttongroup.html#checkedButton">QButtonGroup::checkedButton</a>().</p>
<!-- @@@checkedButton -->
<!-- $$$checkedId[overload1]$$$checkedId -->
<h3 class="fn" id="checkedId"><a name="checkedId"></a><span class="type">int</span> DButtonBox::<span class="name">checkedId</span>() const</h3>
<p>返回已选中按钮 id .</p>
<p>Returns 返回已选中按钮 id .</p>
<p><b>See also </b><a href="http://doc.qt.io/qt-5/qbuttongroup.html">QButtonGroup</a>.</p>
<!-- @@@checkedId -->
<!-- $$$id[overload1]$$$idQAbstractButton* -->
<h3 class="fn" id="id"><a name="id"></a><span class="type">int</span> DButtonBox::<span class="name">id</span>(<span class="type"><a href="http://doc.qt.io/qt-5/qabstractbutton.html">QAbstractButton</a></span> *<i>button</i>) const</h3>
<p>返回按钮 id .</p>
<p><i>button</i> 对应的按钮.</p>
<p><b>See also </b><a href="dtk-widget-dbuttonbox.html#setId">setId</a>() and <a href="http://doc.qt.io/qt-5/qbuttongroup.html#id">QButtonGroup::id</a>().</p>
<!-- @@@id -->
<!-- $$$orientation[overload1]$$$orientation -->
<h3 class="fn" id="orientation"><a name="orientation"></a><span class="type"><a href="http://doc.qt.io/qt-5/qt.html#Orientation-enum">Qt::Orientation</a></span> DButtonBox::<span class="name">orientation</span>() const</h3>
<p>DButtonBox::orientation 返回布局方向.</p>
<p><b>See also </b><a href="dtk-widget-dbuttonbox.html#setOrientation">setOrientation</a>() and <a href="http://doc.qt.io/qt-5/qt.html#Orientation-enum">Qt::Orientation</a>.</p>
<!-- @@@orientation -->
<!-- $$$setButtonList[overload1]$$$setButtonListconstQList<Dtk::Widget::DButtonBoxButton*>&bool -->
<h3 class="fn" id="setButtonList"><a name="setButtonList"></a><span class="type">void</span> DButtonBox::<span class="name">setButtonList</span>(const <span class="type"><a href="http://doc.qt.io/qt-5/qlist.html">QList</a></span><<span class="type"><a href="dtk-widget-dbuttonboxbutton.html">Dtk::Widget::DButtonBoxButton</a></span> *> &<i>list</i>, <span class="type">bool</span> <i>checkable</i>)</h3>
<p>DButtonBox::setButtonList将按钮进添加到组中.</p>
<p><i>list</i> 存储按钮的 <a href="http://doc.qt.io/qt-5/qlist.html">QList</a> 列表 <i>checkable</i> 按钮是否可选中</p>
<p><b>See also </b><a href="dtk-widget-dbuttonbox.html#buttonList">buttonList</a>().</p>
<!-- @@@setButtonList -->
<!-- $$$setId[overload1]$$$setIdQAbstractButton*int -->
<h3 class="fn" id="setId"><a name="setId"></a><span class="type">void</span> DButtonBox::<span class="name">setId</span>(<span class="type"><a href="http://doc.qt.io/qt-5/qabstractbutton.html">QAbstractButton</a></span> *<i>button</i>, <span class="type">int</span> <i>id</i>)</h3>
<p>设置按钮 id .</p>
<p><i>button</i> 用于设置 <i>id</i> 的按钮。</p>
<p><b>See also </b><a href="dtk-widget-dbuttonbox.html#id">id</a>() and <a href="http://doc.qt.io/qt-5/qbuttongroup.html#setId">QButtonGroup::setId</a>().</p>
<!-- @@@setId -->
<!-- $$$setOrientation[overload1]$$$setOrientationQt::Orientation -->
<h3 class="fn" id="setOrientation"><a name="setOrientation"></a><span class="type">void</span> DButtonBox::<span class="name">setOrientation</span>(<span class="type"><a href="http://doc.qt.io/qt-5/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>)</h3>
<p>DButtonBox::setOrientation 设置布局方向.</p>
<p><i>orientation</i></p>
<p><b>See also </b><a href="dtk-widget-dbuttonbox.html#orientation">orientation</a>() and <a href="http://doc.qt.io/qt-5/qt.html#Orientation-enum">Qt::Orientation</a>.</p>
<!-- @@@setOrientation -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2020 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>