<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qevent.cpp --> <title>QPointingDeviceUniqueId Class | Qt GUI 5.12.6</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"> <table><tr> <td >Qt 5.12</td><td ><a href="qtgui-index.html">Qt GUI</a></td><td ><a href="qtgui-module.html">C++ Classes</a></td><td >QPointingDeviceUniqueId</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right"><a href="qtgui-index.html">Qt 5.12.6 Reference Documentation</a></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="#public-functions">Public Functions</a></li> <li class="level1"><a href="#static-public-members">Static Public Members</a></li> <li class="level1"><a href="#related-non-members">Related Non-Members</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">QPointingDeviceUniqueId Class</h1> <!-- $$$QPointingDeviceUniqueId-brief --> <p><a href="qpointingdeviceuniqueid.html">QPointingDeviceUniqueId</a> identifies a unique object, such as a tagged token or stylus, which is used with a pointing device. <a href="#details">More...</a></p> <!-- @@@QPointingDeviceUniqueId --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QPointingDeviceUniqueId></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += gui</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.8</td></tr></table></div><ul> <li><a href="qpointingdeviceuniqueid-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><a href="qpointingdeviceuniqueid.html#numericId-prop">numericId</a></b> : const qint64</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="qpointingdeviceuniqueid.html#QPointingDeviceUniqueId">QPointingDeviceUniqueId</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointingdeviceuniqueid.html#isValid">isValid</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qpointingdeviceuniqueid.html#numericId-prop">numericId</a></b>() const</td></tr> </table></div> <a name="static-public-members"></a> <h2 id="static-public-members">Static Public Members</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> QPointingDeviceUniqueId </td><td class="memItemRight bottomAlign"><b><a href="qpointingdeviceuniqueid.html#fromNumericId">fromNumericId</a></b>(qint64 <i>id</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> const QMetaObject </td><td class="memItemRight bottomAlign"><b><a href="qpointingdeviceuniqueid.html#staticMetaObject-var">staticMetaObject</a></b></td></tr> </table></div> <a name="related-non-members"></a> <h2 id="related-non-members">Related Non-Members</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> uint </td><td class="memItemRight bottomAlign"><b><a href="qpointingdeviceuniqueid.html#qHash">qHash</a></b>(QPointingDeviceUniqueId <i>key</i>, uint <i>seed</i> = 0)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointingdeviceuniqueid.html#operator-not-eq">operator!=</a></b>(QPointingDeviceUniqueId <i>lhs</i>, QPointingDeviceUniqueId <i>rhs</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointingdeviceuniqueid.html#operator-eq-eq">operator==</a></b>(QPointingDeviceUniqueId <i>lhs</i>, QPointingDeviceUniqueId <i>rhs</i>)</td></tr> </table></div> <a name="details"></a> <!-- $$$QPointingDeviceUniqueId-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p><a href="qpointingdeviceuniqueid.html">QPointingDeviceUniqueId</a> identifies a unique object, such as a tagged token or stylus, which is used with a pointing device.</p> <p>QPointingDeviceUniqueIds can be compared for equality, and can be used as keys in a <a href="../qtcore/qhash.html#qhash">QHash</a>. You get access to the numerical ID via <a href="qpointingdeviceuniqueid.html#numericId-prop">numericId</a>(), if the device supports such IDs. For future extensions, though, you should not use that function, but compare objects of this type using the equality operator.</p> <p>This class is a thin wrapper around an integer ID. You pass it into and out of functions by value.</p> <p>This type actively prevents you from holding it in a <a href="../qtcore/qlist.html">QList</a>, because doing so would be very inefficient. Use a <a href="../qtcore/qvector.html">QVector</a> instead, which has the same API as <a href="../qtcore/qlist.html">QList</a>, but more efficient storage.</p> </div> <p><b>See also </b><a href="qtouchevent-touchpoint.html">QTouchEvent::TouchPoint</a>.</p> <!-- @@@QPointingDeviceUniqueId --> <div class="prop"> <h2>Property Documentation</h2> <!-- $$$numericId-prop$$$numericId --> <h3 class="fn" id="numericId-prop"><a name="numericId-prop"></a><span class="name">numericId</span> : const <span class="type"><a href="../qtcore/qtglobal.html#qint64-typedef">qint64</a></span></h3> <p>This property holds the numeric unique ID of the token represented by a touchpoint</p> <p>If the device provides a numeric ID, <a href="qpointingdeviceuniqueid.html#isValid">isValid</a>() returns true, and this property provides the numeric ID; otherwise it is -1.</p> <p>You should not use the value of this property in portable code, but instead rely on equality to identify pointers.</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> qint64 </td><td class="memItemRight bottomAlign"><span class="name"><b>numericId</b></span>() const</td></tr> </table></div> <p><b>See also </b><a href="qpointingdeviceuniqueid.html#isValid">isValid</a>().</p> <!-- @@@numericId --> </div> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QPointingDeviceUniqueId[overload1]$$$QPointingDeviceUniqueId --> <h3 class="fn" id="QPointingDeviceUniqueId"><a name="QPointingDeviceUniqueId"></a>QPointingDeviceUniqueId::<span class="name">QPointingDeviceUniqueId</span>()</h3> <p>Constructs an invalid unique pointer ID.</p> <!-- @@@QPointingDeviceUniqueId --> <!-- $$$fromNumericId[overload1]$$$fromNumericIdqint64 --> <h3 class="fn" id="fromNumericId"><a name="fromNumericId"></a><code>[static] </code><span class="type"><a href="qpointingdeviceuniqueid.html#QPointingDeviceUniqueId">QPointingDeviceUniqueId</a></span> QPointingDeviceUniqueId::<span class="name">fromNumericId</span>(<span class="type"><a href="../qtcore/qtglobal.html#qint64-typedef">qint64</a></span> <i>id</i>)</h3> <p>Constructs a unique pointer ID from numeric ID <i>id</i>.</p> <!-- @@@fromNumericId --> <!-- $$$isValid[overload1]$$$isValid --> <h3 class="fn" id="isValid"><a name="isValid"></a><span class="type">bool</span> QPointingDeviceUniqueId::<span class="name">isValid</span>() const</h3> <p>Returns whether this unique pointer ID is valid, that is, it represents an actual pointer.</p> <!-- @@@isValid --> </div> <div class="relnonmem"> <h2>Related Non-Members</h2> <!-- $$$qHash[overload1]$$$qHashQPointingDeviceUniqueIduint --> <h3 class="fn" id="qHash"><a name="qHash"></a><span class="type"><a href="../qtcore/qtglobal.html#uint-typedef">uint</a></span> <span class="name">qHash</span>(<span class="type"><a href="qpointingdeviceuniqueid.html#QPointingDeviceUniqueId">QPointingDeviceUniqueId</a></span> <i>key</i>, <span class="type"><a href="../qtcore/qtglobal.html#uint-typedef">uint</a></span> <i>seed</i> = 0)</h3> <p>Returns the hash value for <i>key</i>, using <i>seed</i> to seed the calculation.</p> <p>This function was introduced in Qt 5.8.</p> <!-- @@@qHash --> <!-- $$$operator!=[overload1]$$$operator!=QPointingDeviceUniqueIdQPointingDeviceUniqueId --> <h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> <span class="name">operator!=</span>(<span class="type"><a href="qpointingdeviceuniqueid.html#QPointingDeviceUniqueId">QPointingDeviceUniqueId</a></span> <i>lhs</i>, <span class="type"><a href="qpointingdeviceuniqueid.html#QPointingDeviceUniqueId">QPointingDeviceUniqueId</a></span> <i>rhs</i>)</h3> <p>Returns whether the two unique pointer IDs <i>lhs</i> and <i>rhs</i> identify different pointers (<code>true</code>) or not (<code>false</code>).</p> <p>This function was introduced in Qt 5.8.</p> <!-- @@@operator!= --> <!-- $$$operator==[overload1]$$$operator==QPointingDeviceUniqueIdQPointingDeviceUniqueId --> <h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> <span class="name">operator==</span>(<span class="type"><a href="qpointingdeviceuniqueid.html#QPointingDeviceUniqueId">QPointingDeviceUniqueId</a></span> <i>lhs</i>, <span class="type"><a href="qpointingdeviceuniqueid.html#QPointingDeviceUniqueId">QPointingDeviceUniqueId</a></span> <i>rhs</i>)</h3> <p>Returns whether the two unique pointer IDs <i>lhs</i> and <i>rhs</i> identify the same pointer (<code>true</code>) or not (<code>false</code>).</p> <p>This function was introduced in Qt 5.8.</p> <!-- @@@operator== --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 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>