Update pages 🚀

This commit is contained in:
Dorian Zedler 2022-08-05 07:46:55 +00:00
commit cc3bb3e974
15 changed files with 5420 additions and 0 deletions

117
annotated.html Normal file
View file

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Qt BluetoothLE UART library</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
<link rel="icon" href="favicon-dark.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0094ff" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">Qt BluetoothLE UART library</a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
</ol>
<ol class="m-col-t-6 m-col-m-none" start="1">
<li><a href="index.html">Introduction</a></li>
<li><a href="annotated.html" id="m-navbar-current">Classes</a></li>
<li><a href="refman.pdf">Download</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>Classes</h1>
<ul class="m-doc">
<li>class <a href="classQBluetoothLeUartClient.html" class="m-doc">QBluetoothLeUartClient</a> <span class="m-doc">The <a href="classQBluetoothLeUartClient.html" class="m-doc">QBluetoothLeUartClient</a> class can be used to talk to BluetoothLE devices via UART effordlessly. It can be used via C++ and QML.</span></li>
<li>class <a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a> <span class="m-doc">The <a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a> class is a helper class for use with QBluetoothLeUart. It is used to get device details and connect to devices.</span></li>
<li>class <a href="classQBluetoothLeUartDeviceModel.html" class="m-doc">QBluetoothLeUartDeviceModel</a> <span class="m-doc">The <a href="classQBluetoothLeUartDeviceModel.html" class="m-doc">QBluetoothLeUartDeviceModel</a> class can be used to display available devices in a QML ListView.</span></li>
</ul>
<script>
function toggle(e) {
e.parentElement.className = e.parentElement.className == 'm-doc-collapsible' ?
'm-doc-expansible' : 'm-doc-collapsible';
return false;
}
/* Collapse all nodes marked as such. Doing it via JS instead of
directly in markup so disabling it doesn't harm usability. The list
is somehow regenerated on every iteration and shrinks as I change
the classes. It's not documented anywhere and I'm not sure if this
is the same across browsers, so I am going backwards in that list to
be sure. */
var collapsed = document.getElementsByClassName("collapsed");
for(var i = collapsed.length - 1; i >= 0; --i)
collapsed[i].className = 'm-doc-expansible';
</script>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount">&hellip;</div>
</div>
<div class="m-doc-search-content">
<form>
<input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div id="search-help" class="m-text m-dim m-text-center">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
/ <span class="m-label m-dim">&uarr;</span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<p>Qt BluetoothLE UART library. Created with <a href="https://doxygen.org/">Doxygen</a> 1.9.4 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
</div>
</div>
</div>
</nav></footer>
</body>
</html>

View file

