Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-release > by-pkgid > 886c2ed147b4d6954d2d9fb23759f3ff > files > 209

qtquickcontrols25-doc-5.6.2-1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qquickdrawer.cpp -->
  <title>Drawer QML Type | Qt Labs Controls 5.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    window.onload = function(){document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");};
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.6</td><td ><a href="qtlabscontrols-index.html">Qt Labs Controls</a></td><td ><a href="qt-labs-controls-qmlmodule.html">QML Types</a></td><td >Drawer QML Type</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.6.2 Reference Documentation</td>
        </tr></table>
      </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="#properties">Properties</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#methods">Methods</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">Drawer QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Drawer-brief -->
<p>A side panel control. <a href="#details">More...</a></p>
<!-- @@@Drawer -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import Qt.labs.controls 1.0</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qt-labs-controls-container.html">Container</a></p>
</td></tr></table></div><ul>
<li><a href="qml-qt-labs-controls-drawer-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qt-labs-controls-drawer.html#animation-prop">animation</a></b></b> : Animation</li>
<li class="fn"><b><b><a href="qml-qt-labs-controls-drawer.html#contentItem-prop">contentItem</a></b></b> : Item</li>
<li class="fn"><b><b><a href="qml-qt-labs-controls-drawer.html#edge-prop">edge</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qt-labs-controls-drawer.html#position-prop">position</a></b></b> : real</li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<ul>
<li class="fn">void <b><b><a href="qml-qt-labs-controls-drawer.html#clicked-signal">clicked</a></b></b>()</li>
</ul>
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn">void <b><b><a href="qml-qt-labs-controls-drawer.html#close-method">close</a></b></b>()</li>
<li class="fn">void <b><b><a href="qml-qt-labs-controls-drawer.html#open-method">open</a></b></b>()</li>
</ul>
<!-- $$$Drawer-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>Drawer provides a swipe-based side panel, similar to those often used in touch interfaces to provide a central location for navigation.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><p class="centerAlign"><img src="images/qtlabscontrols-drawer-wireframe.png" alt="" /></p><p>Drawer can be positioned at any of the four edges of the content item. <br />
 In this image, it is against the left edge of the window.</p>
</td><td ><p class="centerAlign"><img src="images/qtlabscontrols-drawer-expanded-wireframe.png" alt="" /></p><p>The drawer is then opened by <i>&quot;dragging&quot;</i> it out from the left edge <br />
 of the window.</p>
</td></tr>
</table></div>
<p>In the image above, the application's contents are <i>&quot;pushed&quot;</i> across the screen. This is achieved by applying a translation to the contents:</p>
<pre class="cpp">

  transform: Translate {
      x: (<span class="number">1.0</span> <span class="operator">-</span> drawer<span class="operator">.</span>position) <span class="operator">*</span> listview<span class="operator">.</span>width
  }

</pre>
<p>If you would like the application's contents to stay where they are when the drawer is opened, don't apply a translation.</p>
<p><b>Note: </b><i>Types in the Qt.labs module are not guaranteed to remain compatible in future versions.</i></p><p><b>See also </b><a href="qml-qt-labs-controls-swipeview.html">SwipeView</a>, <a href="qtlabscontrols-customize.html#customizing-drawer">Customizing Drawer</a>, <a href="qtlabscontrols-navigation.html">Navigation Controls</a>, and <a href="qtlabscontrols-containers.html">Container Controls</a>.</p>
<!-- @@@Drawer -->
<h2>Property Documentation</h2>
<!-- $$$animation -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="animation-prop">
<td class="tblQmlPropNode"><p>
<a name="animation-prop"></a><span class="name">animation</span> : <span class="type">Animation</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the animation for the <a href="qml-qt-labs-controls-drawer.html#position-prop">position</a> property. It is used to animate the drawer's movement.</p>
<p>If no valid animation is set, the drawer's movement will not be animated.</p>
</div></div><!-- @@@animation -->
<br/>
<!-- $$$contentItem -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="contentItem-prop">
<td class="tblQmlPropNode"><p>
<a name="contentItem-prop"></a><span class="name">contentItem</span> : <span class="type">Item</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the content item that the drawer displays when opened.</p>
</div></div><!-- @@@contentItem -->
<br/>
<!-- $$$edge -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="edge-prop">
<td class="tblQmlPropNode"><p>
<a name="edge-prop"></a><span class="name">edge</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the edge of the content item at which the drawer will open from. The acceptable values are:</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>Qt.TopEdge</code></td><td class="topAlign">The top edge of the content item.</td></tr>
<tr><td class="topAlign"><code>Qt.LeftEdge</code></td><td class="topAlign">The left edge of the content item (default).</td></tr>
<tr><td class="topAlign"><code>Qt.RightEdge</code></td><td class="topAlign">The right edge of the content item.</td></tr>
<tr><td class="topAlign"><code>Qt.BottomEdge</code></td><td class="topAlign">The bottom edge of the content item.</td></tr>
</table></div>
</div></div><!-- @@@edge -->
<br/>
<!-- $$$position -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="position-prop">
<td class="tblQmlPropNode"><p>
<a name="position-prop"></a><span class="name">position</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the position of the drawer relative to its final destination. That is, the position will be <code>0</code> when the drawer is fully closed, and <code>1</code> when fully open.</p>
</div></div><!-- @@@position -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$clicked -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="clicked-signal">
<td class="tblQmlFuncNode"><p>
<a name="clicked-signal"></a><span class="type">void</span> <span class="name">clicked</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when the drawer is clicked.</p>
</div></div><!-- @@@clicked -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$close -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="close-method">
<td class="tblQmlFuncNode"><p>
<a name="close-method"></a><span class="type">void</span> <span class="name">close</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This method closes the drawer, animating the movement if a valid <a href="qml-qt-labs-controls-drawer.html#animation-prop">animation</a> has been set.</p>
</div></div><!-- @@@close -->
<br/>
<!-- $$$open -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="open-method">
<td class="tblQmlFuncNode"><p>
<a name="open-method"></a><span class="type">void</span> <span class="name">open</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This method opens the drawer, animating the movement if a valid <a href="qml-qt-labs-controls-drawer.html#animation-prop">animation</a> has been set.</p>
</div></div><!-- @@@open -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2016 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>