mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
79 lines
5.8 KiB
HTML
79 lines
5.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<!-- projectsettingslistmodel.cpp -->
|
|
<title>ProjectSettingsListModel Class | ScreenPlay</title>
|
|
<link rel="stylesheet" type="text/css" href="../css/style.css"/> <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
|
|
</head>
|
|
<body>
|
|
<div class="container-fullwidth nav"><div class="container navWrapper"><a href="../index.html"><span class="logo">ScreenPlay Generated Docs </span></a><span class="navHome"><a href="../index.html">Home</a></span></div></div> <div id= mainWrapper class="wrapper container ">
|
|
<li>ProjectSettingsListModel</li>
|
|
<div class="sidebar">
|
|
<div class="toc">
|
|
<h3><a name="toc">Contents</a></h3>
|
|
<ul>
|
|
<li class="level1"><a href="#public-functions">Public Functions</a></li>
|
|
<li class="level1"><a href="#details">Detailed Description</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
|
<h1 class="title">ProjectSettingsListModel Class</h1>
|
|
<span class="small-subtitle">class <a href="screenplay.html">ScreenPlay</a>::ProjectSettingsListModel</span>
|
|
<!-- $$$ProjectSettingsListModel-brief -->
|
|
<p>ProjectSettingsListModel used for the dynamic loading of the properties json object inside a project.json. <a href="#details">More...</a></p>
|
|
<!-- @@@ProjectSettingsListModel -->
|
|
<div class="table"><table class="alignedsummary">
|
|
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <ProjectSettingsListModel></span>
|
|
</td></tr></table></div><ul>
|
|
<li><a href="screenplay-projectsettingslistmodel-members.html">List of all members, including inherited members</a></li>
|
|
</ul>
|
|
<a name="public-functions"></a>
|
|
<h2 id="public-functions">Public Functions</h2>
|
|
<div class="table"><table class="alignedsummary">
|
|
<tr><td class="memItemLeft rightAlign topAlign"> QJsonObject </td><td class="memItemRight bottomAlign"><b><a href="screenplay-projectsettingslistmodel.html#getActiveSettingsJson">getActiveSettingsJson</a></b>()</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-projectsettingslistmodel.html#init">init</a></b>(const InstalledType::InstalledType &<i>type</i>, const QJsonObject &<i>properties</i>)</td></tr>
|
|
</table></div>
|
|
<a name="details"></a>
|
|
<!-- $$$ProjectSettingsListModel-description -->
|
|
<div class="descr">
|
|
<h2 id="details">Detailed Description</h2>
|
|
<p>The loaded properties are allowed to have one level of nesting to simulate headlines:</p>
|
|
<pre class="cpp"><span class="string">"properties"</span>: {
|
|
<span class="string">"Attractor"</span>: {
|
|
<span class="string">"attStrength"</span>: {
|
|
<span class="string">"from"</span>: <span class="number">0</span><span class="operator">,</span>
|
|
<span class="string">"stepSize"</span>: <span class="number">100</span><span class="operator">,</span>
|
|
<span class="string">"to"</span>: <span class="number">100000</span><span class="operator">,</span>
|
|
<span class="string">"type"</span>: <span class="string">"slider"</span><span class="operator">,</span>
|
|
<span class="string">"value"</span>: <span class="number">8000000</span>
|
|
}
|
|
}<span class="operator">,</span>
|
|
<span class="string">"Emitter"</span>: {
|
|
<span class="string">"emitRate"</span>: {
|
|
<span class="string">"from"</span>: <span class="number">0</span><span class="operator">,</span>
|
|
<span class="string">"stepSize"</span>: <span class="number">1</span><span class="operator">,</span>
|
|
<span class="string">"to"</span>: <span class="number">2500</span><span class="operator">,</span>
|
|
<span class="string">"type"</span>: <span class="string">"slider"</span><span class="operator">,</span>
|
|
<span class="string">"value"</span>: <span class="number">25</span>
|
|
}
|
|
}
|
|
}</pre>
|
|
<p>In this example the Attractor and Emitter would be a headline. In the UI we then displays it for the user to modify. Otherwhise it is a regular QAbstractListModel based list model.</p>
|
|
</div>
|
|
<!-- @@@ProjectSettingsListModel -->
|
|
<div class="func">
|
|
<h2>Member Function Documentation</h2>
|
|
<!-- $$$getActiveSettingsJson[overload1]$$$getActiveSettingsJson -->
|
|
<h3 class="fn" id="getActiveSettingsJson"><a name="getActiveSettingsJson"></a><span class="type">QJsonObject</span> ProjectSettingsListModel::<span class="name">getActiveSettingsJson</span>()</h3>
|
|
<p>ProjectSettingsListModel::getActiveSettingsJson <b class="redFont"><code>\return</code></b></p>
|
|
<!-- @@@getActiveSettingsJson -->
|
|
<!-- $$$init[overload1]$$$initconstInstalledType::InstalledType&constQJsonObject& -->
|
|
<h3 class="fn" id="init"><a name="init"></a><span class="type">void</span> ProjectSettingsListModel::<span class="name">init</span>(const <span class="type">InstalledType::InstalledType</span> &<i>type</i>, const <span class="type">QJsonObject</span> &<i>properties</i>)</h3>
|
|
<p>Constructor when loading properties from settings.json We need to _flatten_ the json to make it work with a flat list model! See</p>
|
|
<p><b>See also </b><a href="screenplay-projectsettingslistmodel.html#getActiveSettingsJson">getActiveSettingsJson</a>, to, make, the, flat, list, to, a, hierarchical, json, and object.</p>
|
|
<!-- @@@init -->
|
|
</div>
|
|
<div id= license class="footer center"><p>This documentation is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.</p></div> <script src="../js/mermaid.min.js"></script> <script>var config = {startOnLoad:true,flowchart:{useMaxWidth:true,htmlLabels:true}};mermaid.initialize(config);</script></body>
|
|
</html>
|