@ -0,0 +1,548 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>QBluetoothLeUartClient class | Qt BluetoothLE UART library</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
<link rel="icon" href="favicon-dark.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0094ff" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">Qt BluetoothLE UART library</a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
</ol>
<ol class="m-col-t-6 m-col-m-none" start="1">
<li><a href="index.html">Introduction</a></li>
<li><a href="annotated.html">Classes</a></li>
<li><a href="refman.pdf">Download</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>
QBluetoothLeUartClient <span class="m-thin">class</span>
</h1>
<p>The <a href="classQBluetoothLeUartClient.html" class="m-doc">QBluetoothLeUartClient</a> class can be used to talk to BluetoothLE devices via UART effordlessly. It can be used via C++ and QML.</p>
<nav class="m-block m-default">
<h3>Contents</h3>
<ul>
<li>
Reference
<ul>
<li><a href="#pub-types">Public types</a></li>
<li><a href="#pub-static-methods">Public static functions</a></li>
<li><a href="#pub-methods">Public functions</a></li>
<li><a href="#pub-slots">Public slots</a></li>
</ul>
</li>
</ul>
</nav>
<p>C++ example:</p><pre class="m-code"><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;qbluetoothleuartclient.h&gt;</span><span class="cp"></span>
<span class="k">class</span><span class="w"> </span><span class="nc">MyBluetoothLeClass</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">QObject</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="k">public</span><span class="o">:</span><span class="w"></span>
<span class="w"> </span><span class="n">MyBluetoothLeClass</span><span class="p">(</span><span class="n">QObject</span><span class="o">*</span><span class="w"> </span><span class="n">parent</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">nullptr</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">QObject</span><span class="p">(</span><span class="n">parent</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="k">this</span><span class="o">-&gt;</span><span class="n">ble</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">QBluetoothLeUartClient</span><span class="p">();</span><span class="w"></span>
<span class="w"> </span><span class="n">connect</span><span class="p">(</span><span class="k">this</span><span class="o">-&gt;</span><span class="n">ble</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">QBluetoothLeUartClient</span><span class="o">::</span><span class="n">foundNewDevice</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">MyBluetoothLeClass</span><span class="o">::</span><span class="n">handleFoundNewDevice</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="n">connect</span><span class="p">(</span><span class="k">this</span><span class="o">-&gt;</span><span class="n">ble</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">QBluetoothLeUartClient</span><span class="o">::</span><span class="n">connectedToDevice</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">MyBluetoothLeClass</span><span class="o">::</span><span class="n">handleBluetoothDeviceConected</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="n">connect</span><span class="p">(</span><span class="k">this</span><span class="o">-&gt;</span><span class="n">ble</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">QBluetoothLeUartClient</span><span class="o">::</span><span class="n">dataReceived</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">MyBluetoothLeClass</span><span class="o">::</span><span class="n">handleDataReceived</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="k">this</span><span class="o">-&gt;</span><span class="n">ble</span><span class="o">-&gt;</span><span class="n">startScanningForDevices</span><span class="p">();</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="k">private</span><span class="o">:</span><span class="w"></span>
<span class="w"> </span><span class="n">QBluetoothLeUartClient</span><span class="w"> </span><span class="o">*</span><span class="n">ble</span><span class="p">;</span><span class="w"></span>
<span class="k">private</span><span class="w"> </span><span class="n">slots</span><span class="o">:</span><span class="w"></span>
<span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">handleFoundNewDevice</span><span class="p">(</span><span class="n">QBluetoothLeUartDevice</span><span class="o">*</span><span class="w"> </span><span class="n">device</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="n">qDebug</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Found a device: name: &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">device</span><span class="o">-&gt;</span><span class="n">getName</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot; address: &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">device</span><span class="o">-&gt;</span><span class="n">getAddress</span><span class="p">();</span><span class="w"></span>
<span class="w"> </span><span class="k">if</span><span class="p">(</span><span class="n">device</span><span class="o">-&gt;</span><span class="n">getName</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="s">&quot;My device name&quot;</span><span class="p">){</span><span class="w"></span>
<span class="w"> </span><span class="k">this</span><span class="o">-&gt;</span><span class="n">ble</span><span class="o">-&gt;</span><span class="n">stopScanningForDevices</span><span class="p">();</span><span class="w"></span>
<span class="w"> </span><span class="k">this</span><span class="o">-&gt;</span><span class="n">ble</span><span class="o">-&gt;</span><span class="n">connectToDevice</span><span class="p">(</span><span class="n">device</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">handleBluetoothDeviceConected</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="k">this</span><span class="o">-&gt;</span><span class="n">ble</span><span class="o">-&gt;</span><span class="n">sendData</span><span class="p">(</span><span class="s">&quot;This is my test message&quot;</span><span class="p">);</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">handleDataReceived</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">QString</span><span class="w"> </span><span class="o">&amp;</span><span class="n">s</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="n">qDebug</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Data received: &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">s</span><span class="p">;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="p">};</span><span class="w"></span></pre><p>QML example:</p><pre class="m-code"><span class="kr">import</span> <span class="nx">de</span><span class="p">.</span><span class="nx">itsblue</span><span class="p">.</span><span class="nx">bluetoothleuart</span> <span class="mf">1.0</span>
<span class="nx">QBluetoothLeUartClient</span> <span class="p">{</span>
<span class="kd">id: ble</span>
<span class="k">Component.onCompleted:</span> <span class="p">{</span>
<span class="nx">ble</span><span class="p">.</span><span class="nx">startScanningForDevices</span><span class="p">()</span>
<span class="p">}</span>
<span class="k">onFoundNewDevice:</span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&quot;Found a device: name: &quot;</span> <span class="o">+</span> <span class="nx">device</span><span class="p">.</span><span class="nx">name</span> <span class="o">+</span> <span class="s2">&quot; address: &quot;</span> <span class="o">+</span> <span class="nx">device</span><span class="p">.</span><span class="nx">address</span><span class="p">)</span>
<span class="k">if</span><span class="p">(</span><span class="nx">device</span><span class="p">.</span><span class="nx">name</span> <span class="o">===</span> <span class="s2">&quot;My device name&quot;</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">ble</span><span class="p">.</span><span class="nx">stopScanningForDevices</span><span class="p">()</span>
<span class="nx">ble</span><span class="p">.</span><span class="nx">connectToDevice</span><span class="p">(</span><span class="nx">device</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="k">onConnectedToDevice:</span> <span class="p">{</span>
<span class="nx">ble</span><span class="p">.</span><span class="nx">sendData</span><span class="p">(</span><span class="s2">&quot;This is my test message&quot;</span><span class="p">)</span>
<span class="p">}</span>
<span class="k">onDataReceived:</span> <span class="p">{</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&quot;Data received: &quot;</span> <span class="o">+</span> <span class="nx">data</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span></pre><p>To get all available devices in a model, use the <a href="classQBluetoothLeUartDeviceModel.html" class="m-doc">QBluetoothLeUartDeviceModel</a>.</p>
<section id="pub-types">
<h2><a href="#pub-types">Public types</a></h2>
<dl class="m-doc">
<dt>
<span class="m-doc-wrap-bumper">enum <a href="#af6052aceb355d5171ac0d20276211bb7" class="m-doc">BluetoothLeUartClientState</a> { </span><span class="m-doc-wrap"><a href="#af6052aceb355d5171ac0d20276211bb7a16ab5db5dd73533246deb4c3e62a15c0" class="m-doc">Idle</a> = 0,
<a href="#af6052aceb355d5171ac0d20276211bb7a73c62c3a44f56cead1d5d6e73ccd9ef3" class="m-doc">AdapterTurnedOff</a>,
<a href="#af6052aceb355d5171ac0d20276211bb7a70ca0d74d287cb73d0533ebbb19afde7" class="m-doc">LocationPermissionDenied</a>,
<a href="#af6052aceb355d5171ac0d20276211bb7ad909445369e196b44aeb5eb0d4de8829" class="m-doc">Scanning</a>,
<a href="#af6052aceb355d5171ac0d20276211bb7a16f5a126ec8a4f54041b4b425d9ecc57" class="m-doc">ScanFinished</a>,
<a href="#af6052aceb355d5171ac0d20276211bb7af83eacaf7ffa62c7831d7214a0de890a" class="m-doc">Connecting</a>,
<a href="#af6052aceb355d5171ac0d20276211bb7a609ce7ca1a8b38aa184b646632542d52" class="m-doc">ScanningForService</a>,
<a href="#af6052aceb355d5171ac0d20276211bb7adbdbfbfba03d4443c2b3828a7d675803" class="m-doc">ServiceFound</a>,
<a href="#af6052aceb355d5171ac0d20276211bb7a1b365b897dc9cbb49d1a31a2cba9f793" class="m-doc">Connected</a> }</span>
</dt>
<dd>The BluetoothLeUartState enum contains all state of the QBluetoothLeUart class.</dd>
</dl>
</section>
<section id="pub-static-methods">
<h2><a href="#pub-static-methods">Public static functions</a></h2>
<dl class="m-doc">
<dt id="a439ffef7bf397f5b502300cfc4c64cc6">
<span class="m-doc-wrap-bumper">static void <a href="#a439ffef7bf397f5b502300cfc4c64cc6" class="m-doc-self">init</a>(</span><span class="m-doc-wrap">)</span>
</dt>
<dd>Function to register QMl types.</dd>
</dl>
</section>
<section id="pub-methods">
<h2><a href="#pub-methods">Public functions</a></h2>
<dl class="m-doc">
<dt>
<span class="m-doc-wrap-bumper">void <a href="#a518dd07ab439c88f48537474517c0ac5" class="m-doc">setUUIDs</a>(</span><span class="m-doc-wrap">const char uartServiceUUID[36],
const char txUUID[36],
const char rxUUID[36])</span>
</dt>
<dd>Function to set the UUIDs of the bluetooth service.</dd>
</dl>
</section>
<section id="pub-slots">
<h2><a href="#pub-slots">Public slots</a></h2>
<dl class="m-doc">
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#a80bbbe83418b848e4a7db0cf5ef4f0f7" class="m-doc">startScanningForDevices</a>(</span><span class="m-doc-wrap">) -&gt; Q_INVOKABLE bool</span>
</dt>
<dd>Fuction to start scanning for devices.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#a6729698429cfc8b77fbe8f82c14f082e" class="m-doc">stopScanningForDevices</a>(</span><span class="m-doc-wrap">) -&gt; Q_INVOKABLE bool</span>
</dt>
<dd>Function to stop scanning for devices.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#a7280d732e1cb2c857b995f70443a49e9" class="m-doc">getAvailableDevices</a>(</span><span class="m-doc-wrap">) -&gt; Q_INVOKABLE QList&lt;<a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a>*&gt;</span>
</dt>
<dd>Function to get all devices that were found during the last scan.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#a9338b59d55d929683808e5888066b0e6" class="m-doc">getAvailableDevicesDetailList</a>(</span><span class="m-doc-wrap">) -&gt; Q_INVOKABLE QVariantList</span>
</dt>
<dd>Function to get a variant list of all devices that were found during the last scan.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#abaa6dedcb1ea7036d077b5d38cfd147e" class="m-doc">getAvailableDevicesModel</a>(</span><span class="m-doc-wrap">) -&gt; Q_INVOKABLE <a href="classQBluetoothLeUartDeviceModel.html" class="m-doc">QBluetoothLeUartDeviceModel</a>*</span>
</dt>
<dd>Function to get a <a href="classQBluetoothLeUartDeviceModel.html" class="m-doc">QBluetoothLeUartDeviceModel</a> with all available devices.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#ac625b96aa0c295387ed813ee146c7110" class="m-doc">getCurrentDevice</a>(</span><span class="m-doc-wrap">) -&gt; Q_INVOKABLE <a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a>*</span>
</dt>
<dd>Function to get the currently connected device.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#a50d74ef6dd2ac09d8e90af28b540abd7" class="m-doc">connectToDevice</a>(</span><span class="m-doc-wrap">int deviceId) -&gt; Q_INVOKABLE bool</span>
</dt>
<dd>Function connect to a device using its internal id.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#afae86d1aaa2301e1d811e62a75a0af73" class="m-doc">connectToDevice</a>(</span><span class="m-doc-wrap"><a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a>* device) -&gt; Q_INVOKABLE bool</span>
</dt>
<dd>Function connect to a device using a <a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a> object.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#ac9985bc027c769d1fc4c9640ba6895fa" class="m-doc">disconnectFromDevice</a>(</span><span class="m-doc-wrap">) -&gt; Q_INVOKABLE bool</span>
</dt>
<dd>Function to disconnect from the current device.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#af005db6ad589ef2e99f3a76b02d54836" class="m-doc">sendData</a>(</span><span class="m-doc-wrap">QString data,
bool asynchronous = true) -&gt; Q_INVOKABLE bool</span>
</dt>
<dd>Function to send data to the connected device.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#a094551beaf6d56e004bafa17b51b80cd" class="m-doc">getState</a>(</span><span class="m-doc-wrap">) const -&gt; Q_INVOKABLE <a href="classQBluetoothLeUartClient.html#af6052aceb355d5171ac0d20276211bb7" class="m-doc">QBluetoothLeUartClient::<wbr />BluetoothLeUartClientState</a></span>
</dt>
<dd>Function to get the current state of QBluetoothLeUart.</dd>
</dl>
</section>
<section>
<h2>Enum documentation</h2>
<section class="m-doc-details" id="af6052aceb355d5171ac0d20276211bb7"><div>
<h3>
enum QBluetoothLeUartClient::<wbr /><a href="#af6052aceb355d5171ac0d20276211bb7" class="m-doc-self">BluetoothLeUartClientState</a>
</h3>
<p>The BluetoothLeUartState enum contains all state of the QBluetoothLeUart class.</p>
<table class="m-table m-fullwidth m-flat m-doc">
<thead><tr><th style="width: 1%">Enumerators</th><th></th></tr></thead>
<tbody>
<tr>
<td><a href="#af6052aceb355d5171ac0d20276211bb7a16ab5db5dd73533246deb4c3e62a15c0" class="m-doc-self" id="af6052aceb355d5171ac0d20276211bb7a16ab5db5dd73533246deb4c3e62a15c0">Idle</a></td>
<td>
<p>Waiting for instrucions</p>
</td>
</tr>
<tr>
<td><a href="#af6052aceb355d5171ac0d20276211bb7a73c62c3a44f56cead1d5d6e73ccd9ef3" class="m-doc-self" id="af6052aceb355d5171ac0d20276211bb7a73c62c3a44f56cead1d5d6e73ccd9ef3">AdapterTurnedOff</a></td>
<td>
<p>The bluetooth adapter is turned off</p>
</td>
</tr>
<tr>
<td><a href="#af6052aceb355d5171ac0d20276211bb7a70ca0d74d287cb73d0533ebbb19afde7" class="m-doc-self" id="af6052aceb355d5171ac0d20276211bb7a70ca0d74d287cb73d0533ebbb19afde7">LocationPermissionDenied</a></td>
<td>
<p>The location permssion was denied and we are therfor unable to scan!</p>
</td>
</tr>
<tr>
<td><a href="#af6052aceb355d5171ac0d20276211bb7ad909445369e196b44aeb5eb0d4de8829" class="m-doc-self" id="af6052aceb355d5171ac0d20276211bb7ad909445369e196b44aeb5eb0d4de8829">Scanning</a></td>
<td>
<p>Scanning for devices</p>
</td>
</tr>
<tr>
<td><a href="#af6052aceb355d5171ac0d20276211bb7a16f5a126ec8a4f54041b4b425d9ecc57" class="m-doc-self" id="af6052aceb355d5171ac0d20276211bb7a16f5a126ec8a4f54041b4b425d9ecc57">ScanFinished</a></td>
<td>
<p>Scanning has finished, we are ready to connect</p>
</td>
</tr>
<tr>
<td><a href="#af6052aceb355d5171ac0d20276211bb7af83eacaf7ffa62c7831d7214a0de890a" class="m-doc-self" id="af6052aceb355d5171ac0d20276211bb7af83eacaf7ffa62c7831d7214a0de890a">Connecting</a></td>
<td>
<p>Trying to connect</p>
</td>
</tr>
<tr>
<td><a href="#af6052aceb355d5171ac0d20276211bb7a609ce7ca1a8b38aa184b646632542d52" class="m-doc-self" id="af6052aceb355d5171ac0d20276211bb7a609ce7ca1a8b38aa184b646632542d52">ScanningForService</a></td>
<td>
<p>Connection was successfull, now scanning for services</p>
</td>
</tr>
<tr>
<td><a href="#af6052aceb355d5171ac0d20276211bb7adbdbfbfba03d4443c2b3828a7d675803" class="m-doc-self" id="af6052aceb355d5171ac0d20276211bb7adbdbfbfba03d4443c2b3828a7d675803">ServiceFound</a></td>
<td>
<p>Services were found</p>
</td>
</tr>
<tr>
<td><a href="#af6052aceb355d5171ac0d20276211bb7a1b365b897dc9cbb49d1a31a2cba9f793" class="m-doc-self" id="af6052aceb355d5171ac0d20276211bb7a1b365b897dc9cbb49d1a31a2cba9f793">Connected</a></td>
<td>
<p>Connected. We are now ready to send and receive</p>
</td>
</tr>
</tbody>
</table>
</div></section>
</section>
<section>
<h2>Function documentation</h2>
<section class="m-doc-details" id="a518dd07ab439c88f48537474517c0ac5"><div>
<h3>
<span class="m-doc-wrap-bumper">void QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a518dd07ab439c88f48537474517c0ac5" class="m-doc-self">setUUIDs</a>(</span><span class="m-doc-wrap">const char uartServiceUUID[36],
const char txUUID[36],
const char rxUUID[36])</span></span>
</h3>
<p>Function to set the UUIDs of the bluetooth service.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">uartServiceUUID</td>
<td>Service UUID</td>
</tr>
<tr>
<td>txUUID</td>
<td>UUID of the characteristic used to send data</td>
</tr>
<tr>
<td>rxUUID</td>
<td>UUID of the characteristic used to receive data</td>
</tr>
</tbody>
</table>
</div></section>
<section class="m-doc-details" id="a80bbbe83418b848e4a7db0cf5ef4f0f7"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE bool QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a80bbbe83418b848e4a7db0cf5ef4f0f7" class="m-doc-self">startScanningForDevices</a>(</span><span class="m-doc-wrap">) <span class="m-label m-success">public slot</span></span></span>
</h3>
<p>Fuction to start scanning for devices.</p>
<table class="m-table m-fullwidth m-flat">
<tfoot>
<tr>
<th style="width: 1%">Returns</th>
<td>true if the scan started, false if the current state was not Idle</td>
</tr>
</tfoot>
</table>
<p>This function will start the device scanning process and might emit the following signals during scanning:</p><ul><li>foundNewDevice() when a new device is found</li><li>avaliableDevicesChanged() when a new device is found</li><li>scanFinished() when the scan has finished</li><li>scanningErrorOccured() when an error occured</li></ul><aside class="m-note m-default"><h4>See also</h4><p>foundNewDevice()</p><p>avaliableDevicesChanged()</p><p>scanFinished()</p><p>scanningErrorOccured()</p></aside>
</div></section>
<section class="m-doc-details" id="a6729698429cfc8b77fbe8f82c14f082e"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE bool QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a6729698429cfc8b77fbe8f82c14f082e" class="m-doc-self">stopScanningForDevices</a>(</span><span class="m-doc-wrap">) <span class="m-label m-success">public slot</span></span></span>
</h3>
<p>Function to stop scanning for devices.</p>
<table class="m-table m-fullwidth m-flat">
<tfoot>
<tr>
<th style="width: 1%">Returns</th>
<td>true if the scan was stopped, false if the current state was not Scanning</td>
</tr>
</tfoot>
</table>
</div></section>
<section class="m-doc-details" id="a7280d732e1cb2c857b995f70443a49e9"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE QList&lt;<a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a>*&gt; QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a7280d732e1cb2c857b995f70443a49e9" class="m-doc-self">getAvailableDevices</a>(</span><span class="m-doc-wrap">) <span class="m-label m-success">public slot</span></span></span>
</h3>
<p>Function to get all devices that were found during the last scan.</p>
<table class="m-table m-fullwidth m-flat">
<tfoot>
<tr>
<th style="width: 1%">Returns</th>
<td>List of all devices found during last scan</td>
</tr>
</tfoot>
</table>
<p>A <a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a> object can be used to connect to the specific device</p><aside class="m-note m-default"><h4>See also</h4><p><a href="classQBluetoothLeUartClient.html#a50d74ef6dd2ac09d8e90af28b540abd7" class="m-doc">connectToDevice()</a></p></aside>
</div></section>
<section class="m-doc-details" id="a9338b59d55d929683808e5888066b0e6"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE QVariantList QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a9338b59d55d929683808e5888066b0e6" class="m-doc-self">getAvailableDevicesDetailList</a>(</span><span class="m-doc-wrap">) <span class="m-label m-success">public slot</span></span></span>
</h3>
<p>Function to get a variant list of all devices that were found during the last scan.</p>
<table class="m-table m-fullwidth m-flat">
<tfoot>
<tr>
<th style="width: 1%">Returns</th>
<td>Variant list of all devices found during last scan</td>
</tr>
</tfoot>
</table>
<p>This will return a QVariantList that contains QVariantMaps. The maps contain the following keys:</p><ul><li>&quot;id&quot; (int): the internal id of the device (used to connect to it)</li><li>&quot;name&quot; (QString): the name of the device</li><li>&quot;address&quot; (QString): the bluetooth address of the device</li></ul><aside class="m-note m-default"><h4>See also</h4><p><a href="classQBluetoothLeUartClient.html#a50d74ef6dd2ac09d8e90af28b540abd7" class="m-doc">connectToDevice()</a></p></aside>
</div></section>
<section class="m-doc-details" id="abaa6dedcb1ea7036d077b5d38cfd147e"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE <a href="classQBluetoothLeUartDeviceModel.html" class="m-doc">QBluetoothLeUartDeviceModel</a>* QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#abaa6dedcb1ea7036d077b5d38cfd147e" class="m-doc-self">getAvailableDevicesModel</a>(</span><span class="m-doc-wrap">) <span class="m-label m-success">public slot</span></span></span>
</h3>
<p>Function to get a <a href="classQBluetoothLeUartDeviceModel.html" class="m-doc">QBluetoothLeUartDeviceModel</a> with all available devices.</p>
<table class="m-table m-fullwidth m-flat">
<tfoot>
<tr>
<th style="width: 1%">Returns</th>
<td>A <a href="classQBluetoothLeUartDeviceModel.html" class="m-doc">QBluetoothLeUartDeviceModel</a> with all available devices</td>
</tr>
</tfoot>
</table>
<aside class="m-note m-default"><h4>See also</h4><p><a href="classQBluetoothLeUartDeviceModel.html" class="m-doc">QBluetoothLeUartDeviceModel</a></p></aside>
</div></section>
<section class="m-doc-details" id="ac625b96aa0c295387ed813ee146c7110"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE <a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a>* QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#ac625b96aa0c295387ed813ee146c7110" class="m-doc-self">getCurrentDevice</a>(</span><span class="m-doc-wrap">) <span class="m-label m-success">public slot</span></span></span>
</h3>
<p>Function to get the currently connected device.</p>
<table class="m-table m-fullwidth m-flat">
<tfoot>
<tr>
<th style="width: 1%">Returns</th>
<td>The currently connected device or nullptr if no device is connected</td>
</tr>
</tfoot>
</table>
</div></section>
<section class="m-doc-details" id="a50d74ef6dd2ac09d8e90af28b540abd7"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE bool QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a50d74ef6dd2ac09d8e90af28b540abd7" class="m-doc-self">connectToDevice</a>(</span><span class="m-doc-wrap">int deviceId) <span class="m-label m-success">public slot</span></span></span>
</h3>
<p>Function connect to a device using its internal id.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">deviceId</td>
<td>the internal id of the device</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Returns</th>
<td>false if the device was not found in the internal list of discovered devices, true otherwise</td>
</tr>
</tfoot>
</table>
<p>The id can be found using <a href="classQBluetoothLeUartClient.html#a9338b59d55d929683808e5888066b0e6" class="m-doc">getAvailableDevicesDetailList()</a> The connectedToDevice() signal will be emited as soon as the connection was successfull. As soon as that signal was emited, the <a href="classQBluetoothLeUartClient.html#af005db6ad589ef2e99f3a76b02d54836" class="m-doc">sendData()</a> slot can be used to send data and the dataReceived() signal will be emited whenever data is received.</p><aside class="m-note m-default"><h4>See also</h4><p><a href="classQBluetoothLeUartClient.html#a9338b59d55d929683808e5888066b0e6" class="m-doc">getAvailableDevicesDetailList()</a></p><p>connectedToDevice()</p><p>dataReceived()</p></aside>
</div></section>
<section class="m-doc-details" id="afae86d1aaa2301e1d811e62a75a0af73"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE bool QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#afae86d1aaa2301e1d811e62a75a0af73" class="m-doc-self">connectToDevice</a>(</span><span class="m-doc-wrap"><a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a>* device) <span class="m-label m-success">public slot</span></span></span>
</h3>
<p>Function connect to a device using a <a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a> object.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">device</td>
<td>The device to connect to</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Returns</th>
<td>false if the device was not found in the internal list of discovered devices, true otherwise</td>
</tr>
</tfoot>
</table>
<p>The <a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a> can be found using <a href="classQBluetoothLeUartClient.html#a7280d732e1cb2c857b995f70443a49e9" class="m-doc">getAvailableDevices()</a> The connectedToDevice() signal will be emited as soon as the connection was successfull. As soon as that signal was emited, the <a href="classQBluetoothLeUartClient.html#af005db6ad589ef2e99f3a76b02d54836" class="m-doc">sendData()</a> slot can be used to send data and the dataReceived() signal will be emited whenever data is received.</p><aside class="m-note m-default"><h4>See also</h4><p><a href="classQBluetoothLeUartClient.html#a7280d732e1cb2c857b995f70443a49e9" class="m-doc">getAvailableDevices()</a></p><p>connectedToDevice()</p><p>dataReceived()</p></aside>
</div></section>
<section class="m-doc-details" id="ac9985bc027c769d1fc4c9640ba6895fa"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE bool QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#ac9985bc027c769d1fc4c9640ba6895fa" class="m-doc-self">disconnectFromDevice</a>(</span><span class="m-doc-wrap">) <span class="m-label m-success">public slot</span></span></span>
</h3>
<p>Function to disconnect from the current device.</p>
<table class="m-table m-fullwidth m-flat">
<tfoot>
<tr>
<th style="width: 1%">Returns</th>
<td>false if no device was connected, true otherwise</td>
</tr>
</tfoot>
</table>
</div></section>
<section class="m-doc-details" id="af005db6ad589ef2e99f3a76b02d54836"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE bool QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#af005db6ad589ef2e99f3a76b02d54836" class="m-doc-self">sendData</a>(</span><span class="m-doc-wrap">QString data,
bool asynchronous = true) <span class="m-label m-success">public slot</span></span></span>
</h3>
<p>Function to send data to the connected device.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">data</td>
<td>The data to send</td>
</tr>
<tr>
<td>asynchronous</td>
<td></td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Returns</th>
<td>false if there was not device connected, true otherwise</td>
</tr>
</tfoot>
</table>
</div></section>
<section class="m-doc-details" id="a094551beaf6d56e004bafa17b51b80cd"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE <a href="classQBluetoothLeUartClient.html#af6052aceb355d5171ac0d20276211bb7" class="m-doc">QBluetoothLeUartClient::<wbr />BluetoothLeUartClientState</a> QBluetoothLeUartClient::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a094551beaf6d56e004bafa17b51b80cd" class="m-doc-self">getState</a>(</span><span class="m-doc-wrap">) const <span class="m-label m-success">public slot</span></span></span>
</h3>
<p>Function to get the current state of QBluetoothLeUart.</p>
<table class="m-table m-fullwidth m-flat">
<tfoot>
<tr>
<th style="width: 1%">Returns</th>
<td>The current state</td>
</tr>
</tfoot>
</table>
<aside class="m-note m-default"><h4>See also</h4><p>BluetoothLeUartState</p></aside>
</div></section>
</section>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount">&hellip;</div>
</div>
<div class="m-doc-search-content">
<form>
<input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div id="search-help" class="m-text m-dim m-text-center">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
/ <span class="m-label m-dim">&uarr;</span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<p>Qt BluetoothLE UART library. Created with <a href="https://doxygen.org/">Doxygen</a> 1.9.4 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
</div>
</div>
</div>
</nav></footer>
</body>
</html>

View file

@ -0,0 +1,154 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>QBluetoothLeUartDevice class | Qt BluetoothLE UART library</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
<link rel="icon" href="favicon-dark.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0094ff" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">Qt BluetoothLE UART library</a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
</ol>
<ol class="m-col-t-6 m-col-m-none" start="1">
<li><a href="index.html">Introduction</a></li>
<li><a href="annotated.html">Classes</a></li>
<li><a href="refman.pdf">Download</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>
QBluetoothLeUartDevice <span class="m-thin">class</span>
</h1>
<p>The <a href="classQBluetoothLeUartDevice.html" class="m-doc">QBluetoothLeUartDevice</a> class is a helper class for use with QBluetoothLeUart. It is used to get device details and connect to devices.</p>
<nav class="m-block m-default">
<h3>Contents</h3>
<ul>
<li>
Reference
<ul>
<li><a href="#pub-methods">Public functions</a></li>
</ul>
</li>
</ul>
</nav>
<section id="pub-methods">
<h2><a href="#pub-methods">Public functions</a></h2>
<dl class="m-doc">
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#a55eb37355852665c1b4557db184c6a89" class="m-doc">getName</a>(</span><span class="m-doc-wrap">) -&gt; Q_INVOKABLE QString</span>
</dt>
<dd>Function to get the name of the device.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#aee39a9efbeae1b0b03557b5036d60cc5" class="m-doc">getAddress</a>(</span><span class="m-doc-wrap">) -&gt; Q_INVOKABLE QString</span>
</dt>
<dd>Function to get the address of the device.</dd>
</dl>
</section>
<section>
<h2>Function documentation</h2>
<section class="m-doc-details" id="a55eb37355852665c1b4557db184c6a89"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE QString QBluetoothLeUartDevice::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a55eb37355852665c1b4557db184c6a89" class="m-doc-self">getName</a>(</span><span class="m-doc-wrap">)</span></span>
</h3>
<p>Function to get the name of the device.</p>
<table class="m-table m-fullwidth m-flat">
<tfoot>
<tr>
<th style="width: 1%">Returns</th>
<td>The name of the device</td>
</tr>
</tfoot>
</table>
</div></section>
<section class="m-doc-details" id="aee39a9efbeae1b0b03557b5036d60cc5"><div>
<h3>
<span class="m-doc-wrap-bumper">Q_INVOKABLE QString QBluetoothLeUartDevice::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#aee39a9efbeae1b0b03557b5036d60cc5" class="m-doc-self">getAddress</a>(</span><span class="m-doc-wrap">)</span></span>
</h3>
<p>Function to get the address of the device.</p>
<table class="m-table m-fullwidth m-flat">
<tfoot>
<tr>
<th style="width: 1%">Returns</th>
<td>address of the device</td>
</tr>
</tfoot>
</table>
</div></section>
</section>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount">&hellip;</div>
</div>
<div class="m-doc-search-content">
<form>
<input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div id="search-help" class="m-text m-dim m-text-center">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
/ <span class="m-label m-dim">&uarr;</span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<p>Qt BluetoothLE UART library. Created with <a href="https://doxygen.org/">Doxygen</a> 1.9.4 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
</div>
</div>
</div>
</nav></footer>
</body>
</html>

View file

@ -0,0 +1,119 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>QBluetoothLeUartDeviceModel class | Qt BluetoothLE UART library</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
<link rel="icon" href="favicon-dark.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0094ff" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">Qt BluetoothLE UART library</a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
</ol>
<ol class="m-col-t-6 m-col-m-none" start="1">
<li><a href="index.html">Introduction</a></li>
<li><a href="annotated.html">Classes</a></li>
<li><a href="refman.pdf">Download</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>
QBluetoothLeUartDeviceModel <span class="m-thin">class</span>
</h1>
<p>The <a href="classQBluetoothLeUartDeviceModel.html" class="m-doc">QBluetoothLeUartDeviceModel</a> class can be used to display available devices in a QML ListView.</p>
<p>Example implementation:</p><pre class="m-code"><span class="kr">import</span> <span class="nx">de</span><span class="p">.</span><span class="nx">itsblue</span><span class="p">.</span><span class="nx">bluetoothleuart</span> <span class="mf">1.0</span>
<span class="nx">QBluetoothLeUartClient</span> <span class="p">{</span>
<span class="kd">id: ble</span>
<span class="k">Component.onCompleted:</span> <span class="p">{</span>
<span class="nx">ble</span><span class="p">.</span><span class="nx">startScanningForDevices</span><span class="p">()</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="nx">ListView</span> <span class="p">{</span>
<span class="k">model:</span> <span class="nx">ble</span><span class="p">.</span><span class="nx">availableDevicesModel</span>
<span class="k">delegate:</span> <span class="nx">ItemDelegate</span> <span class="p">{</span>
<span class="k">width:</span> <span class="nx">parent</span><span class="p">.</span><span class="nx">width</span>
<span class="k">text:</span> <span class="nx">name</span>
<span class="k">onClicked:</span> <span class="nx">backend</span><span class="p">.</span><span class="nx">bleController</span><span class="p">.</span><span class="nx">connectToDevice</span><span class="p">(</span><span class="nx">device</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span></pre>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount">&hellip;</div>
</div>
<div class="m-doc-search-content">
<form>
<input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div id="search-help" class="m-text m-dim m-text-center">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
/ <span class="m-label m-dim">&uarr;</span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<p>Qt BluetoothLE UART library. Created with <a href="https://doxygen.org/">Doxygen</a> 1.9.4 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
</div>
</div>
</div>
</nav></footer>
</body>
</html>

BIN
favicon-dark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

114
files.html Normal file
View file

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Qt BluetoothLE UART library</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
<link rel="icon" href="favicon-dark.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0094ff" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">Qt BluetoothLE UART library</a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
</ol>
<ol class="m-col-t-6 m-col-m-none" start="1">
<li><a href="index.html">Introduction</a></li>
<li><a href="annotated.html">Classes</a></li>
<li><a href="refman.pdf">Download</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>Files</h1>
<ul class="m-doc">
</ul>
<script>
function toggle(e) {
e.parentElement.className = e.parentElement.className == 'm-doc-collapsible' ?
'm-doc-expansible' : 'm-doc-collapsible';
return false;
}
/* Collapse all nodes marked as such. Doing it via JS instead of
directly in markup so disabling it doesn't harm usability. The list
is somehow regenerated on every iteration and shrinks as I change
the classes. It's not documented anywhere and I'm not sure if this
is the same across browsers, so I am going backwards in that list to
be sure. */
var collapsed = document.getElementsByClassName("collapsed");
for(var i = collapsed.length - 1; i >= 0; --i)
collapsed[i].className = 'm-doc-expansible';
</script>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount">&hellip;</div>
</div>
<div class="m-doc-search-content">
<form>
<input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div id="search-help" class="m-text m-dim m-text-center">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
/ <span class="m-label m-dim">&uarr;</span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<p>Qt BluetoothLE UART library. Created with <a href="https://doxygen.org/">Doxygen</a> 1.9.4 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
</div>
</div>
</div>
</nav></footer>
</body>
</html>

104
index.html Normal file
View file

@ -0,0 +1,104 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Qt BluetoothLE UART library</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
<link rel="icon" href="favicon-dark.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0094ff" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">Qt BluetoothLE UART library</a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
</ol>
<ol class="m-col-t-6 m-col-m-none" start="1">
<li><a href="index.html">Introduction</a></li>
<li><a href="annotated.html">Classes</a></li>
<li><a href="refman.pdf">Download</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>
Qt BluetoothLE UART library
</h1>
<section id="intro_sec"><h2><a href="#intro_sec">Introduction</a></h2><p>This library can be used to talk to BLE devices via UART in Qt. It was designed to make talking to devices like the ESP32 from Qt easier.</p></section><section id="section"><h2><a href="#section">Installation</a></h2><pre class="m-code"><span class="nb">cd</span> yourRepo
git submodule add https://itsblue.dev/itsblue-development/QBluetoothLeUart.git
git submodule update --init --recursive</pre><p>And in your MyProject.pro include the .pri file:</p><pre class="m-code"><span class="s s-Atom">#</span> <span class="nv">Optional</span><span class="s s-Atom">:</span> <span class="s s-Atom">enable</span> <span class="nv">QML</span> <span class="s s-Atom">stuff</span>
<span class="nv">CONFIG</span> <span class="s s-Atom">+=</span> <span class="nv">QBluetoothLeUart_QML</span>
<span class="s s-Atom">#</span> <span class="nv">Include</span> <span class="s s-Atom">library</span>
<span class="nf">include</span><span class="p">(</span><span class="err">$$</span><span class="nv">PWD</span><span class="o">/</span><span class="nv">QBluetoothLeUart</span><span class="o">/</span><span class="nv">QBluetoothLeUart</span><span class="p">.</span><span class="s s-Atom">pri</span><span class="p">)</span></pre><p>To enable the QML module you need to call <code class="m-code"><span class="n">QBluetoothLeUart</span><span class="o">::</span><span class="n">init</span><span class="p">();</span><span class="w"></span></code> somewhere before app.exec(); in your main.cpp.</p></section><section id="Getting_started"><h2><a href="#Getting_started">Getting_started</a></h2><p>This library currently supports: BluetoothLE UART client</p><section id="BluetoothLE"><h3><a href="#BluetoothLE">UART client</a></h3><p>To get started with the BLE client, see the docs of <a href="classQBluetoothLeUartClient.html" class="m-doc">QBluetoothLeUartClient</a>.</p></section></section>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount">&hellip;</div>
</div>
<div class="m-doc-search-content">
<form>
<input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div id="search-help" class="m-text m-dim m-text-center">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
/ <span class="m-label m-dim">&uarr;</span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<p>Qt BluetoothLE UART library. Created with <a href="https://doxygen.org/">Doxygen</a> 1.9.4 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
</div>
</div>
</div>
</nav></footer>
</body>
</html>

File diff suppressed because it is too large Load diff

99
md__drone_src_README.html Normal file
View file

@ -0,0 +1,99 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Qt BluetoothLE UART library</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
<link rel="icon" href="favicon-dark.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0094ff" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">Qt BluetoothLE UART library</a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
</ol>
<ol class="m-col-t-6 m-col-m-none" start="1">
<li><a href="index.html">Introduction</a></li>
<li><a href="annotated.html">Classes</a></li>
<li><a href="refman.pdf">Download</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>
Qt BluetoothLE UART library
</h1>
<p>A library for Qt to make using Bluetooth LE UART easier. Documentation is available <a href="https://itsblue-development.itsblue.online/QBluetoothLeUart">here</a></p>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount">&hellip;</div>
</div>
<div class="m-doc-search-content">
<form>
<input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div id="search-help" class="m-text m-dim m-text-center">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
/ <span class="m-label m-dim">&uarr;</span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<p>Qt BluetoothLE UART library. Created with <a href="https://doxygen.org/">Doxygen</a> 1.9.4 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
</div>
</div>
</div>
</nav></footer>
</body>
</html>

114
modules.html Normal file
View file

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Qt BluetoothLE UART library</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
<link rel="icon" href="favicon-dark.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0094ff" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">Qt BluetoothLE UART library</a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
</ol>
<ol class="m-col-t-6 m-col-m-none" start="1">
<li><a href="index.html">Introduction</a></li>
<li><a href="annotated.html">Classes</a></li>
<li><a href="refman.pdf">Download</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>Modules</h1>
<ul class="m-doc">
</ul>
<script>
function toggle(e) {
e.parentElement.className = e.parentElement.className == 'm-doc-collapsible' ?
'm-doc-expansible' : 'm-doc-collapsible';
return false;
}
/* Collapse all nodes marked as such. Doing it via JS instead of
directly in markup so disabling it doesn't harm usability. The list
is somehow regenerated on every iteration and shrinks as I change
the classes. It's not documented anywhere and I'm not sure if this
is the same across browsers, so I am going backwards in that list to
be sure. */
var collapsed = document.getElementsByClassName("collapsed");
for(var i = collapsed.length - 1; i >= 0; --i)
collapsed[i].className = 'm-doc-expansible';
</script>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount">&hellip;</div>
</div>
<div class="m-doc-search-content">
<form>
<input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div id="search-help" class="m-text m-dim m-text-center">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
/ <span class="m-label m-dim">&uarr;</span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<p>Qt BluetoothLE UART library. Created with <a href="https://doxygen.org/">Doxygen</a> 1.9.4 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
</div>
</div>
</div>
</nav></footer>
</body>
</html>

114
namespaces.html Normal file
View file

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Qt BluetoothLE UART library</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
<link rel="icon" href="favicon-dark.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0094ff" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">Qt BluetoothLE UART library</a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
</ol>
<ol class="m-col-t-6 m-col-m-none" start="1">
<li><a href="index.html">Introduction</a></li>
<li><a href="annotated.html">Classes</a></li>
<li><a href="refman.pdf">Download</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>Namespaces</h1>
<ul class="m-doc">
</ul>
<script>
function toggle(e) {
e.parentElement.className = e.parentElement.className == 'm-doc-collapsible' ?
'm-doc-expansible' : 'm-doc-collapsible';
return false;
}
/* Collapse all nodes marked as such. Doing it via JS instead of
directly in markup so disabling it doesn't harm usability. The list
is somehow regenerated on every iteration and shrinks as I change
the classes. It's not documented anywhere and I'm not sure if this
is the same across browsers, so I am going backwards in that list to
be sure. */
var collapsed = document.getElementsByClassName("collapsed");
for(var i = collapsed.length - 1; i >= 0; --i)
collapsed[i].className = 'm-doc-expansible';
</script>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount">&hellip;</div>
</div>
<div class="m-doc-search-content">
<form>
<input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div id="search-help" class="m-text m-dim m-text-center">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
/ <span class="m-label m-dim">&uarr;</span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<p>Qt BluetoothLE UART library. Created with <a href="https://doxygen.org/">Doxygen</a> 1.9.4 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
</div>
</div>
</div>
</nav></footer>
</body>
</html>

115
pages.html Normal file
View file

@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Qt BluetoothLE UART library</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
<link rel="icon" href="favicon-dark.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0094ff" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">Qt BluetoothLE UART library</a>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
</ol>
<ol class="m-col-t-6 m-col-m-none" start="1">
<li><a href="index.html">Introduction</a></li>
<li><a href="annotated.html">Classes</a></li>
<li><a href="refman.pdf">Download</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>Pages</h1>
<ul class="m-doc">
<li><a href="md__drone_src_README.html" class="m-doc">Qt BluetoothLE UART library</a> <span class="m-doc"></span></li>
</ul>
<script>
function toggle(e) {
e.parentElement.className = e.parentElement.className == 'm-doc-collapsible' ?
'm-doc-expansible' : 'm-doc-collapsible';
return false;
}
/* Collapse all nodes marked as such. Doing it via JS instead of
directly in markup so disabling it doesn't harm usability. The list
is somehow regenerated on every iteration and shrinks as I change
the classes. It's not documented anywhere and I'm not sure if this
is the same across browsers, so I am going backwards in that list to
be sure. */
var collapsed = document.getElementsByClassName("collapsed");
for(var i = collapsed.length - 1; i >= 0; --i)
collapsed[i].className = 'm-doc-expansible';
</script>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount">&hellip;</div>
</div>
<div class="m-doc-search-content">
<form>
<input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div id="search-help" class="m-text m-dim m-text-center">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
/ <span class="m-label m-dim">&uarr;</span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<p>Qt BluetoothLE UART library. Created with <a href="https://doxygen.org/">Doxygen</a> 1.9.4 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
</div>
</div>
</div>
</nav></footer>
</body>
</html>

BIN
refman.pdf Normal file

Binary file not shown.

897
search-v2.js Normal file
View file

@ -0,0 +1,897 @@
/*
This file is part of m.css.
Copyright © 2017, 2018, 2019, 2020, 2021, 2022
Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
"use strict"; /* it summons the Cthulhu in a proper way, they say */
var Search = {
formatVersion: 2, /* the data filename contains this number too */
dataSize: 0, /* used mainly by tests, not here */
symbolCount: '&hellip;',
trie: null,
map: null,
mapFlagsOffset: null,
typeMap: null,
maxResults: 0,
/* Type sizes and masks. The data is always fetched as 16/32bit number and
then masked to 1, 2, 3 or 4 bytes. Fortunately on LE a mask is enough,
on BE we'd have to read N bytes before and then mask. */
nameSizeBytes: null,
nameSizeMask: null,
resultIdBytes: null,
resultIdMask: null,
fileOffsetBytes: null,
fileOffsetMask: null,
lookaheadBarrierMask: null,
/* Always contains at least the root node offset and then one node offset
per entered character */
searchString: '',
searchStack: [],
/* So items don't get selected right away when a cursor is over results but
only after mouse moves */
mouseMovedSinceLastRender: false,
/* Whether we can go back in history in order to hide the search box or
not. We can't do that if we arrived directly on #search from outside. */
canGoBackToHideSearch: false,
/* Autocompletion in the input field is whitelisted only for character
input (so not deletion, cut, or anything else). This is flipped in the
onkeypress event and reset after each oninput event. */
autocompleteNextInputEvent: false,
init: function(buffer, maxResults) {
let view = new DataView(buffer);
/* The file is too short to contain at least the headers and empty
sections */
if(view.byteLength < 31) {
console.error("Search data too short");
return false;
}
if(view.getUint8(0) != 'M'.charCodeAt(0) ||
view.getUint8(1) != 'C'.charCodeAt(0) ||
view.getUint8(2) != 'S'.charCodeAt(0)) {
console.error("Invalid search data signature");
return false;
}
if(view.getUint8(3) != this.formatVersion) {
console.error("Invalid search data version");
return false;
}
/* Fetch type sizes. The only value that can fail is result ID byte
count, where value of 3 has no assigned meaning. */
let typeSizes = view.getUint8(4, true);
if((typeSizes & 0x01) >> 0 == 0) {
this.fileOffsetBytes = 3;
this.fileOffsetMask = 0x00ffffff;
this.lookaheadBarrierMask = 0x00800000;
} else /* (typeSizes & 0x01) >> 0 == 1 */ {
this.fileOffsetBytes = 4;
this.fileOffsetMask = 0xffffffff;
this.lookaheadBarrierMask = 0x80000000;
}
if((typeSizes & 0x06) >> 1 == 0) {
this.resultIdBytes = 2;
this.resultIdMask = 0x0000ffff;
} else if((typeSizes & 0x06) >> 1 == 1) {
this.resultIdBytes = 3;
this.resultIdMask = 0x00ffffff;
} else if((typeSizes & 0x06) >> 1 == 2) {
this.resultIdBytes = 4;
this.resultIdMask = 0xffffffff;
} else /* (typeSizes & 0x06) >> 1 == 3 */ {
console.error("Invalid search data result ID byte value");
return false;
}
if((typeSizes & 0x08) >> 3 == 0) {
this.nameSizeBytes = 1;
this.nameSizeMask = 0x00ff;
} else /* (typeSizes & 0x08) >> 3 == 1 */ {
this.nameSizeBytes = 2;
this.nameSizeMask = 0xffff;
}
/* Separate the data into the trie and the result / type map. Because
we're reading larger values than there might be and then masking out
the high bytes, keep extra 1/2 byte padding at the end to avoid
OOB errors. */
let mapOffset = view.getUint32(12, true);
let typeMapOffset = view.getUint32(16, true);
/* There may be a 3-byte file offset at the end of the trie which we'll
read as 32-bit, add one safety byte in that case */
this.trie = new DataView(buffer, 20, mapOffset - 20 + (4 - this.fileOffsetBytes));
/* There may be a 3-byte file size (for zero results) which we'll read
as 32-bit, add one safety byte in that case */
this.map = new DataView(buffer, mapOffset, typeMapOffset - mapOffset + (4 - this.fileOffsetBytes));
/* No variable-size types in the type map at the moment */
this.typeMap = new DataView(buffer, typeMapOffset);
/* Offset of the first result map item is after N + 1 offsets and N
flags, calculate flag offset from that */
this.mapFlagsOffset = this.fileOffsetBytes*(((this.map.getUint32(0, true) & this.fileOffsetMask) - this.fileOffsetBytes)/(this.fileOffsetBytes + 1) + 1);
/* Set initial properties */
this.dataSize = buffer.byteLength;
this.symbolCount = view.getUint32(8, true) + " symbols (" + Math.round(this.dataSize/102.4)/10 + " kB)";
this.maxResults = maxResults ? maxResults : 100;
this.searchString = '';
this.searchStack = [this.trie.getUint32(0, true)];
/* istanbul ignore if */
if(typeof document !== 'undefined') {
document.getElementById('search-symbolcount').innerHTML = this.symbolCount;
document.getElementById('search-input').disabled = false;
document.getElementById('search-input').placeholder = "Type something here …";
document.getElementById('search-input').focus();
/* Search for the input value (there might be something already,
for example when going back in the browser) */
let value = document.getElementById('search-input').value;
/* Otherwise check the GET parameters for `q` and fill the input
with that */
if(!value.length) {
var args = decodeURIComponent(window.location.search.substr(1)).trim().split('&');
for(var i = 0; i != args.length; ++i) {
if(args[i].substring(0, 2) != 'q=') continue;
value = document.getElementById('search-input').value = args[i].substring(2);
break;
}
}
if(value.length) Search.searchAndRender(value);
}
return true;
},
download: /* istanbul ignore next */ function(url) {
var req = window.XDomainRequest ? new XDomainRequest() : new XMLHttpRequest();
if(!req) return;
req.open("GET", url, true);
req.responseType = 'arraybuffer';
req.onreadystatechange = function() {
if(req.readyState != 4) return;
Search.init(req.response);
}
req.send();
},
base85decode: function(base85string) {
function charValue(char) {
if(char >= 48 && char < 58) /* 0-9 -> 0-9 */
return char - 48 + 0;
if(char >= 65 && char < 91) /* A-Z -> 10-35 */
return char - 65 + 10;
if(char >= 97 && char < 123) /* a-z -> 36-61 */
return char - 97 + 36;
if(char == 33) /* ! -> 62 */
return 62;
/* skipping 34 (') */
if(char >= 35 && char < 39) /* #-& -> 63-66 */
return char - 35 + 63;
/* skipping 39 (") */
if(char >= 40 && char < 44) /* (-+ -> 67-70 */
return char - 40 + 67;
/* skipping 44 (,) */
if(char == 45) /* - -> 71 */
return 71;
if(char >= 59 && char < 65) /* ;-@ -> 72-77 */
return char - 59 + 72;
if(char >= 94 && char < 97) /* ^-` -> 78-80 */
return char - 94 + 78;
if(char >= 123 && char < 127) /* {-~ -> 81-84 */
return char - 123 + 81;
return 0; /* Interpret padding values as zeros */
}
/* Pad the string for easier decode later. We don't read past the file
end, so it doesn't matter what garbage is there. */
if(base85string.length % 5) {
console.log("Expected properly padded base85 data");
return;
}
let buffer = new ArrayBuffer(base85string.length*4/5);
let data8 = new DataView(buffer);
for(let i = 0; i < base85string.length; i += 5) {
let char1 = charValue(base85string.charCodeAt(i + 0));
let char2 = charValue(base85string.charCodeAt(i + 1));
let char3 = charValue(base85string.charCodeAt(i + 2));
let char4 = charValue(base85string.charCodeAt(i + 3));
let char5 = charValue(base85string.charCodeAt(i + 4));
data8.setUint32(i*4/5, char5 +
char4*85 +
char3*85*85 +
char2*85*85*85 +
char1*85*85*85*85, false); /* BE, yes */
}
return buffer;
},
load: function(base85string) {
return this.init(this.base85decode(base85string));
},
/* http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html */
toUtf8: function(string) { return unescape(encodeURIComponent(string)); },
fromUtf8: function(string) { return decodeURIComponent(escape(string)); },
autocompletedCharsToUtf8: function(chars) {
/* Strip incomplete UTF-8 chars from the autocompletion end */
for(let i = chars.length - 1; i >= 0; --i) {
let c = chars[i];
/* We're safe, finish */
if(
/* ASCII value at the end */
(c < 128 && i + 1 == chars.length) ||
/* Full two-byte character at the end */
((c & 0xe0) == 0xc0 && i + 2 == chars.length) ||
/* Full three-byte character at the end */
((c & 0xf0) == 0xe0 && i + 3 == chars.length) ||
/* Full four-byte character at the end */
((c & 0xf8) == 0xf0 && i + 4 == chars.length)
) break;
/* Continuing UTF-8 character, go further back */
if((c & 0xc0) == 0x80) continue;
/* Otherwise the character is not complete, drop it from the end */
chars.length = i;
break;
}
/* Convert the autocompleted UTF-8 sequence to a string */
let suggestedTabAutocompletionString = '';
for(let i = 0; i != chars.length; ++i)
suggestedTabAutocompletionString += String.fromCharCode(chars[i]);
return suggestedTabAutocompletionString;
},
/* Returns the values in UTF-8, but input is in whatever shitty 16bit
encoding JS has */
search: function(searchString) {
/* Normalize the search string first, convert to UTF-8 and trim spaces
from the left. From the right they're trimmed only if nothing is
found, see below. */
searchString = this.toUtf8(searchString.toLowerCase().replace(/^\s+/,''));
/* TODO: maybe i could make use of InputEvent.data and others here */
/* Find longest common prefix of previous and current value so we don't
need to needlessly search again */
let max = Math.min(searchString.length, this.searchString.length);
let commonPrefix = 0;
for(; commonPrefix != max; ++commonPrefix)
if(searchString[commonPrefix] != this.searchString[commonPrefix]) break;
/* Drop items off the stack if it has has more than is needed for the
common prefix (it needs to have at least one item, though) */
if(commonPrefix + 1 < this.searchStack.length)
this.searchStack.splice(commonPrefix + 1, this.searchStack.length - commonPrefix - 1);
/* Add new characters from the search string */
let foundPrefix = commonPrefix;
for(; foundPrefix != searchString.length; ++foundPrefix) {
/* Calculate offset and count of children */
let offset = this.searchStack[this.searchStack.length - 1];
/* If there's a lot of results, the result count is a 16bit BE value
instead */
let resultCount = this.trie.getUint8(offset);
let resultCountSize = 1;
if(resultCount & 0x80) {
resultCount = this.trie.getUint16(offset, false) & ~0x8000;
++resultCountSize;
}
let childCount = this.trie.getUint8(offset + resultCountSize);
/* Go through all children and find the next offset */
let childOffset = offset + resultCountSize + 1 + resultCount*this.resultIdBytes;
let found = false;
for(let j = 0; j != childCount; ++j) {
if(String.fromCharCode(this.trie.getUint8(childOffset + j)) != searchString[foundPrefix])
continue;
this.searchStack.push(this.trie.getUint32(childOffset + childCount + j*this.fileOffsetBytes, true) & this.fileOffsetMask & ~this.lookaheadBarrierMask);
found = true;
break;
}
/* Character not found */
if(!found) {
/* If we found everything except spaces at the end, pretend the
spaces aren't there. On the other hand, we *do* want to
try searching with the spaces first -- it can narrow down
the result list for page names or show subpages (which are
after a lookahead barrier that's a space). */
if(!searchString.substr(foundPrefix).trim().length)
searchString = searchString.substr(0, foundPrefix);
break;
}
}
/* Save the whole found prefix for next time */
this.searchString = searchString.substr(0, foundPrefix);
/* If the whole thing was not found, return an empty result and offer
external search */
if(foundPrefix != searchString.length) {
/* istanbul ignore if */
if(typeof document !== 'undefined') {
let link = document.getElementById('search-external');
if(link)
link.href = link.dataset.searchEngine.replace('{query}', encodeURIComponent(searchString));
}
return [[], ''];
}
/* Otherwise gather the results */
let suggestedTabAutocompletionChars = [];
let results = [];
let leaves = [[this.searchStack[this.searchStack.length - 1], 0]];
while(leaves.length) {
/* Pop offset from the queue */
let current = leaves.shift();
let offset = current[0];
let suffixLength = current[1];
/* Calculate child count. If there's a lot of results, the count
"leaks over" to the child count storage. */
/* TODO: hmmm. this is helluvalot duplicated code. hmm. */
let resultCount = this.trie.getUint8(offset);
let resultCountSize = 1;
if(resultCount & 0x80) {
resultCount = this.trie.getUint16(offset, false) & ~0x8000;
++resultCountSize;
}
let childCount = this.trie.getUint8(offset + resultCountSize);
/* Populate the results with all values associated with this node */
for(let i = 0; i != resultCount; ++i) {
let index = this.trie.getUint32(offset + resultCountSize + 1 + i*this.resultIdBytes, true) & this.resultIdMask;
results.push(this.gatherResult(index, suffixLength, 0xffffff)); /* should be enough haha */
/* 'nuff said. */
if(results.length >= this.maxResults)
return [results, this.autocompletedCharsToUtf8(suggestedTabAutocompletionChars)];
}
/* Dig deeper */
let childOffset = offset + resultCountSize + 1 + resultCount*this.resultIdBytes;
for(let j = 0; j != childCount; ++j) {
let offsetBarrier = this.trie.getUint32(childOffset + childCount + j*this.fileOffsetBytes, true) & this.fileOffsetMask;
/* Lookahead barrier, don't dig deeper */
if(offsetBarrier & this.lookaheadBarrierMask) continue;
/* Append to the queue */
leaves.push([offsetBarrier & ~this.lookaheadBarrierMask, suffixLength + 1]);
/* We don't have anything yet and this is the only path
forward, add the char to suggested Tab autocompletion. Can't
extract it from the leftmost 8 bits of offsetBarrier because
that would make it negative, have to load as Uint8 instead.
Also can't use String.fromCharCode(), because later doing
str.charCodeAt() would give me back UTF-16 values, which is
absolutely unwanted when all I want is check for truncated
UTF-8. */
if(!results.length && leaves.length == 1 && childCount == 1)
suggestedTabAutocompletionChars.push(this.trie.getUint8(childOffset + j));
}
}
return [results, this.autocompletedCharsToUtf8(suggestedTabAutocompletionChars)];
},
gatherResult: function(index, suffixLength, maxUrlPrefix) {
let flags = this.map.getUint8(this.mapFlagsOffset + index);
let resultOffset = this.map.getUint32(index*this.fileOffsetBytes, true) & this.fileOffsetMask;
/* The result is an alias, parse the aliased prefix */
let aliasedIndex = null;
if((flags & 0xf0) == 0x00) {
aliasedIndex = this.map.getUint32(resultOffset, true) & this.resultIdMask;
resultOffset += this.resultIdBytes;
}
/* The result has a prefix, parse that first, recursively */
let name = '';
let url = '';
if(flags & (1 << 3)) {
let prefixIndex = this.map.getUint32(resultOffset, true) & this.resultIdMask;
let prefixUrlPrefixLength = Math.min(this.map.getUint16(resultOffset + this.resultIdBytes, true) & this.nameSizeMask, maxUrlPrefix);
let prefix = this.gatherResult(prefixIndex, 0 /*ignored*/, prefixUrlPrefixLength);
name = prefix.name;
url = prefix.url;
resultOffset += this.resultIdBytes + this.nameSizeBytes;
}
/* The result has a suffix, extract its length */
let resultSuffixLength = 0;
if(flags & (1 << 0)) {
resultSuffixLength = this.map.getUint16(resultOffset, true) & this.nameSizeMask;
resultOffset += this.nameSizeBytes;
}
let nextResultOffset = this.map.getUint32((index + 1)*this.fileOffsetBytes, true) & this.fileOffsetMask;
/* Extract name */
let j = resultOffset;
for(; j != nextResultOffset; ++j) {
let c = this.map.getUint8(j);
/* End of null-delimited name */
if(!c) {
++j;
break; /* null-delimited */
}
name += String.fromCharCode(c); /* eheh. IS THIS FAST?! */
}
/* The result is an alias and we're not deep inside resolving a prefix,
extract the aliased name and URL */
/* TODO: this abuses 0xffffff to guess how the call stack is deep and
that's just wrong, fix! */
if(aliasedIndex != null && maxUrlPrefix == 0xffffff) {
let alias = this.gatherResult(aliasedIndex, 0 /* ignored */, 0xffffff); /* should be enough haha */
/* Keeping in UTF-8, as we need that for proper slicing (and concatenating) */
return {name: name,
alias: alias.name,
url: alias.url,
flags: alias.flags,
cssClass: alias.cssClass,
typeName: alias.typeName,
suffixLength: suffixLength + resultSuffixLength};
}
/* Otherwise extract URL from here */
let max = Math.min(j + maxUrlPrefix - url.length, nextResultOffset);
for(; j != max; ++j) {
url += String.fromCharCode(this.map.getUint8(j));
}
/* This is an alias, return what we have, without parsed CSS class and
type name as those are retrieved from the final target type */
if(!(flags >> 4))
return {name: name,
url: url,
flags: flags & 0x0f,
suffixLength: suffixLength + resultSuffixLength};
/* Otherwise, get CSS class and type name for the result label */
let typeMapIndex = (flags >> 4) - 1;
let cssClass = [
/* Keep in sync with _search.py */
'm-default',
'm-primary',
'm-success',
'm-warning',
'm-danger',
'm-info',
'm-dim'
][this.typeMap.getUint8(typeMapIndex*2)];
let typeNameOffset = this.typeMap.getUint8(typeMapIndex*2 + 1);
let nextTypeNameOffset = this.typeMap.getUint8((typeMapIndex + 1)*2 + 1);
let typeName = '';
for(let j = typeNameOffset; j != nextTypeNameOffset; ++j)
typeName += String.fromCharCode(this.typeMap.getUint8(j));
/* Keeping in UTF-8, as we need that for proper slicing (and
concatenating). Strip the type from the flags, as it's now expressed
directly. */
return {name: name,
url: url,
flags: flags & 0x0f,
cssClass: cssClass,
typeName: typeName,
suffixLength: suffixLength + resultSuffixLength};
},
escape: function(name) {
return name.replace(/[\"&<>]/g, function (a) {
return { '"': '&quot;', '&': '&amp;', '<': '&lt;', '>': '&gt;' }[a];
});
},
escapeForRtl: function(name) {
/* Besides the obvious escaping of HTML entities we also need
to escape punctuation, because due to the RTL hack to cut
text off on left side the punctuation characters get
reordered (of course). Prepending &lrm; works for most
characters, parentheses we need to *soak* in it. But only
the right ones. And that for some reason needs to be also for &.
Huh. https://en.wikipedia.org/wiki/Right-to-left_mark */
return this.escape(name).replace(/[:=]/g, '&lrm;$&').replace(/(\)|&gt;|&amp;|\/)/g, '&lrm;$&&lrm;');
},
renderResults: /* istanbul ignore next */ function(resultsSuggestedTabAutocompletion) {
if(!this.searchString.length) {
document.getElementById('search-help').style.display = 'block';
document.getElementById('search-results').style.display = 'none';
document.getElementById('search-notfound').style.display = 'none';
return;
}
document.getElementById('search-help').style.display = 'none';
/* Results found */
if(resultsSuggestedTabAutocompletion[0].length) {
let results = resultsSuggestedTabAutocompletion[0];
document.getElementById('search-results').style.display = 'block';
document.getElementById('search-notfound').style.display = 'none';
let list = '';
for(let i = 0; i != results.length; ++i) {
/* Labels + */
list += '<li' + (i ? '' : ' id="search-current"') + '><a href="' + results[i].url + '" onmouseover="selectResult(event)" data-md-link-title="' + this.escape(results[i].name.substr(results[i].name.length - this.searchString.length - results[i].suffixLength)) + '"><div class="m-label m-flat ' + results[i].cssClass + '">' + results[i].typeName + '</div>' + (results[i].flags & 2 ? '<div class="m-label m-danger">deprecated</div>' : '') + (results[i].flags & 4 ? '<div class="m-label m-danger">deleted</div>' : '');
/* Render the alias (cut off from the right) */
if(results[i].alias) {
list += '<div class="m-doc-search-alias"><span class="m-text m-dim">' + this.escape(results[i].name.substr(0, results[i].name.length - this.searchString.length - results[i].suffixLength)) + '</span><span class="m-doc-search-typed">' + this.escape(results[i].name.substr(results[i].name.length - this.searchString.length - results[i].suffixLength, this.searchString.length)) + '</span>' + this.escapeForRtl(results[i].name.substr(results[i].name.length - results[i].suffixLength)) + '<span class="m-text m-dim">: ' + this.escape(results[i].alias) + '</span>';
/* Render the normal thing (cut off from the left, have to
escape for RTL) */
} else {
list += '<div><span class="m-text m-dim">' + this.escapeForRtl(results[i].name.substr(0, results[i].name.length - this.searchString.length - results[i].suffixLength)) + '</span><span class="m-doc-search-typed">' + this.escapeForRtl(results[i].name.substr(results[i].name.length - this.searchString.length - results[i].suffixLength, this.searchString.length)) + '</span>' + this.escapeForRtl(results[i].name.substr(results[i].name.length - results[i].suffixLength));
}
/* The closing */
list += '</div></a></li>';
}
document.getElementById('search-results').innerHTML = this.fromUtf8(list);
document.getElementById('search-current').scrollIntoView(true);
/* Append the suggested tab autocompletion, if any, and if the user
didn't just delete it */
let searchInput = document.getElementById('search-input');
if(this.autocompleteNextInputEvent && resultsSuggestedTabAutocompletion[1].length && searchInput.selectionEnd == searchInput.value.length) {
let suggestedTabAutocompletion = this.fromUtf8(resultsSuggestedTabAutocompletion[1]);
let lengthBefore = searchInput.value.length;
searchInput.value += suggestedTabAutocompletion;
searchInput.setSelectionRange(lengthBefore, searchInput.value.length);
}
/* Nothing found */
} else {
document.getElementById('search-results').innerHTML = '';
document.getElementById('search-results').style.display = 'none';
document.getElementById('search-notfound').style.display = 'block';
}
/* Don't allow things to be selected just by motionless mouse cursor
suddenly appearing over a search result */
this.mouseMovedSinceLastRender = false;
/* Reset autocompletion, if it was allowed. It'll get whitelisted next
time a character gets inserted. */
this.autocompleteNextInputEvent = false;
},
searchAndRender: /* istanbul ignore next */ function(value) {
let prev = performance.now();
let results = this.search(value);
let after = performance.now();
this.renderResults(results);
if(this.searchString.length) {
document.getElementById('search-symbolcount').innerHTML =
results[0].length + (results[0].length >= this.maxResults ? '+' : '') + " results (" + Math.round((after - prev)*10)/10 + " ms)";
} else
document.getElementById('search-symbolcount').innerHTML = this.symbolCount;
},
};
/* istanbul ignore next */
function selectResult(event) {
if(!Search.mouseMovedSinceLastRender) return;
if(event.currentTarget.parentNode.id == 'search-current') return;
let current = document.getElementById('search-current');
current.removeAttribute('id');
event.currentTarget.parentNode.id = 'search-current';
}
/* This is separated from showSearch() because we need non-destructive behavior
when appearing directly on a URL with #search */ /* istanbul ignore next */
function updateForSearchVisible() {
/* Prevent accidental scrolling of the body, prevent page layout jumps */
let scrolledBodyWidth = document.body.offsetWidth;
document.body.style.overflow = 'hidden';
document.body.style.paddingRight = (document.body.offsetWidth - scrolledBodyWidth) + 'px';
document.getElementById('search-input').value = '';
document.getElementById('search-input').focus();
document.getElementById('search-results').style.display = 'none';
document.getElementById('search-notfound').style.display = 'none';
document.getElementById('search-help').style.display = 'block';
}
/* istanbul ignore next */
function showSearch() {
window.location.hash = '#search';
Search.canGoBackToHideSearch = true;
updateForSearchVisible();
document.getElementById('search-symbolcount').innerHTML = Search.symbolCount;
return false;
}
/* istanbul ignore next */
function hideSearch() {
/* If the search box was opened using showSearch(), we can go back in the
history. Otherwise (for example when we landed to #search from a
bookmark or another server), going back would not do the right thing and
in that case we simply replace the current history state. */
if(Search.canGoBackToHideSearch) {
Search.canGoBackToHideSearch = false;
window.history.back();
} else {
window.location.hash = '#!';
window.history.replaceState('', '', window.location.pathname);
}
/* Restore scrollbar, prevent page layout jumps */
document.body.style.overflow = 'auto';
document.body.style.paddingRight = '0';
return false;
}
/* istanbul ignore next */
function copyToKeyboard(text) {
/* Append to the popup, appending to document.body would cause it to
scroll when focused */
let searchPopup = document.getElementsByClassName('m-doc-search')[0];
let textarea = document.createElement("textarea");
textarea.value = text;
searchPopup.appendChild(textarea);
textarea.focus();
textarea.select();
document.execCommand('copy');
searchPopup.removeChild(textarea);
document.getElementById('search-input').focus();
}
/* Only in case we're running in a browser. Why a simple if(document) doesn't
work is beyond me. */ /* istanbul ignore if */
if(typeof document !== 'undefined') {
document.getElementById('search-input').oninput = function(event) {
Search.searchAndRender(document.getElementById('search-input').value);
};
document.onkeydown = function(event) {
/* Search shown */
if(window.location.hash == '#search') {
/* Close the search */
if(event.key == 'Escape') {
hideSearch();
/* Focus the search input, if not already, using T or Tab */
} else if((!document.activeElement || document.activeElement.id != 'search-input') && (event.key.toLowerCase() == 't' || event.key == 'Tab') && !event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey) {
document.getElementById('search-input').focus();
return false; /* so T doesn't get entered into the box */
/* Fill in the autocompleted selection */
} else if(event.key == 'Tab' && !event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey) {
/* But only if the input has selection at the end */
let input = document.getElementById('search-input');
if(input.selectionEnd == input.value.length && input.selectionStart != input.selectionEnd) {
input.setSelectionRange(input.value.length, input.value.length);
return false; /* so input won't lose focus */
}
/* Select next item */
} else if(event.key == 'ArrowDown') {
let current = document.getElementById('search-current');
if(current) {
let next = current.nextSibling;
if(next) {
current.id = '';
next.id = 'search-current';
next.scrollIntoView(false);
}
}
return false; /* so the keypress doesn't affect input cursor */
/* Select prev item */
} else if(event.key == 'ArrowUp') {
let current = document.getElementById('search-current');
if(current) {
let prev = current.previousSibling;
if(prev) {
current.id = '';
prev.id = 'search-current';
prev.scrollIntoView(false);
}
}
return false; /* so the keypress doesn't affect input cursor */
/* Go to result (if any) */
} else if(event.key == 'Enter') {
let result = document.getElementById('search-current');
if(result) {
result.firstElementChild.click();
/* We might be staying on the same page, so restore scrollbar,
and prevent page layout jumps */
document.body.style.overflow = 'auto';
document.body.style.paddingRight = '0';
}
return false; /* so the form doesn't get sent */
/* Copy (Markdown) link to keyboard */
} else if((event.key.toLowerCase() == 'l' || event.key.toLowerCase() == 'm') && event.metaKey) {
let result = document.getElementById('search-current');
if(result) {
let plain = event.key.toLowerCase() == 'l';
let link = plain ? result.firstElementChild.href :
'[' + result.firstElementChild.dataset.mdLinkTitle + '](' + result.firstElementChild.href + ')';
copyToKeyboard(link);
/* Add CSS class to the element for visual feedback (this
will get removed on keyup), but only if it's not already
there (in case of key repeat, e.g.) */
if(result.className.indexOf('m-doc-search-copied') == -1)
result.className += ' m-doc-search-copied';
console.log("Copied " + (plain ? "link" : "Markdown link") + " to " + result.firstElementChild.dataset.mdLinkTitle);
}
return false; /* so L doesn't get entered into the box */
/* Looks like the user is inserting some text (and not cutting,
copying or whatever), allow autocompletion for the new
character. The oninput event resets this back to false, so this
basically whitelists only keyboard input, including Shift-key
and special chars using right Alt (or equivalent on Mac), but
excluding Ctrl-key, which is usually not for text input. In the
worst case the autocompletion won't be allowed ever, which is
much more acceptable behavior than having no ability to disable
it and annoying the users. */
} else if(event.key != 'Backspace' && event.key != 'Delete' && !event.metaKey && (!event.ctrlKey || event.altKey)
/* Don't ever attempt autocompletion with Android virtual
keyboards, as those report all `event.key`s as
`Unidentified` (on Chrome) or `Process` (on Firefox) with
`event.code` 229 and thus we have no way to tell if a text
is entered or deleted. See this WONTFIX bug for details:
https://bugs.chromium.org/p/chromium/issues/detail?id=118639
Couldn't find any similar bugreport for Firefox, but I
assume the virtual keyboard is to blame.
An alternative is to hook into inputEvent, which has the
data, but ... there's more cursed issues right after that:
- setSelectionRange() in Chrome on Android only renders
stuff, but doesn't actually act as such. Pressing
Backspace will only remove the highlight, but the text
stays here. Only delay-calling it through a timeout will
work as intended. Possibly related SO suggestion (back
then not even the rendering worked properly):
https://stackoverflow.com/a/13235951
Possibly related Chrome bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=32865
- On Firefox Mobile, programmatically changing an input
value (for the autocompletion highlight) will trigger an
input event, leading to search *and* autocompletion being
triggered again. Ultimately that results in newly typed
characters not replacing the autocompletion but rather
inserting before it, corrupting the searched string. This
event has to be explicitly ignored.
- On Firefox Mobile, deleting a highlight with the
backspace key will result in *three* input events instead
of one:
1. `deleteContentBackward` removing the selection (same
as Chrome or desktop Firefox)
2. `deleteContentBackward` removing *the whole word*
that contained the selection (or the whole text if
it's just one word)
3. `insertCompositionText`, adding the word back in,
resulting in the same state as (1).
I have no idea WHY it has to do this (possibly some
REALLY NASTY workaround to trigger correct font shaping?)
but ultimately it results in the autocompletion being
added again right after it got deleted, making this whole
thing VERY annoying to use.
I attempted to work around the above, but it resulted in a
huge amount of browser-specific code that achieves only 90%
of the goal, with certain corner cases still being rather
broken (such as autocompletion randomly triggering when
erasing the text, even though it shouldn't). So disabling
autocompletion on this HELLISH BROKEN PLATFORM is the best
option at the moment. */
&& event.key != 'Unidentified' && event.key != 'Process'
) {
Search.autocompleteNextInputEvent = true;
/* Otherwise reset the flag, because when the user would press e.g.
the 'a' key and then e.g. ArrowRight (which doesn't trigger
oninput), a Backspace after would still result in
autocompleteNextInputEvent, because nothing reset it back. */
} else {
Search.autocompleteNextInputEvent = false;
}
/* Search hidden */
} else {
/* Open the search on the T or Tab key */
if((event.key.toLowerCase() == 't' || event.key == 'Tab') && !event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey) {
showSearch();
return false; /* so T doesn't get entered into the box */
}
}
};
document.onkeyup = function(event) {
/* Remove highlight after key is released after a link copy */
if((event.key.toLowerCase() == 'l' || event.key.toLowerCase() == 'm') && event.metaKey) {
let result = document.getElementById('search-current');
if(result) result.className = result.className.replace(' m-doc-search-copied', '');
}
};
/* Allow selecting items by mouse hover only after it moves once the
results are populated. This prevents a random item getting selected if
the cursor is left motionless over the result area. */
document.getElementById('search-results').onmousemove = function() {
Search.mouseMovedSinceLastRender = true;
};
/* If #search is already present in the URL, hide the scrollbar etc. for a
consistent experience */
if(window.location.hash == '#search') updateForSearchVisible();
}
/* For Node.js testing */ /* istanbul ignore else */
if(typeof module !== 'undefined') { module.exports = { Search: Search }; }

2
searchdata-v2.js Normal file

File diff suppressed because one or more lines are too long