Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 2c21526e2a037dc4eaceb3895021e482 > files > 111

qtlocation5-doc-5.12.6-1.mga7.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" />
<!-- qdeclarativecategory.cpp -->
  <title>Category QML Type | Qt Location 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="qtlocation-index.html">Qt Location</a></td><td ><a href="qtlocation-qmlmodule.html">QML Types</a></td><td >Category QML Type</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtlocation-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="#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">Category QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Category-brief -->
<p>The Category type represents a category that a <a href="qml-qtlocation-place.html">Place</a> can be associated with. <a href="#details">More...</a></p>
<!-- @@@Category -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtLocation 5.12</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  QtLocation 5.5</td></tr></table></div><ul>
<li><a href="qml-qtlocation-category-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-qtlocation-category.html#category-prop">category</a></b></b> : QPlaceCategory</li>
<li class="fn"><b><b><a href="qml-qtlocation-category.html#categoryId-prop">categoryId</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtlocation-category.html#icon-prop">icon</a></b></b> : PlaceIcon</li>
<li class="fn"><b><b><a href="qml-qtlocation-category.html#name-prop">name</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtlocation-category.html#plugin-prop">plugin</a></b></b> : Plugin</li>
<li class="fn"><b><b><a href="qml-qtlocation-category.html#status-prop">status</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtlocation-category.html#visibility-prop">visibility</a></b></b> : enumeration</li>
</ul>
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn">string <b><b><a href="qml-qtlocation-category.html#errorString-method">errorString</a></b></b>()</li>
<li class="fn">void <b><b><a href="qml-qtlocation-category.html#remove-method">remove</a></b></b>()</li>
<li class="fn">void <b><b><a href="qml-qtlocation-category.html#save-method">save</a></b></b>()</li>
</ul>
<!-- $$$Category-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>Categories are used to search for places based on the categories they are associated with. The list of available categories can be obtained from the <a href="qml-qtlocation-categorymodel.html">CategoryModel</a>. The <a href="qml-qtlocation-placesearchmodel.html">PlaceSearchModel</a> has a <a href="qml-qtlocation-placesearchmodel.html#categories-prop">categories</a> property that is used to limit the search results to places with the specified categories.</p>
<p>If the <a href="location-places-qml.html#plugin">Plugin</a> supports it, categories can be created or removed. To create a new category construct a new Category object and set its properties, then invoke the <a href="qml-qtlocation-category.html#save-method">save()</a> method.</p>
<pre class="qml">

  import QtPositioning 5.5
  import QtLocation 5.6

  Category {
      id: category

      plugin: myPlugin
      name: "New Category"
      visibility: Category.PrivateVisibility
  }
  ...
  category.save();

</pre>
<p>To remove a category ensure that the <a href="location-places-qml.html#plugin">plugin</a> and <a href="qml-qtlocation-category.html#categoryId-prop">categoryId</a> properties are set and call the <a href="qml-qtlocation-category.html#remove-method">remove()</a> method.</p>
<p><b>See also </b><a href="qml-qtlocation-categorymodel.html">CategoryModel</a>.</p>
<!-- @@@Category -->
<h2>Property Documentation</h2>
<!-- $$$category -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="category-prop">
<td class="tblQmlPropNode"><p>
<a name="category-prop"></a><span class="name">category</span> : <span class="type">QPlaceCategory</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>For details on how to use this property to interface between C++ and QML see &quot;<a href="location-cpp-qml.html#category-qplacecategory">Interfaces between C++ and QML Code</a>&quot;.</p>
</div></div><!-- @@@category -->
<br/>
<!-- $$$categoryId -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="categoryId-prop">
<td class="tblQmlPropNode"><p>
<a name="categoryId-prop"></a><span class="name">categoryId</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the identifier of the category. The categoryId is a string which uniquely identifies this category within the categories <a href="location-places-qml.html#plugin">plugin</a>.</p>
</div></div><!-- @@@categoryId -->
<br/>
<!-- $$$icon -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="icon-prop">
<td class="tblQmlPropNode"><p>
<a name="icon-prop"></a><span class="name">icon</span> : <span class="type">PlaceIcon</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the image source associated with the category. To display the icon you can use the Image type.</p>
</div></div><!-- @@@icon -->
<br/>
<!-- $$$name -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="name-prop">
<td class="tblQmlPropNode"><p>
<a name="name-prop"></a><span class="name">name</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds string based name of the category.</p>
</div></div><!-- @@@name -->
<br/>
<!-- $$$plugin -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="plugin-prop">
<td class="tblQmlPropNode"><p>
<a name="plugin-prop"></a><span class="name">plugin</span> : <span class="type"><a href="qml-qtlocation-plugin.html">Plugin</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the location based service to which the category belongs.</p>
</div></div><!-- @@@plugin -->
<br/>
<!-- $$$status -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="status-prop">
<td class="tblQmlPropNode"><p>
<a name="status-prop"></a><span class="name">status</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the status of the category. It can be one of:</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td >Category.Ready</td><td >No error occurred during the last operation, further operations may be performed on the category.</td></tr>
<tr valign="top" class="even"><td >Category.Saving</td><td >The category is currently being saved, no other operations may be performed until the current operation completes.</td></tr>
<tr valign="top" class="odd"><td >Category.Removing</td><td >The category is currently being removed, no other operations can be performed until the current operation completes.</td></tr>
<tr valign="top" class="even"><td >Category.Error</td><td >An error occurred during the last operation, further operations can still be performed on the category.</td></tr>
</table></div>
</div></div><!-- @@@status -->
<br/>
<!-- $$$visibility -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="visibility-prop">
<td class="tblQmlPropNode"><p>
<a name="visibility-prop"></a><span class="name">visibility</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the visibility of the category. It can be one of:</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td >Category.UnspecifiedVisibility</td><td >The visibility of the category is unspecified. If saving a category, the plugin will automatically set a default visibility to the category saved in the backend. This default is dependent on the plugin implementation.</td></tr>
<tr valign="top" class="even"><td >Category.DeviceVisibility</td><td >The category is limited to the current device. The category will not be transferred off of the device.</td></tr>
<tr valign="top" class="odd"><td >Category.PrivateVisibility</td><td >The category is private to the current user. The category may be transferred to an online service but is only ever visible to the current user.</td></tr>
<tr valign="top" class="even"><td >Category.PublicVisibility</td><td >The category is public.</td></tr>
</table></div>
<p>Note that visibility does not affect how <a href="qml-qtlocation-place.html">Place</a>s associated with the category are displayed in the user-interface of an application on the device. Instead, it defines the sharing semantics of the category.</p>
</div></div><!-- @@@visibility -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$errorString -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="errorString-method">
<td class="tblQmlFuncNode"><p>
<a name="errorString-method"></a><span class="type">string</span> <span class="name">errorString</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Returns a string description of the error of the last operation. If the last operation completed successfully then the string is empty.</p>
</div></div><!-- @@@errorString -->
<br/>
<!-- $$$remove -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="remove-method">
<td class="tblQmlFuncNode"><p>
<a name="remove-method"></a><span class="type">void</span> <span class="name">remove</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This method permanently removes the category from the backend service.</p>
</div></div><!-- @@@remove -->
<br/>
<!-- $$$save -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="save-method">
<td class="tblQmlFuncNode"><p>
<a name="save-method"></a><span class="type">void</span> <span class="name">save</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This method saves the category to the backend service.</p>
</div></div><!-- @@@save -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</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>