/usr/share/qt5/doc/qtqml/qqmlincubationcontroller.html is in qtdeclarative5-doc-html 5.5.1-2ubuntu6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qqmlincubator.cpp -->
<title>QQmlIncubationController Class | Qt QML 5.5</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li>Qt 5.5</li>
<li><a href="qtqml-index.html">Qt QML</a></li>
<li><a href="qtqml-module.html">C++ Classes</a></li>
<li>QQmlIncubationController</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</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="#protected-functions">Protected 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">QQmlIncubationController Class</h1>
<!-- $$$QQmlIncubationController-brief -->
<p><a href="qqmlincubationcontroller.html">QQmlIncubationController</a> instances drive the progress of QQmlIncubators <a href="#details">More...</a></p>
<!-- @@@QQmlIncubationController -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QQmlIncubationController></span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += qml</td></tr></table></div><ul>
<li><a href="qqmlincubationcontroller-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="qqmlincubationcontroller.html#QQmlIncubationController">QQmlIncubationController</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQmlEngine * </td><td class="memItemRight bottomAlign"><b><a href="qqmlincubationcontroller.html#engine">engine</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qqmlincubationcontroller.html#incubateFor">incubateFor</a></b>(int<i> msecs</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qqmlincubationcontroller.html#incubateWhile">incubateWhile</a></b>(volatile bool *<i> flag</i>, int<i> msecs</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qqmlincubationcontroller.html#incubatingObjectCount">incubatingObjectCount</a></b>() const</td></tr>
</table></div>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qqmlincubationcontroller.html#incubatingObjectCountChanged">incubatingObjectCountChanged</a></b>(int<i> incubatingObjectCount</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QQmlIncubationController-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p><a href="qqmlincubationcontroller.html">QQmlIncubationController</a> instances drive the progress of QQmlIncubators</p>
<p>In order to behave asynchronously and not introduce stutters or freezes in an application, the process of creating objects a QQmlIncubators must be driven only during the application's idle time. <a href="qqmlincubationcontroller.html">QQmlIncubationController</a> allows the application to control exactly when, how often and for how long this processing occurs.</p>
<p>A <a href="qqmlincubationcontroller.html">QQmlIncubationController</a> derived instance should be created and set on a <a href="qqmlengine.html">QQmlEngine</a> by calling the <a href="qqmlengine.html#setIncubationController">QQmlEngine::setIncubationController</a>() method. Processing is then controlled by calling the <a href="qqmlincubationcontroller.html#incubateFor">QQmlIncubationController::incubateFor</a>() or <a href="qqmlincubationcontroller.html#incubateWhile">QQmlIncubationController::incubateWhile</a>() methods as dictated by the application's requirements.</p>
<p>For example, this is an example of a incubation controller that will incubate for a maximum of 5 milliseconds out of every 16 milliseconds.</p>
<pre class="cpp"><span class="keyword">class</span> PeriodicIncubationController : <span class="keyword">public</span> <span class="type">QObject</span><span class="operator">,</span>
<span class="keyword">public</span> <span class="type"><a href="qqmlincubationcontroller.html#QQmlIncubationController">QQmlIncubationController</a></span>
{
<span class="keyword">public</span>:
PeriodicIncubationController() {
startTimer(<span class="number">16</span>);
}
<span class="keyword">protected</span>:
<span class="keyword">virtual</span> <span class="type">void</span> timerEvent(<span class="type">QTimerEvent</span> <span class="operator">*</span>) {
incubateFor(<span class="number">5</span>);
}
};</pre>
<p>Although the previous example would work, it is not optimal. Real world incubation controllers should try and maximize the amount of idle time they consume - rather than a static amount like 5 milliseconds - while not disturbing the application.</p>
</div>
<!-- @@@QQmlIncubationController -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QQmlIncubationController[overload1]$$$QQmlIncubationController -->
<h3 class="fn" id="QQmlIncubationController"><a name="QQmlIncubationController"></a>QQmlIncubationController::<span class="name">QQmlIncubationController</span>()</h3>
<p>Create a new incubation controller.</p>
<!-- @@@QQmlIncubationController -->
<!-- $$$engine[overload1]$$$engine -->
<h3 class="fn" id="engine"><a name="engine"></a><span class="type"><a href="qqmlengine.html">QQmlEngine</a></span> * QQmlIncubationController::<span class="name">engine</span>() const</h3>
<p>Return the <a href="qqmlengine.html">QQmlEngine</a> this incubation controller is set on, or 0 if it has not been set on any engine.</p>
<!-- @@@engine -->
<!-- $$$incubateFor[overload1]$$$incubateForint -->
<h3 class="fn" id="incubateFor"><a name="incubateFor"></a><span class="type">void</span> QQmlIncubationController::<span class="name">incubateFor</span>(<span class="type">int</span><i> msecs</i>)</h3>
<p>Incubate objects for <i>msecs</i>, or until there are no more objects to incubate.</p>
<!-- @@@incubateFor -->
<!-- $$$incubateWhile[overload1]$$$incubateWhilevolatilebool*int -->
<h3 class="fn" id="incubateWhile"><a name="incubateWhile"></a><span class="type">void</span> QQmlIncubationController::<span class="name">incubateWhile</span>(<span class="type">volatile</span> <span class="type">bool</span> *<i> flag</i>, <span class="type">int</span><i> msecs</i> = 0)</h3>
<p>Incubate objects while the bool pointed to by <i>flag</i> is true, or until there are no more objects to incubate, or up to <i>msecs</i> if <i>msecs</i> is not zero.</p>
<p>Generally this method is used in conjunction with a thread or a UNIX signal that sets the bool pointed to by <i>flag</i> to false when it wants incubation to be interrupted.</p>
<!-- @@@incubateWhile -->
<!-- $$$incubatingObjectCount[overload1]$$$incubatingObjectCount -->
<h3 class="fn" id="incubatingObjectCount"><a name="incubatingObjectCount"></a><span class="type">int</span> QQmlIncubationController::<span class="name">incubatingObjectCount</span>() const</h3>
<p>Return the number of objects currently incubating.</p>
<!-- @@@incubatingObjectCount -->
<!-- $$$incubatingObjectCountChanged[overload1]$$$incubatingObjectCountChangedint -->
<h3 class="fn" id="incubatingObjectCountChanged"><a name="incubatingObjectCountChanged"></a><code>[virtual protected] </code><span class="type">void</span> QQmlIncubationController::<span class="name">incubatingObjectCountChanged</span>(<span class="type">int</span><i> incubatingObjectCount</i>)</h3>
<p>Called when the number of incubating objects changes. <i>incubatingObjectCount</i> is the new number of incubating objects.</p>
<p>The default implementation does nothing.</p>
<!-- @@@incubatingObjectCountChanged -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2015 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>
|