1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 02:32:29 +01:00

Add documentation for all classes and methods

Add mermaid diagram
This commit is contained in:
Elias Steurer 2019-12-08 11:38:48 +01:00
parent ae7d69411f
commit e4698df46d
56 changed files with 1118 additions and 142 deletions

View File

@ -71,5 +71,5 @@ HTML.postheader += "<div class=\"container-fullwidth nav\"><div class=\"containe
HTML.postheader += "<div id="mainWrapper" class=\"wrapper container \">\n"
# what to append to every page after the content
HTML.footer += "<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>"
HTML.footer += "<script src=\"../js/mermaid.min.js\"></script>"
HTML.footer += "<script>var config = {startOnLoad:true,flowchart:{useMaxWidth:true,htmlLabels:true}};mermaid.initialize(config);</script>"

View File

@ -12,5 +12,5 @@
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">List of All Members for ImageSelector</h1>
<p>This is the complete list of members for <a href="qml-imageselector.html">ImageSelector</a>, including inherited members.</p>
<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></body>
<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>

View File

@ -38,5 +38,5 @@
}</pre>
<!-- @@@ImageSelector -->
<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></body>
<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>

View File

@ -52,5 +52,5 @@
</ul>
</td></tr>
</table></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></body>
<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>

View File

@ -80,8 +80,30 @@
<!-- $$$App-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>Text</p>
</div>
<div class="mermaid">
graph TD
Main.cpp --> App
App --> QQmlApplicationEngine
App --> GlobalVariables
App --> ScreenPlayManager
ScreenPlayManager --> ScreenPlayWallpaper
ScreenPlayManager --> ScreenPlayWidget
App --> Create
Create--> CreateVideoImport
App --> Util
App --> Settings
App --> SDKConnector
App --> InstalledListModel
InstalledListModel --> ProjectFile
App --> InstalledListFilter
App --> MonitorListModel
MonitorListModel --> Monitor
App --> ProfileListModel
ProfileListModel --> Profile
</div>
</div>
<!-- @@@App -->
<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></body>
<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>

View File

@ -14,9 +14,12 @@
<h1 class="title">List of All Members for Create</h1>
<p>This is the complete list of members for <a href="screenplay-create.html">ScreenPlay::Create</a>, including inherited members.</p>
<ul>
<li class="fn"><span class="name"><b><a href="screenplay-create.html#Create-1">Create</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-create.html#ffmpegOutput-prop">appendFfmpegOutput</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-create.html#createWallpaperStart">createWallpaperStart</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-create.html#ffmpegOutput-prop">ffmpegOutputChanged</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-create.html#progress-prop">progressChanged</a></b></span>(float )</li>
<li class="fn"><span class="name"><b><a href="screenplay-create.html#saveWallpaper">saveWallpaper</a></b></span>(QString , QString , QString , QString , QString , QVector&lt;QString&gt; )</li>
<li class="fn"><span class="name"><b><a href="screenplay-create.html#progress-prop">setProgress</a></b></span>(float )</li>
<li class="fn"><span class="name"><b><a href="screenplay-create.html#workingDir-prop">setWorkingDir</a></b></span>(const QString &amp;)</li>
<li class="fn"><span class="name"><b><a href="screenplay-create.html#workingDir-prop">workingDirChanged</a></b></span>(QString )</li>
@ -24,5 +27,5 @@
<li class="fn"><span class="name"><b><a href="screenplay-create.html#progress-prop">progress</a></b></span>() const : float</li>
<li class="fn"><span class="name"><b><a href="screenplay-create.html#workingDir-prop">workingDir</a></b></span>() const : QString</li>
</ul>
<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></body>
<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>

View File

@ -24,7 +24,7 @@
<h1 class="title">Create Class</h1>
<span class="small-subtitle">(<a href="screenplay-create.html">ScreenPlay::Create</a>)<br/></span>
<!-- $$$Create-brief -->
<p>Baseclass for creating wallapers, widgets and the corresponding wizards. As for this writing (April 2019) it is solely used to import webm wallpaper and create the gif/web 5 second previews. <a href="#details">More...</a></p>
<p>Baseclass for creating wallapers, widgets and the corresponding wizards. <a href="#details">More...</a></p>
<!-- @@@Create -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Create&gt;</span>
@ -34,6 +34,7 @@
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="screenplay-create.html#Create-1">Create</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="screenplay-create.html#ffmpegOutput-prop">ffmpegOutput</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> float </td><td class="memItemRight bottomAlign"><b><a href="screenplay-create.html#progress-prop">progress</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="screenplay-create.html#workingDir-prop">workingDir</a></b>() const</td></tr>
@ -42,6 +43,8 @@
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-create.html#ffmpegOutput-prop">appendFfmpegOutput</a></b>(QString <i>ffmpegOutput</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-create.html#createWallpaperStart">createWallpaperStart</a></b>(QString <i>videoPath</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-create.html#saveWallpaper">saveWallpaper</a></b>(QString <i>title</i>, QString <i>description</i>, QString <i>filePath</i>, QString <i>previewImagePath</i>, QString <i>youtube</i>, QVector&lt;QString&gt; <i>tags</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-create.html#progress-prop">setProgress</a></b>(float <i>progress</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-create.html#workingDir-prop">setWorkingDir</a></b>(const QString &amp;<i>workingDir</i>)</td></tr>
</table></div>
@ -56,7 +59,23 @@
<!-- $$$Create-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>As for this writing (April 2019) it is solely used to import webm wallpaper and create the gif/web 5 second previews.</p>
</div>
<!-- @@@Create -->
<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></body>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Create$$$Create -->
<h3 class="fn" id="Create-1"><a name="Create-1"></a>Create::<span class="name">Create</span>()</h3>
<p>Constructor for the QMLEngine.</p>
<!-- @@@Create -->
<!-- $$$createWallpaperStart[overload1]$$$createWallpaperStartQString -->
<h3 class="fn" id="createWallpaperStart"><a name="createWallpaperStart"></a><code>[slot] </code><span class="type">void</span> Create::<span class="name">createWallpaperStart</span>(<span class="type">QString</span> <i>videoPath</i>)</h3>
<p>Starts the process.</p>
<!-- @@@createWallpaperStart -->
<!-- $$$saveWallpaper[overload1]$$$saveWallpaperQStringQStringQStringQStringQStringQVector<QString> -->
<h3 class="fn" id="saveWallpaper"><a name="saveWallpaper"></a><code>[slot] </code><span class="type">void</span> Create::<span class="name">saveWallpaper</span>(<span class="type">QString</span> <i>title</i>, <span class="type">QString</span> <i>description</i>, <span class="type">QString</span> <i>filePath</i>, <span class="type">QString</span> <i>previewImagePath</i>, <span class="type">QString</span> <i>youtube</i>, <span class="type">QVector</span>&lt;<span class="type">QString</span>&gt; <i>tags</i>)</h3>
<p>When converting of the wallpaper steps where successful.</p>
<!-- @@@saveWallpaper -->
</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>

View File

@ -14,9 +14,18 @@
<h1 class="title">List of All Members for CreateImportVideo</h1>
<p>This is the complete list of members for <a href="screenplay-createimportvideo.html">ScreenPlay::CreateImportVideo</a>, including inherited members.</p>
<ul>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#CreateImportVideo-2">CreateImportVideo</a></b></span>(const QString &amp;, const QString &amp;, QObject *)</li>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#CreateImportVideo-1">CreateImportVideo</a></b></span>(QObject *)</li>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#createWallpaperGifPreview">createWallpaperGifPreview</a></b></span>() : bool</li>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#createWallpaperImagePreview">createWallpaperImagePreview</a></b></span>() : bool</li>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#createWallpaperInfo">createWallpaperInfo</a></b></span>() : bool</li>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#createWallpaperVideo">createWallpaperVideo</a></b></span>() : bool</li>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#createWallpaperVideoPreview">createWallpaperVideoPreview</a></b></span>() : bool</li>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#extractWallpaperAudio">extractWallpaperAudio</a></b></span>() : bool</li>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#process">process</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#progress-prop">progressChanged</a></b></span>(float )</li>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#progress-prop">setProgress</a></b></span>(float )</li>
<li class="fn"><span class="name"><b><a href="screenplay-createimportvideo.html#progress-prop">progress</a></b></span>() const : float</li>
</ul>
<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></body>
<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>

View File

@ -34,11 +34,20 @@
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="screenplay-createimportvideo.html#CreateImportVideo-2">CreateImportVideo</a></b>(const QString &amp;<i>videoPath</i>, const QString &amp;<i>exportPath</i>, QObject *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="screenplay-createimportvideo.html#CreateImportVideo-1">CreateImportVideo</a></b>(QObject *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> float </td><td class="memItemRight bottomAlign"><b><a href="screenplay-createimportvideo.html#progress-prop">progress</a></b>() const</td></tr>
</table></div>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-createimportvideo.html#createWallpaperGifPreview">createWallpaperGifPreview</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-createimportvideo.html#createWallpaperImagePreview">createWallpaperImagePreview</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-createimportvideo.html#createWallpaperInfo">createWallpaperInfo</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-createimportvideo.html#createWallpaperVideo">createWallpaperVideo</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-createimportvideo.html#createWallpaperVideoPreview">createWallpaperVideoPreview</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-createimportvideo.html#extractWallpaperAudio">extractWallpaperAudio</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-createimportvideo.html#process">process</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-createimportvideo.html#progress-prop">setProgress</a></b>(float <i>progress</i>)</td></tr>
</table></div>
<a name="signals"></a>
@ -53,5 +62,111 @@
<p>This lass only exsits as long as the user creates a wallpaper and gets destroyed if the creation was successful or not. The state get propagated via createWallpaperStateChanged(ImportVideoState state);</p>
</div>
<!-- @@@CreateImportVideo -->
<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></body>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$CreateImportVideo$$$CreateImportVideoconstQString&constQString&QObject* -->
<h3 class="fn" id="CreateImportVideo-2"><a name="CreateImportVideo-2"></a>CreateImportVideo::<span class="name">CreateImportVideo</span>(const <span class="type">QString</span> &amp;<i>videoPath</i>, const <span class="type">QString</span> &amp;<i>exportPath</i>, <span class="type">QObject</span> *<i>parent</i> = nullptr)</h3>
<p>Creates a CreateImportVideo object to be used in a different thread. A <i>videoPath</i> and a <i>exportPath</i> are needed for convertion.</p>
<!-- @@@CreateImportVideo -->
<!-- $$$CreateImportVideo$$$CreateImportVideoQObject* -->
<h3 class="fn" id="CreateImportVideo-1"><a name="CreateImportVideo-1"></a>CreateImportVideo::<span class="name">CreateImportVideo</span>(<span class="type">QObject</span> *<i>parent</i> = nullptr)</h3>
<p>This constructor is only needed for calling qRegisterMetaType on CreateImportVideo to register the enums.</p>
<pre class="cpp">qRegisterMetaType<span class="operator">&lt;</span>CreateImportVideo<span class="operator">::</span>ImportVideoState<span class="operator">&gt;</span>(<span class="string">&quot;CreateImportVideo::ImportVideoState&quot;</span>);</pre>
<!-- @@@CreateImportVideo -->
<!-- $$$createWallpaperGifPreview[overload1]$$$createWallpaperGifPreview -->
<h3 class="fn" id="createWallpaperGifPreview"><a name="createWallpaperGifPreview"></a><code>[slot] </code><span class="type">bool</span> CreateImportVideo::<span class="name">createWallpaperGifPreview</span>()</h3>
<p>Starts ffmpeg and tries to covert the given video to a 5 second preview gif.</p>
<pre class="cpp"><span class="comment">//[...]</span>
args<span class="operator">.</span>append(<span class="string">&quot;-filter_complex&quot;</span>);
args<span class="operator">.</span>append(<span class="string">&quot;[0:v] fps=12,scale=w=480:h=-1,split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1&quot;</span>);
args<span class="operator">.</span>append(m_exportPath <span class="operator">+</span> <span class="string">&quot;/preview.gif&quot;</span>);</pre>
<p>Returns <b class="redFont"><code>\return</code></b> false if :</p>
<ul>
<li>Cannot convert the video</li>
<li>Generally broken.</li>
</ul>
<!-- @@@createWallpaperGifPreview -->
<!-- $$$createWallpaperImagePreview[overload1]$$$createWallpaperImagePreview -->
<h3 class="fn" id="createWallpaperImagePreview"><a name="createWallpaperImagePreview"></a><code>[slot] </code><span class="type">bool</span> CreateImportVideo::<span class="name">createWallpaperImagePreview</span>()</h3>
<p>Starts ffmpeg and tries to covert the given video to a image preview. Returns <b class="redFont"><code>\return</code></b> false if :</p>
<ul>
<li>Cannot convert the video</li>
<li>Generally broken.</li>
</ul>
<!-- @@@createWallpaperImagePreview -->
<!-- $$$createWallpaperInfo[overload1]$$$createWallpaperInfo -->
<h3 class="fn" id="createWallpaperInfo"><a name="createWallpaperInfo"></a><code>[slot] </code><span class="type">bool</span> CreateImportVideo::<span class="name">createWallpaperInfo</span>()</h3>
<p>Starts ffprobe and tries to parse the resulting json. Returns <b class="redFont"><code>\return</code></b> false if :</p>
<ul>
<li>Parsing the output json of ffprobe fails.</li>
<li>Has no video.</li>
<li>Cannot parse number of frames.</li>
<li>Is a wrong file format or generally broken.</li>
</ul>
<!-- @@@createWallpaperInfo -->
<!-- $$$createWallpaperVideo[overload1]$$$createWallpaperVideo -->
<h3 class="fn" id="createWallpaperVideo"><a name="createWallpaperVideo"></a><code>[slot] </code><span class="type">bool</span> CreateImportVideo::<span class="name">createWallpaperVideo</span>()</h3>
<p>Starts ffmpeg and tries to covert the given video to a webm video.</p>
<pre class="cpp"><span class="comment">//[...]</span>
args<span class="operator">.</span>append(<span class="string">&quot;-c:v&quot;</span>);
args<span class="operator">.</span>append(<span class="string">&quot;libvpx-vp8&quot;</span>);
args<span class="operator">.</span>append(<span class="string">&quot;-crf&quot;</span>);
args<span class="operator">.</span>append(<span class="string">&quot;30&quot;</span>);
args<span class="operator">.</span>append(<span class="string">&quot;-pix_fmt&quot;</span>);
args<span class="operator">.</span>append(<span class="string">&quot;yuv420p&quot;</span>);
args<span class="operator">.</span>append(<span class="string">&quot;-b:v&quot;</span>);
args<span class="operator">.</span>append(<span class="string">&quot;0&quot;</span>);</pre>
<p>Returns <b class="redFont"><code>\return</code></b> false if :</p>
<ul>
<li>Cannot convert the video</li>
<li>Generally broken.</li>
</ul>
<!-- @@@createWallpaperVideo -->
<!-- $$$createWallpaperVideoPreview[overload1]$$$createWallpaperVideoPreview -->
<h3 class="fn" id="createWallpaperVideoPreview"><a name="createWallpaperVideoPreview"></a><code>[slot] </code><span class="type">bool</span> CreateImportVideo::<span class="name">createWallpaperVideoPreview</span>()</h3>
<p>Starts ffmpeg and tries to covert the given video to a five second preview.</p>
<pre class="cpp"><span class="comment">//[...]</span>
args<span class="operator">.</span>append(<span class="string">&quot;-vf&quot;</span>);
<span class="comment">// We allways want to have a 5 second clip via 24fps -&gt; 120 frames</span>
<span class="comment">// Divided by the number of frames we can skip (timeInSeconds * Framrate)</span>
<span class="comment">// scale &amp; crop parameter: https://unix.stackexchange.com/a/284731</span>
args<span class="operator">.</span>append(<span class="string">&quot;select='not(mod(n,&quot;</span> <span class="operator">+</span> <span class="type">QString</span><span class="operator">::</span>number((m_length <span class="operator">/</span> <span class="number">5</span>)) <span class="operator">+</span> <span class="string">&quot;))',setpts=N/FRAME_RATE/TB,crop=in_h*16/9:in_h,scale=-2:400&quot;</span>);
<span class="comment">// Disable audio</span>
args<span class="operator">.</span>append(<span class="string">&quot;-an&quot;</span>);
args<span class="operator">.</span>append(m_exportPath <span class="operator">+</span> <span class="string">&quot;/preview.webm&quot;</span>);</pre>
<p>Returns <b class="redFont"><code>\return</code></b> false if :</p>
<ul>
<li>Cannot convert the video</li>
<li>Generally broken.</li>
</ul>
<!-- @@@createWallpaperVideoPreview -->
<!-- $$$extractWallpaperAudio[overload1]$$$extractWallpaperAudio -->
<h3 class="fn" id="extractWallpaperAudio"><a name="extractWallpaperAudio"></a><code>[slot] </code><span class="type">bool</span> CreateImportVideo::<span class="name">extractWallpaperAudio</span>()</h3>
<p>Starts ffmpeg and tries to covert the given audio into a seperate mp3.</p>
<pre class="cpp"><span class="comment">//[...]</span>
args<span class="operator">.</span>append(<span class="string">&quot;mp3&quot;</span>);
args<span class="operator">.</span>append(<span class="string">&quot;-ab&quot;</span>);
args<span class="operator">.</span>append(<span class="string">&quot;192000&quot;</span>);
args<span class="operator">.</span>append(<span class="string">&quot;-vn&quot;</span>);
args<span class="operator">.</span>append(m_exportPath <span class="operator">+</span> <span class="string">&quot;/audio.mp3&quot;</span>);</pre>
<p>Returns <b class="redFont"><code>\return</code></b> false if :</p>
<ul>
<li>Cannot convert the audio</li>
<li>Generally broken.</li>
</ul>
<!-- @@@extractWallpaperAudio -->
<!-- $$$process[overload1]$$$process -->
<h3 class="fn" id="process"><a name="process"></a><code>[slot] </code><span class="type">void</span> CreateImportVideo::<span class="name">process</span>()</h3>
<p>Processes the multiple steps of creating a wallpaper.</p>
<ol class="1" type="1"><li><a href="screenplay-createimportvideo.html#createWallpaperInfo">createWallpaperInfo</a>()</li>
<li><a href="screenplay-createimportvideo.html#createWallpaperImagePreview">createWallpaperImagePreview</a>()</li>
<li><a href="screenplay-createimportvideo.html#createWallpaperVideoPreview">createWallpaperVideoPreview</a>()</li>
<li><a href="screenplay-createimportvideo.html#createWallpaperGifPreview">createWallpaperGifPreview</a>()</li>
<li><a href="screenplay-createimportvideo.html#createWallpaperVideo">createWallpaperVideo</a>() - skiped if already a webm</li>
<li><a href="screenplay-createimportvideo.html#extractWallpaperAudio">extractWallpaperAudio</a>() - skiped if no audio</li>
<li>emit createWallpaperStateChanged(ImportVideoState::Finished);</li>
</ol>
<!-- @@@process -->
</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>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- installedlistfilter.cpp -->
<title>List of All Members for InstalledListFilter | ScreemPlay</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>InstalledListFilter</li>
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">List of All Members for InstalledListFilter</h1>
<p>This is the complete list of members for <a href="screenplay-installedlistfilter.html">ScreenPlay::InstalledListFilter</a>, including inherited members.</p>
<ul>
<li class="fn"><span class="name"><b><a href="screenplay-installedlistfilter.html#InstalledListFilter">InstalledListFilter</a></b></span>(const shared_ptr&lt;ScreenPlay::InstalledListModel&gt; &amp;)</li>
<li class="fn"><span class="name"><b><a href="screenplay-installedlistfilter.html#resetFilter">resetFilter</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-installedlistfilter.html#sortByName">sortByName</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-installedlistfilter.html#sortByRoleType">sortByRoleType</a></b></span>(QString )</li>
</ul>
<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>

View File

@ -14,6 +14,8 @@
<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="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
@ -21,17 +23,56 @@
<h1 class="title">InstalledListFilter Class</h1>
<span class="small-subtitle">(<a href="screenplay-installedlistfilter.html">ScreenPlay::InstalledListFilter</a>)<br/></span>
<!-- $$$InstalledListFilter-brief -->
<p>Proxy between Installed List Model and QML view to filter items. Maybe this class could be merged with the <a href="screenplay-installedlistmodel.html">InstalledListModel</a>... <a href="#details">More...</a></p>
<p>Proxy between Installed List Model and QML view to filter items. <a href="#details">More...</a></p>
<!-- @@@InstalledListFilter -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;InstalledListFilter&gt;</span>
</td></tr></table></div><ul>
<li><a href="screenplay-installedlistfilter-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="screenplay-installedlistfilter.html#InstalledListFilter">InstalledListFilter</a></b>(const shared_ptr&lt;ScreenPlay::InstalledListModel&gt; &amp;<i>ilm</i>)</td></tr>
</table></div>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-installedlistfilter.html#resetFilter">resetFilter</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-installedlistfilter.html#sortByName">sortByName</a></b>(QString <i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-installedlistfilter.html#sortByRoleType">sortByRoleType</a></b>(QString <i>type</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$InstalledListFilter-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>This class could be merged with the <a href="screenplay-installedlistmodel.html">InstalledListModel</a> in the future.</p>
</div>
<!-- @@@InstalledListFilter -->
<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></body>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$InstalledListFilter[overload1]$$$InstalledListFilterconstshared_ptr<ScreenPlay::InstalledListModel>& -->
<h3 class="fn" id="InstalledListFilter"><a name="InstalledListFilter"></a>InstalledListFilter::<span class="name">InstalledListFilter</span>(const <span class="type">shared_ptr</span>&lt;<span class="type"><a href="screenplay-installedlistmodel.html">ScreenPlay::InstalledListModel</a></span>&gt; &amp;<i>ilm</i>)</h3>
<p>Sets the default role type to &quot;All&quot; to display all available content. Needs a given <i>ilm</i> (<a href="screenplay-installedlistmodel.html">InstalledListModel</a>).</p>
<!-- @@@InstalledListFilter -->
<!-- $$$resetFilter[overload1]$$$resetFilter -->
<h3 class="fn" id="resetFilter"><a name="resetFilter"></a><code>[slot] </code><span class="type">void</span> InstalledListFilter::<span class="name">resetFilter</span>()</h3>
<p>Resets the filter and sorts by title.</p>
<!-- @@@resetFilter -->
<!-- $$$sortByName[overload1]$$$sortByNameQString -->
<h3 class="fn" id="sortByName"><a name="sortByName"></a><code>[slot] </code><span class="type">void</span> InstalledListFilter::<span class="name">sortByName</span>(<span class="type">QString</span> <i>name</i>)</h3>
<p>Invoked when the user uses the quicksearch at the top right of the installed page. Uses the <i>name</i> to sort by name. This name is saved in the project.json title.</p>
<!-- @@@sortByName -->
<!-- $$$sortByRoleType[overload1]$$$sortByRoleTypeQString -->
<h3 class="fn" id="sortByRoleType"><a name="sortByRoleType"></a><code>[slot] </code><span class="type">void</span> InstalledListFilter::<span class="name">sortByRoleType</span>(<span class="type">QString</span> <i>type</i>)</h3>
<p>Set the filter proxy to sort by the given <i>type</i>. This can be</p>
<ul>
<li>All</li>
<li>Videos</li>
<li>Widgets</li>
<li>Scenes</li>
</ul>
<!-- @@@sortByRoleType -->
</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>

View File

@ -18,5 +18,5 @@
<li class="fn"><span class="name"><b><a href="screenplay-installedlistmodel.html#count-prop">setCount</a></b></span>(int )</li>
<li class="fn"><span class="name"><b><a href="screenplay-installedlistmodel.html#count-prop">count</a></b></span>() const : int</li>
</ul>
<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></body>
<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>

View File

@ -50,7 +50,8 @@
<!-- $$$InstalledListModel-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>Currently we only support one path for the user content. Via a QFileSystemWatcher we automatically reload the list. Dynamic insert and remove is not yet implemented. Otherwhise it is a regular QAbstractListModel based list model.</p>
</div>
<!-- @@@InstalledListModel -->
<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></body>
<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>

View File

@ -31,7 +31,14 @@
<!-- $$$MonitorListModel-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>Loads all available monitors and saves them in a QAbstractListModel inherited list model. This list model gets updated if:</p>
<ul>
<li>A user adds or removes a monitor</li>
<li>A user adds or removes a wallpaper</li>
<li>On startup based on profiles.json</li>
</ul>
<p>This listmodel is also needed for calculating the monitor preview in the UI.</p>
</div>
<!-- @@@MonitorListModel -->
<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></body>
<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>

View File

@ -21,7 +21,7 @@
<h1 class="title">ProfileListModel Class</h1>
<span class="small-subtitle">(<a href="screenplay-profilelistmodel.html">ScreenPlay::ProfileListModel</a>)<br/></span>
<!-- $$$ProfileListModel-brief -->
<p>ProfileListModel. <a href="#details">More...</a></p>
<p>Used to save all active wallpapers and widgets position and configurations after a restart. <a href="#details">More...</a></p>
<!-- @@@ProfileListModel -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;ProfileListModel&gt;</span>
@ -31,7 +31,8 @@
<!-- $$$ProfileListModel-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>Not yet in used class. Otherwhise it is a regular QAbstractListModel based list model.</p>
</div>
<!-- @@@ProfileListModel -->
<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></body>
<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>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- projectsettingslistmodel.cpp -->
<title>List of All Members for ProjectSettingsListModel | ScreemPlay</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="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">List of All Members for ProjectSettingsListModel</h1>
<p>This is the complete list of members for <a href="screenplay-projectsettingslistmodel.html">ScreenPlay::ProjectSettingsListModel</a>, including inherited members.</p>
<ul>
<li class="fn"><span class="name"><b><a href="screenplay-projectsettingslistmodel.html#init">init</a></b></span>(QString )</li>
</ul>
<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>

View File

@ -14,6 +14,7 @@
<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>
@ -21,17 +22,52 @@
<h1 class="title">ProjectSettingsListModel Class</h1>
<span class="small-subtitle">(<a href="screenplay-projectsettingslistmodel.html">ScreenPlay::ProjectSettingsListModel</a>)<br/></span>
<!-- $$$ProjectSettingsListModel-brief -->
<p>ProjectSettingsListModel. <a href="#details">More...</a></p>
<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 &lt;ProjectSettingsListModel&gt;</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"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-projectsettingslistmodel.html#init">init</a></b>(QString <i>file</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">&quot;properties&quot;</span>: {
<span class="string">&quot;Attractor&quot;</span>: {
<span class="string">&quot;attStrength&quot;</span>: {
<span class="string">&quot;from&quot;</span>: <span class="number">0</span><span class="operator">,</span>
<span class="string">&quot;stepSize&quot;</span>: <span class="number">100</span><span class="operator">,</span>
<span class="string">&quot;to&quot;</span>: <span class="number">100000</span><span class="operator">,</span>
<span class="string">&quot;type&quot;</span>: <span class="string">&quot;slider&quot;</span><span class="operator">,</span>
<span class="string">&quot;value&quot;</span>: <span class="number">8000000</span>
}
}<span class="operator">,</span>
<span class="string">&quot;Emitter&quot;</span>: {
<span class="string">&quot;emitRate&quot;</span>: {
<span class="string">&quot;from&quot;</span>: <span class="number">0</span><span class="operator">,</span>
<span class="string">&quot;stepSize&quot;</span>: <span class="number">1</span><span class="operator">,</span>
<span class="string">&quot;to&quot;</span>: <span class="number">2500</span><span class="operator">,</span>
<span class="string">&quot;type&quot;</span>: <span class="string">&quot;slider&quot;</span><span class="operator">,</span>
<span class="string">&quot;value&quot;</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 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></body>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$init[overload1]$$$initQString -->
<h3 class="fn" id="init"><a name="init"></a><span class="type">void</span> ProjectSettingsListModel::<span class="name">init</span>(<span class="type">QString</span> <i>file</i>)</h3>
<p>Recursively loads the content of a project.json. See also <a href="https://kelteseth.gitlab.io/ScreenPlayDocs/project/project/">https://kelteseth.gitlab.io/ScreenPlayDocs/project/project/</a> .</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>

View File

@ -16,10 +16,17 @@
<ul>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#activeWallpaperCounter-prop">activeWallpaperCounterChanged</a></b></span>(int )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#activeWidgetsCounter-prop">activeWidgetsCounterChanged</a></b></span>(int )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#createWallpaper">createWallpaper</a></b></span>(QVector&lt;int&gt; , const QString &amp;, const QString &amp;, const float , const QString &amp;, const QString &amp;, const bool )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#createWidget">createWidget</a></b></span>(const QUrl &amp;, const QString &amp;)</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#getWallpaperByAppID">getWallpaperByAppID</a></b></span>(<i>const QString &amp;</i>) : int</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#removeAllWallpapers">removeAllWallpapers</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#requestProjectSettingsListModelAt">requestProjectSettingsListModelAt</a></b></span>(const int )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#activeWallpaperCounter-prop">setActiveWallpaperCounter</a></b></span>(int )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#activeWidgetsCounter-prop">setActiveWidgetsCounter</a></b></span>(int )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#setAllWallpaperValue">setAllWallpaperValue</a></b></span>(const QString &amp;, const QString &amp;)</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#setWallpaperValue">setWallpaperValue</a></b></span>(const int , const QString &amp;, const QString &amp;)</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#activeWallpaperCounter-prop">activeWallpaperCounter</a></b></span>() const : int</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaymanager.html#activeWidgetsCounter-prop">activeWidgetsCounter</a></b></span>() const : int</li>
</ul>
<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></body>
<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>

View File

@ -24,7 +24,7 @@
<h1 class="title">ScreenPlayManager Class</h1>
<span class="small-subtitle">(<a href="screenplay-screenplaymanager.html">ScreenPlay::ScreenPlayManager</a>)<br/></span>
<!-- $$$ScreenPlayManager-brief -->
<p>ScreenPlayManager. <a href="#details">More...</a></p>
<p>The ScreenPlayManager is used to manage multiple <a href="screenplay-screenplaywallpaper.html">ScreenPlayWallpaper</a> and <a href="screenplay-screenplaywidget.html">ScreenPlayWidget</a>. <a href="#details">More...</a></p>
<!-- @@@ScreenPlayManager -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;ScreenPlayManager&gt;</span>
@ -40,8 +40,15 @@
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaymanager.html#createWallpaper">createWallpaper</a></b>(QVector&lt;int&gt; <i>monitorIndex</i>, const QString &amp;<i>absoluteStoragePath</i>, const QString &amp;<i>previewImage</i>, const float <i>volume</i>, const QString &amp;<i>fillMode</i>, const QString &amp;<i>type</i>, const bool <i>saveToProfilesConfigFile</i> = true)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaymanager.html#createWidget">createWidget</a></b>(const QUrl &amp;<i>absoluteStoragePath</i>, const QString &amp;<i>previewImage</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaymanager.html#getWallpaperByAppID">getWallpaperByAppID</a></b>(<i>const QString &amp;</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaymanager.html#removeAllWallpapers">removeAllWallpapers</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaymanager.html#requestProjectSettingsListModelAt">requestProjectSettingsListModelAt</a></b>(const int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaymanager.html#activeWallpaperCounter-prop">setActiveWallpaperCounter</a></b>(int <i>activeWallpaperCounter</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaymanager.html#activeWidgetsCounter-prop">setActiveWidgetsCounter</a></b>(int <i>activeWidgetsCounter</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaymanager.html#setAllWallpaperValue">setAllWallpaperValue</a></b>(const QString &amp;<i>key</i>, const QString &amp;<i>value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaymanager.html#setWallpaperValue">setWallpaperValue</a></b>(const int <i>index</i>, const QString &amp;<i>key</i>, const QString &amp;<i>value</i>)</td></tr>
</table></div>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
@ -53,7 +60,39 @@
<!-- $$$ScreenPlayManager-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>Creates and (indirectly) destroys Wallpaper and Widgets via opening and closing QLocalPipe connectons of the ScreenPlaySDK. Also responsible to set the current active wallpaper to the monitorListModel.</p>
</div>
<!-- @@@ScreenPlayManager -->
<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></body>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$createWallpaper[overload1]$$$createWallpaperQVector<int>constQString&constQString&constfloatconstQString&constQString&constbool -->
<h3 class="fn" id="createWallpaper"><a name="createWallpaper"></a><code>[slot] </code><span class="type">void</span> ScreenPlayManager::<span class="name">createWallpaper</span>(<span class="type">QVector</span>&lt;<span class="type">int</span>&gt; <i>monitorIndex</i>, const <span class="type">QString</span> &amp;<i>absoluteStoragePath</i>, const <span class="type">QString</span> &amp;<i>previewImage</i>, const <span class="type">float</span> <i>volume</i>, const <span class="type">QString</span> &amp;<i>fillMode</i>, const <span class="type">QString</span> &amp;<i>type</i>, const <span class="type">bool</span> <i>saveToProfilesConfigFile</i> = true)</h3>
<p>Creates a wallpaper with a given <i>monitorIndex</i> list, <i>a</i> absoluteStoragePath folder, a <i>previewImage</i> (relative path to the absoluteStoragePath), a default <i>volume</i>, a <i>fillMode</i>, a <i>type</i> (htmlWallpaper, qmlWallpaper etc.), a <i>saveToProfilesConfigFile</i> bool only set to flase if we call the method when using via the settings on startup to skip a unnecessary save.</p>
<!-- @@@createWallpaper -->
<!-- $$$createWidget[overload1]$$$createWidgetconstQUrl&constQString& -->
<h3 class="fn" id="createWidget"><a name="createWidget"></a><code>[slot] </code><span class="type">void</span> ScreenPlayManager::<span class="name">createWidget</span>(const <span class="type">QUrl</span> &amp;<i>absoluteStoragePath</i>, const <span class="type">QString</span> &amp;<i>previewImage</i>)</h3>
<p>Creates a <a href="screenplay-screenplaywidget.html">ScreenPlayWidget</a> object via a <i>absoluteStoragePath</i> and a <i>preview</i> image (relative path).</p>
<!-- @@@createWidget -->
<!-- $$$getWallpaperByAppID[overload1]$$$getWallpaperByAppIDconstQString& -->
<h3 class="fn" id="getWallpaperByAppID"><a name="getWallpaperByAppID"></a><code>[slot] </code><span class="type">int</span> ScreenPlayManager::<span class="name">getWallpaperByAppID</span>(<i>const QString &amp;</i>)</h3>
<p>Returns <b class="redFont"><code>\return</code></b> a <a href="screenplay-screenplaywallpaper.html">ScreenPlayWallpaper</a> if successful, otherwhise <b class="redFont"><code>\return</code></b> std::nullopt.</p>
<!-- @@@getWallpaperByAppID -->
<!-- $$$removeAllWallpapers[overload1]$$$removeAllWallpapers -->
<h3 class="fn" id="removeAllWallpapers"><a name="removeAllWallpapers"></a><code>[slot] </code><span class="type">void</span> ScreenPlayManager::<span class="name">removeAllWallpapers</span>()</h3>
<p>Removes all wallpaper entries in the profiles.json. This method will likely be removed when using nlohmann/json in the future.</p>
<!-- @@@removeAllWallpapers -->
<!-- $$$requestProjectSettingsListModelAt[overload1]$$$requestProjectSettingsListModelAtconstint -->
<h3 class="fn" id="requestProjectSettingsListModelAt"><a name="requestProjectSettingsListModelAt"></a><code>[slot] </code><span class="type">void</span> ScreenPlayManager::<span class="name">requestProjectSettingsListModelAt</span>(const <span class="type">int</span> <i>index</i>)</h3>
<p>Request a spesific json profile to display in the active wallpaper popup on the right.</p>
<!-- @@@requestProjectSettingsListModelAt -->
<!-- $$$setAllWallpaperValue[overload1]$$$setAllWallpaperValueconstQString&constQString& -->
<h3 class="fn" id="setAllWallpaperValue"><a name="setAllWallpaperValue"></a><code>[slot] </code><span class="type">void</span> ScreenPlayManager::<span class="name">setAllWallpaperValue</span>(const <span class="type">QString</span> &amp;<i>key</i>, const <span class="type">QString</span> &amp;<i>value</i>)</h3>
<p>Convenient function to set a <i>value</i> at a given <i>index</i> and <i>key</i> for all wallaper. For exmaple used to mute all wallpaper.</p>
<!-- @@@setAllWallpaperValue -->
<!-- $$$setWallpaperValue[overload1]$$$setWallpaperValueconstintconstQString&constQString& -->
<h3 class="fn" id="setWallpaperValue"><a name="setWallpaperValue"></a><code>[slot] </code><span class="type">void</span> ScreenPlayManager::<span class="name">setWallpaperValue</span>(const <span class="type">int</span> <i>index</i>, const <span class="type">QString</span> &amp;<i>key</i>, const <span class="type">QString</span> &amp;<i>value</i>)</h3>
<p>Set a wallpaper <i>value</i> at a given <i>index</i> and <i>key</i>.</p>
<!-- @@@setWallpaperValue -->
</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>

View File

@ -15,6 +15,8 @@
<p>This is the complete list of members for <a href="screenplay-screenplaywallpaper.html">ScreenPlay::ScreenPlayWallpaper</a>, including inherited members.</p>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#ScreenPlayWallpaper-1">ScreenPlayWallpaper</a></b></span>(const QVector&lt;int&gt; &amp;, const shared_ptr&lt;ScreenPlay::GlobalVariables&gt; &amp;, const QString &amp;, const QString &amp;, const QString &amp;, const QString &amp;, const QJsonObject &amp;, QObject *)</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#ScreenPlayWallpaper">ScreenPlayWallpaper</a></b></span>(const QVector&lt;int&gt; &amp;, const shared_ptr&lt;ScreenPlay::GlobalVariables&gt; &amp;, const QString &amp;, const QString &amp;, const QString &amp;, const float , const QString &amp;, const QString &amp;, QObject *)</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#absolutePath-prop">absolutePathChanged</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#appID-prop">appIDChanged</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#file-prop">fileChanged</a></b></span>(QString )</li>
@ -26,8 +28,8 @@
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#appID-prop">setAppID</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#file-prop">setFile</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#fillMode-prop">setFillMode</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#previewImage-prop">setPreviewImage</a></b></span>(QString )</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#previewImage-prop">setPreviewImage</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#profileJsonObject-prop">setProfileJsonObject</a></b></span>(QJsonObject )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#screenNumber-prop">setScreenNumber</a></b></span>(QVector&lt;int&gt; )</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywallpaper.html#type-prop">setType</a></b></span>(QString )</li>
@ -43,5 +45,5 @@
</ul>
</td></tr>
</table></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></body>
<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>

View File

@ -24,7 +24,7 @@
<h1 class="title">ScreenPlayWallpaper Class</h1>
<span class="small-subtitle">(<a href="screenplay-screenplaywallpaper.html">ScreenPlay::ScreenPlayWallpaper</a>)<br/></span>
<!-- $$$ScreenPlayWallpaper-brief -->
<p>ScreenPlayWallpaper. <a href="#details">More...</a></p>
<p>A Single Object to manage a Wallpaper. <a href="#details">More...</a></p>
<!-- @@@ScreenPlayWallpaper -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;ScreenPlayWallpaper&gt;</span>
@ -34,6 +34,8 @@
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaywallpaper.html#ScreenPlayWallpaper-1">ScreenPlayWallpaper</a></b>(const QVector&lt;int&gt; &amp;<i>screenNumber</i>, const shared_ptr&lt;ScreenPlay::GlobalVariables&gt; &amp;<i>globalVariables</i>, const QString &amp;<i>appID</i>, const QString &amp;<i>absolutePath</i>, const QString &amp;<i>previewImage</i>, const QString &amp;<i>type</i>, const QJsonObject &amp;<i>profileJsonObject</i>, QObject *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaywallpaper.html#ScreenPlayWallpaper">ScreenPlayWallpaper</a></b>(const QVector&lt;int&gt; &amp;<i>screenNumber</i>, const shared_ptr&lt;ScreenPlay::GlobalVariables&gt; &amp;<i>globalVariables</i>, const QString &amp;<i>appID</i>, const QString &amp;<i>absolutePath</i>, const QString &amp;<i>previewImage</i>, const float <i>volume</i>, const QString &amp;<i>fillMode</i>, const QString &amp;<i>type</i>, QObject *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaywallpaper.html#absolutePath-prop">absolutePath</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaywallpaper.html#appID-prop">appID</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="screenplay-screenplaywallpaper.html#file-prop">file</a></b>() const</td></tr>
@ -71,7 +73,19 @@
<!-- $$$ScreenPlayWallpaper-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>This class is only for managing the QProcess to an extern ScreenPlayWallpaper!</p>
</div>
<!-- @@@ScreenPlayWallpaper -->
<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></body>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$ScreenPlayWallpaper$$$ScreenPlayWallpaperconstQVector<int>&constshared_ptr<ScreenPlay::GlobalVariables>&constQString&constQString&constQString&constQString&constQJsonObject&QObject* -->
<h3 class="fn" id="ScreenPlayWallpaper-1"><a name="ScreenPlayWallpaper-1"></a>ScreenPlayWallpaper::<span class="name">ScreenPlayWallpaper</span>(const <span class="type">QVector</span>&lt;<span class="type">int</span>&gt; &amp;<i>screenNumber</i>, const <span class="type">shared_ptr</span>&lt;<span class="type">ScreenPlay::GlobalVariables</span>&gt; &amp;<i>globalVariables</i>, const <span class="type">QString</span> &amp;<i>appID</i>, const <span class="type">QString</span> &amp;<i>absolutePath</i>, const <span class="type">QString</span> &amp;<i>previewImage</i>, const <span class="type">QString</span> &amp;<i>type</i>, const <span class="type">QJsonObject</span> &amp;<i>profileJsonObject</i>, <span class="type">QObject</span> *<i>parent</i> = nullptr)</h3>
<p>Constructor for scene Wallpaper with multile json settings.</p>
<!-- @@@ScreenPlayWallpaper -->
<!-- $$$ScreenPlayWallpaper[overload1]$$$ScreenPlayWallpaperconstQVector<int>&constshared_ptr<ScreenPlay::GlobalVariables>&constQString&constQString&constQString&constfloatconstQString&constQString&QObject* -->
<h3 class="fn" id="ScreenPlayWallpaper"><a name="ScreenPlayWallpaper"></a>ScreenPlayWallpaper::<span class="name">ScreenPlayWallpaper</span>(const <span class="type">QVector</span>&lt;<span class="type">int</span>&gt; &amp;<i>screenNumber</i>, const <span class="type">shared_ptr</span>&lt;<span class="type">ScreenPlay::GlobalVariables</span>&gt; &amp;<i>globalVariables</i>, const <span class="type">QString</span> &amp;<i>appID</i>, const <span class="type">QString</span> &amp;<i>absolutePath</i>, const <span class="type">QString</span> &amp;<i>previewImage</i>, const <span class="type">float</span> <i>volume</i>, const <span class="type">QString</span> &amp;<i>fillMode</i>, const <span class="type">QString</span> &amp;<i>type</i>, <span class="type">QObject</span> *<i>parent</i> = nullptr)</h3>
<p>Constructor for video Wallpaper.</p>
<!-- @@@ScreenPlayWallpaper -->
</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>

View File

@ -27,5 +27,5 @@
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywidget.html#previewImage-prop">previewImage</a></b></span>() const : QString</li>
<li class="fn"><span class="name"><b><a href="screenplay-screenplaywidget.html#projectPath-prop">projectPath</a></b></span>() const : QString</li>
</ul>
<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></body>
<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>

View File

@ -24,7 +24,7 @@
<h1 class="title">ScreenPlayWidget Class</h1>
<span class="small-subtitle">(<a href="screenplay-screenplaywidget.html">ScreenPlay::ScreenPlayWidget</a>)<br/></span>
<!-- $$$ScreenPlayWidget-brief -->
<p>ScreenPlayWidget. <a href="#details">More...</a></p>
<p>A Single Object to manage a Widget. <a href="#details">More...</a></p>
<!-- @@@ScreenPlayWidget -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;ScreenPlayWidget&gt;</span>
@ -59,7 +59,8 @@
<!-- $$$ScreenPlayWidget-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>This class is only for managing the QProcess to an extern ScreenPlayWidget!</p>
</div>
<!-- @@@ScreenPlayWidget -->
<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></body>
<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>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- sdkconnector.cpp -->
<title>List of All Members for SDKConnector | ScreemPlay</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>SDKConnector</li>
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">List of All Members for SDKConnector</h1>
<p>This is the complete list of members for <a href="screenplay-sdkconnector.html">ScreenPlay::SDKConnector</a>, including inherited members.</p>
<ul>
<li class="fn"><span class="name"><b><a href="screenplay-sdkconnector.html#SDKConnector">SDKConnector</a></b></span>(QObject *)</li>
<li class="fn"><span class="name"><b><a href="screenplay-sdkconnector.html#closeAllConnections">closeAllConnections</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-sdkconnector.html#closeAllWallpapers">closeAllWallpapers</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-sdkconnector.html#closeWallpaper">closeWallpaper</a></b></span>(const QString &amp;)</li>
<li class="fn"><span class="name"><b><a href="screenplay-sdkconnector.html#closeWallpapersAt">closeWallpapersAt</a></b></span>(int )</li>
<li class="fn"><span class="name"><b><a href="screenplay-sdkconnector.html#newConnection">newConnection</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-sdkconnector.html#setSceneValue">setSceneValue</a></b></span>(QString , QString , QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-sdkconnector.html#setWallpaperValue">setWallpaperValue</a></b></span>(QString , QString , QString )</li>
</ul>
<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>

View File

@ -14,6 +14,8 @@
<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="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
@ -21,17 +23,76 @@
<h1 class="title">SDKConnector Class</h1>
<span class="small-subtitle">(<a href="screenplay-sdkconnector.html">ScreenPlay::SDKConnector</a>)<br/></span>
<!-- $$$SDKConnector-brief -->
<p>SDKConnector. <a href="#details">More...</a></p>
<p>SDKConnector is used for the QLocalSocket connection between <a href="screenplay.html">ScreenPlay</a> and the standalone <a href="screenplay-screenplaywallpaper.html">ScreenPlayWallpaper</a> and <a href="screenplay-screenplaywidget.html">ScreenPlayWidget</a> executables. <a href="#details">More...</a></p>
<!-- @@@SDKConnector -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;SDKConnector&gt;</span>
</td></tr></table></div><ul>
<li><a href="screenplay-sdkconnector-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="screenplay-sdkconnector.html#SDKConnector">SDKConnector</a></b>(QObject *<i>parent</i> = nullptr)</td></tr>
</table></div>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-sdkconnector.html#closeAllConnections">closeAllConnections</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-sdkconnector.html#closeAllWallpapers">closeAllWallpapers</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-sdkconnector.html#closeWallpaper">closeWallpaper</a></b>(const QString &amp;<i>appID</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-sdkconnector.html#closeWallpapersAt">closeWallpapersAt</a></b>(int <i>at</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-sdkconnector.html#newConnection">newConnection</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-sdkconnector.html#setSceneValue">setSceneValue</a></b>(QString <i>appID</i>, QString <i>key</i>, QString <i>value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-sdkconnector.html#setWallpaperValue">setWallpaperValue</a></b>(QString <i>appID</i>, QString <i>key</i>, QString <i>value</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$SDKConnector-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>To deal with crashes in faulty widgets and wallpaper we open an external application. The communication is done via the ScreenPlaySDK subproject. To identify a incomming connection we use the appID. When a new connection is established we save the QLocalSocket and wait for the first message. If the message contains &quot;appID=MyUniqueKeyA-Z_a-z_0-9,type=qmlWallpaper&quot; we cant map the socket to a wallpaper/widget.</p>
</div>
<!-- @@@SDKConnector -->
<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></body>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$SDKConnector[overload1]$$$SDKConnectorQObject* -->
<h3 class="fn" id="SDKConnector"><a name="SDKConnector"></a>SDKConnector::<span class="name">SDKConnector</span>(<span class="type">QObject</span> *<i>parent</i> = nullptr)</h3>
<p>Starts the QLocalServer with the pipename <a href="screenplay.html">ScreenPlay</a>.</p>
<!-- @@@SDKConnector -->
<!-- $$$closeAllConnections[overload1]$$$closeAllConnections -->
<h3 class="fn" id="closeAllConnections"><a name="closeAllConnections"></a><code>[slot] </code><span class="type">void</span> SDKConnector::<span class="name">closeAllConnections</span>()</h3>
<p>Closes all m_clients connections and clears the QVector.</p>
<!-- @@@closeAllConnections -->
<!-- $$$closeAllWallpapers[overload1]$$$closeAllWallpapers -->
<h3 class="fn" id="closeAllWallpapers"><a name="closeAllWallpapers"></a><code>[slot] </code><span class="type">void</span> SDKConnector::<span class="name">closeAllWallpapers</span>()</h3>
<p>Closes all wallpaper connection with the following type:</p>
<ul>
<li>videoWallpaper</li>
<li>qmlWallpaper</li>
<li>htmlWallpaper</li>
<li>godotWallpaper</li>
</ul>
<!-- @@@closeAllWallpapers -->
<!-- $$$closeWallpaper[overload1]$$$closeWallpaperconstQString& -->
<h3 class="fn" id="closeWallpaper"><a name="closeWallpaper"></a><code>[slot] </code><span class="type">void</span> SDKConnector::<span class="name">closeWallpaper</span>(const <span class="type">QString</span> &amp;<i>appID</i>)</h3>
<p>Closes a wallpaper by the given <i>appID</i>.</p>
<!-- @@@closeWallpaper -->
<!-- $$$closeWallpapersAt[overload1]$$$closeWallpapersAtint -->
<h3 class="fn" id="closeWallpapersAt"><a name="closeWallpapersAt"></a><code>[slot] </code><span class="type">void</span> SDKConnector::<span class="name">closeWallpapersAt</span>(<span class="type">int</span> <i>at</i>)</h3>
<p>Closes a wallpaper at the given <i>index</i>. The native monitor index is used here. On Windows the monitor 0 is the main display.</p>
<!-- @@@closeWallpapersAt -->
<!-- $$$newConnection[overload1]$$$newConnection -->
<h3 class="fn" id="newConnection"><a name="newConnection"></a><code>[slot] </code><span class="type">void</span> SDKConnector::<span class="name">newConnection</span>()</h3>
<p>Appends a new SDKConnection object shared_ptr to the m_clients list.</p>
<!-- @@@newConnection -->
<!-- $$$setSceneValue[overload1]$$$setSceneValueQStringQStringQString -->
<h3 class="fn" id="setSceneValue"><a name="setSceneValue"></a><code>[slot] </code><span class="type">void</span> SDKConnector::<span class="name">setSceneValue</span>(<span class="type">QString</span> <i>appID</i>, <span class="type">QString</span> <i>key</i>, <span class="type">QString</span> <i>value</i>)</h3>
<p>Sets a given <i>value</i> to a given <i>key</i>. The <i>appID</i> is used to identify the receiver socket.</p>
<!-- @@@setSceneValue -->
<!-- $$$setWallpaperValue[overload1]$$$setWallpaperValueQStringQStringQString -->
<h3 class="fn" id="setWallpaperValue"><a name="setWallpaperValue"></a><code>[slot] </code><span class="type">void</span> SDKConnector::<span class="name">setWallpaperValue</span>(<span class="type">QString</span> <i>appID</i>, <span class="type">QString</span> <i>key</i>, <span class="type">QString</span> <i>value</i>)</h3>
<p>Sets a given <i>value</i> to a given <i>key</i>. The <i>appID</i> is used to identify the receiver socket.</p>
<!-- @@@setWallpaperValue -->
</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>

View File

@ -15,6 +15,7 @@
<p>This is the complete list of members for <a href="screenplay-settings.html">ScreenPlay::Settings</a>, including inherited members.</p>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#Settings">Settings</a></b></span>(const shared_ptr&lt;ScreenPlay::GlobalVariables&gt; &amp;, QObject *)</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#anonymousTelemetry-prop">anonymousTelemetryChanged</a></b></span>(bool )</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#autostart-prop">autostartChanged</a></b></span>(bool )</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#decoder-prop">decoderChanged</a></b></span>(QString )</li>
@ -28,10 +29,14 @@
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#gitBuildHash-prop">setGitBuildHash</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#highPriorityStart-prop">setHighPriorityStart</a></b></span>(bool )</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#offlineMode-prop">setOfflineMode</a></b></span>(bool )</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#pauseWallpaperWhenIngame-prop">setPauseWallpaperWhenIngame</a></b></span>(bool )</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#silentStart-prop">setSilentStart</a></b></span>(bool )</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#setupLanguage">setupLanguage</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#setupWidgetAndWindowPaths">setupWidgetAndWindowPaths</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#silentStart-prop">silentStartChanged</a></b></span>(bool )</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#writeJsonFileFromResource">writeJsonFileFromResource</a></b></span>(const QString &amp;)</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#writeSingleSettingConfig">writeSingleSettingConfig</a></b></span>(QString , QVariant ) : bool</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#anonymousTelemetry-prop">anonymousTelemetry</a></b></span>() const : bool</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#autostart-prop">autostart</a></b></span>() const : bool</li>
<li class="fn"><span class="name"><b><a href="screenplay-settings.html#decoder-prop">decoder</a></b></span>() const : QString</li>
@ -44,5 +49,5 @@
</ul>
</td></tr>
</table></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></body>
<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>

View File

@ -24,7 +24,7 @@
<h1 class="title">Settings Class</h1>
<span class="small-subtitle">(<a href="screenplay-settings.html">ScreenPlay::Settings</a>)<br/></span>
<!-- $$$Settings-brief -->
<p>Used for:. <a href="#details">More...</a></p>
<p>Global settings class for reading and writing settings. <a href="#details">More...</a></p>
<!-- @@@Settings -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Settings&gt;</span>
@ -34,6 +34,7 @@
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#Settings">Settings</a></b>(const shared_ptr&lt;ScreenPlay::GlobalVariables&gt; &amp;<i>globalVariables</i>, QObject *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#anonymousTelemetry-prop">anonymousTelemetry</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#autostart-prop">autostart</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#decoder-prop">decoder</a></b>() const</td></tr>
@ -55,6 +56,10 @@
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#offlineMode-prop">setOfflineMode</a></b>(bool <i>offlineMode</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#pauseWallpaperWhenIngame-prop">setPauseWallpaperWhenIngame</a></b>(bool <i>pauseWallpaperWhenIngame</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#silentStart-prop">setSilentStart</a></b>(bool <i>silentStart</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#setupLanguage">setupLanguage</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#setupWidgetAndWindowPaths">setupWidgetAndWindowPaths</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#writeJsonFileFromResource">writeJsonFileFromResource</a></b>(const QString &amp;<i>filename</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#writeSingleSettingConfig">writeSingleSettingConfig</a></b>(QString <i>name</i>, QVariant <i>value</i>)</td></tr>
</table></div>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
@ -72,8 +77,56 @@
<!-- $$$Settings-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p><i>User</i> configuration <i>Communication</i> via the SDK Connector</p>
<p>Used for:</p>
<ul>
<li>User configuration via AppDataLocalScreenPlayScreenPlay<ul>
<li>profiles.json - saved wallpaper and widgets config</li>
<li>settings.json - saved settings like autostart and installedContentPath</li>
<li>Computer\HKEY_CURRENT_USER\Software\<a href="screenplay.html">ScreenPlay</a>\<a href="screenplay.html">ScreenPlay</a> - ScreenPlayContentPath for steam plugin</li>
</ul>
</li>
<li>Communication via the SDK Connector</li>
</ul>
<p>Currently we save the regular settings (not the setup of the wallpaper and widgets) in two different locations. This can change in the future!</p>
</div>
<!-- @@@Settings -->
<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></body>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Settings[overload1]$$$Settingsconstshared_ptr<ScreenPlay::GlobalVariables>&QObject* -->
<h3 class="fn" id="Settings"><a name="Settings"></a>Settings::<span class="name">Settings</span>(const <span class="type">shared_ptr</span>&lt;<span class="type">ScreenPlay::GlobalVariables</span>&gt; &amp;<i>globalVariables</i>, <span class="type">QObject</span> *<i>parent</i> = nullptr)</h3>
<p>Constructor and sets up:</p>
<ol class="1" type="1"><li>Sets the git build hash via <a href="screenplay.html">ScreenPlay</a>.pro c++ define</li>
<li>Checks the langauge via settings or system and available ones and installes a translator.</li>
<li>Checks the paths for config folders in appdata</li>
<li>Checks if settings.json and profiles.json are available. If first run it creates the default settings and profiles json.</li>
<li>Parses the version and checks with the compiled one.</li>
<li>Checks the absoluteStoragePath.</li>
<li>Checks regisitry for steam plugin settings</li>
<li>Parses autostart, <a href="screenplay-settings.html#anonymousTelemetry-prop">anonymousTelemetry</a>, <a href="screenplay-settings.html#highPriorityStart-prop">highPriorityStart</a></li>
<li>Checks <a href="screenplay-screenplaywallpaper.html">ScreenPlayWallpaper</a> and ScreenPlayWidgets executable paths.</li>
</ol>
<p>More errorchecking is needed here. For example when the proile or settings json cannot to parsed, use the default settings.</p>
<!-- @@@Settings -->
<!-- $$$setupLanguage[overload1]$$$setupLanguage -->
<h3 class="fn" id="setupLanguage"><a name="setupLanguage"></a><code>[slot] </code><span class="type">void</span> Settings::<span class="name">setupLanguage</span>()</h3>
<p>When no default language is set in the registry we check the system set language. If there is no matching translation is available we set it to english. This function gets called from the UI when the user manually changes the language.</p>
<!-- @@@setupLanguage -->
<!-- $$$setupWidgetAndWindowPaths[overload1]$$$setupWidgetAndWindowPaths -->
<h3 class="fn" id="setupWidgetAndWindowPaths"><a name="setupWidgetAndWindowPaths"></a><code>[slot] </code><span class="type">void</span> Settings::<span class="name">setupWidgetAndWindowPaths</span>()</h3>
<p>To have a better developer experience we check if we use a debug version. Then we assume That the paths are the default QtCreator paths and set the widgets and wallpaper executable paths accordingly.</p>
<!-- @@@setupWidgetAndWindowPaths -->
<!-- $$$writeJsonFileFromResource[overload1]$$$writeJsonFileFromResourceconstQString& -->
<h3 class="fn" id="writeJsonFileFromResource"><a name="writeJsonFileFromResource"></a><code>[slot] </code><span class="type">void</span> Settings::<span class="name">writeJsonFileFromResource</span>(const <span class="type">QString</span> &amp;<i>filename</i>)</h3>
<p>Writes the default JsonFile from the resources and the given <i>filename</i>. Currently we have two default json files:</p>
<ul>
<li>profiles.json</li>
<li>settings.json</li>
</ul>
<!-- @@@writeJsonFileFromResource -->
<!-- $$$writeSingleSettingConfig[overload1]$$$writeSingleSettingConfigQStringQVariant -->
<h3 class="fn" id="writeSingleSettingConfig"><a name="writeSingleSettingConfig"></a><code>[slot] </code><span class="type">bool</span> Settings::<span class="name">writeSingleSettingConfig</span>(<span class="type">QString</span> <i>name</i>, <span class="type">QVariant</span> <i>value</i>)</h3>
<p>Save a single <i>value</i> with a given <i>name</i> (key) into the settings.json. Returns <code>true</code> when successful otherise returns <code>false</code>.</p>
<!-- @@@writeSingleSettingConfig -->
</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>

View File

@ -13,13 +13,28 @@
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">List of All Members for Util</h1>
<p>This is the complete list of members for <a href="screenplay-util.html">ScreenPlay::Util</a>, including inherited members.</p>
<ul>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#aquireFFMPEGStatus-prop">aquireFFMPEGStatusChanged</a></b></span>(ScreenPlay::Util::AquireFFMPEGStatus )</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#copyToClipboard">copyToClipboard</a></b></span>(const QString &amp;) const</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#debugMessages-prop">debugMessagesChanged</a></b></span>(QString )</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#downloadFFMPEG">downloadFFMPEG</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#ffmpegAvailable-prop">ffmpegAvailableChanged</a></b></span>(bool )</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#generateRandomString">generateRandomString</a></b></span>(quint32 ) : QString</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#getVersionNumberFromString">getVersionNumberFromString</a></b></span>(<i>const QString &amp;</i>) : int</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#logToGui">logToGui</a></b></span>(QtMsgType , const QMessageLogContext &amp;, const QString &amp;)</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#openFolderInExplorer">openFolderInExplorer</a></b></span>(const QString &amp;) const</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#openJsonFileToObject">openJsonFileToObject</a></b></span>(<i>const QString &amp;</i>) : int</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#openJsonFileToString">openJsonFileToString</a></b></span>(<i>const QString &amp;</i>) : int</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#requestAllLDataProtection">requestAllLDataProtection</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#requestAllLicenses">requestAllLicenses</a></b></span>()</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#writeJsonObjectToFile">writeJsonObjectToFile</a></b></span>(const QString &amp;, const QJsonObject &amp;, bool ) : bool</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#aquireFFMPEGStatus-prop">aquireFFMPEGStatus</a></b></span>() const : ScreenPlay::Util::AquireFFMPEGStatus</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#debugMessages-prop">debugMessages</a></b></span>() const : QString</li>
<li class="fn"><span class="name"><b><a href="screenplay-util.html#ffmpegAvailable-prop">ffmpegAvailable</a></b></span>() const : bool</li>
</ul>
<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></body>
</td></tr>
</table></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>

View File

@ -15,6 +15,7 @@
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
@ -23,7 +24,7 @@
<h1 class="title">Util Class</h1>
<span class="small-subtitle">(<a href="screenplay-util.html">ScreenPlay::Util</a>)<br/></span>
<!-- $$$Util-brief -->
<p>Easy to use global object to use to:. <a href="#details">More...</a></p>
<p>Easy to use global object to use when certain functionality is not available in QML. <a href="#details">More...</a></p>
<!-- @@@Util -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Util&gt;</span>
@ -37,6 +38,21 @@
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#debugMessages-prop">debugMessages</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#ffmpegAvailable-prop">ffmpegAvailable</a></b>() const</td></tr>
</table></div>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#copyToClipboard">copyToClipboard</a></b>(const QString &amp;<i>text</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#downloadFFMPEG">downloadFFMPEG</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#generateRandomString">generateRandomString</a></b>(quint32 <i>length</i> = 32)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#getVersionNumberFromString">getVersionNumberFromString</a></b>(<i>const QString &amp;</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#logToGui">logToGui</a></b>(QtMsgType <i>type</i>, const QMessageLogContext &amp;<i>context</i>, const QString &amp;<i>msg</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#openFolderInExplorer">openFolderInExplorer</a></b>(const QString &amp;<i>url</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#openJsonFileToObject">openJsonFileToObject</a></b>(<i>const QString &amp;</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#openJsonFileToString">openJsonFileToString</a></b>(<i>const QString &amp;</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#requestAllLDataProtection">requestAllLDataProtection</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#requestAllLicenses">requestAllLicenses</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-util.html#writeJsonObjectToFile">writeJsonObjectToFile</a></b>(const QString &amp;<i>absoluteFilePath</i>, const QJsonObject &amp;<i>object</i>, bool <i>truncate</i> = true)</td></tr>
</table></div>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
@ -48,8 +64,59 @@
<!-- $$$Util-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p><i>Navigate</i> the main menu <i>Open</i> Explorer at a given path</p>
</div>
<!-- @@@Util -->
<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></body>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$copyToClipboard[overload1]$$$copyToClipboardconstQString& -->
<h3 class="fn" id="copyToClipboard"><a name="copyToClipboard"></a><code>[slot] </code><span class="type">void</span> Util::<span class="name">copyToClipboard</span>(const <span class="type">QString</span> &amp;<i>text</i>) const</h3>
<p>Copies the given string to the clipboard.</p>
<!-- @@@copyToClipboard -->
<!-- $$$downloadFFMPEG[overload1]$$$downloadFFMPEG -->
<h3 class="fn" id="downloadFFMPEG"><a name="downloadFFMPEG"></a><code>[slot] </code><span class="type">void</span> Util::<span class="name">downloadFFMPEG</span>()</h3>
<p>Downloads and extracts ffmpeg static version from https://ffmpeg.zeranoe.com The progress is tracked via setAquireFFMPEGStatus(AquireFFMPEGStatus);</p>
<!-- @@@downloadFFMPEG -->
<!-- $$$generateRandomString[overload1]$$$generateRandomStringquint32 -->
<h3 class="fn" id="generateRandomString"><a name="generateRandomString"></a><code>[static slot] </code><span class="type">QString</span> Util::<span class="name">generateRandomString</span>(<span class="type">quint32</span> <i>length</i> = 32)</h3>
<p>Generates a (non secure) random string with the default length of 32. Can contain:</p>
<ul>
<li>A-Z</li>
<li>a-z</li>
<li>0-9</li>
</ul>
<!-- @@@generateRandomString -->
<!-- $$$getVersionNumberFromString[overload1]$$$getVersionNumberFromStringconstQString& -->
<h3 class="fn" id="getVersionNumberFromString"><a name="getVersionNumberFromString"></a><code>[static slot] </code><span class="type">int</span> Util::<span class="name">getVersionNumberFromString</span>(<i>const QString &amp;</i>)</h3>
<p>Parses a version from a given QString. The QString must be looke like this: 1.0&#x2e;0 - Major.Minor.Patch. A fixed position is used for parsing (at 0,2,4). Return std::nullopt when not successful.</p>
<!-- @@@getVersionNumberFromString -->
<!-- $$$logToGui[overload1]$$$logToGuiQtMsgTypeconstQMessageLogContext&constQString& -->
<h3 class="fn" id="logToGui"><a name="logToGui"></a><code>[static slot] </code><span class="type">void</span> Util::<span class="name">logToGui</span>(<span class="type">QtMsgType</span> <i>type</i>, const <span class="type">QMessageLogContext</span> &amp;<i>context</i>, const <span class="type">QString</span> &amp;<i>msg</i>)</h3>
<p>Basic logging to the GUI. No logging is done to a log file for now. This string can be copied in the settings tab in the UI.</p>
<!-- @@@logToGui -->
<!-- $$$openFolderInExplorer[overload1]$$$openFolderInExplorerconstQString& -->
<h3 class="fn" id="openFolderInExplorer"><a name="openFolderInExplorer"></a><code>[slot] </code><span class="type">void</span> Util::<span class="name">openFolderInExplorer</span>(const <span class="type">QString</span> &amp;<i>url</i>) const</h3>
<p>Opens a native folder window on the given path. Windows and Mac only for now!</p>
<!-- @@@openFolderInExplorer -->
<!-- $$$openJsonFileToObject[overload1]$$$openJsonFileToObjectconstQString& -->
<h3 class="fn" id="openJsonFileToObject"><a name="openJsonFileToObject"></a><code>[static slot] </code><span class="type">int</span> Util::<span class="name">openJsonFileToObject</span>(<i>const QString &amp;</i>)</h3>
<p>Opens a json file (absolute path) and tries to convert it to a QJsonObject. Return std::nullopt when not successful.</p>
<!-- @@@openJsonFileToObject -->
<!-- $$$openJsonFileToString[overload1]$$$openJsonFileToStringconstQString& -->
<h3 class="fn" id="openJsonFileToString"><a name="openJsonFileToString"></a><code>[static slot] </code><span class="type">int</span> Util::<span class="name">openJsonFileToString</span>(<i>const QString &amp;</i>)</h3>
<p>Opens a json file (absolute path) and tries to convert it to a QString. Return std::nullopt when not successful.</p>
<!-- @@@openJsonFileToString -->
<!-- $$$requestAllLDataProtection[overload1]$$$requestAllLDataProtection -->
<h3 class="fn" id="requestAllLDataProtection"><a name="requestAllLDataProtection"></a><code>[slot] </code><span class="type">void</span> Util::<span class="name">requestAllLDataProtection</span>()</h3>
<p>Loads all dataprotection of the legal folder in the qrc into a property string of this class. allDataProtectionLoaded is emited when loading is finished.</p>
<!-- @@@requestAllLDataProtection -->
<!-- $$$requestAllLicenses[overload1]$$$requestAllLicenses -->
<h3 class="fn" id="requestAllLicenses"><a name="requestAllLicenses"></a><code>[slot] </code><span class="type">void</span> Util::<span class="name">requestAllLicenses</span>()</h3>
<p>Loads all content of the legal folder in the qrc into a property string of this class. allLicenseLoaded is emited when loading is finished.</p>
<!-- @@@requestAllLicenses -->
<!-- $$$writeJsonObjectToFile[overload1]$$$writeJsonObjectToFileconstQString&constQJsonObject&bool -->
<h3 class="fn" id="writeJsonObjectToFile"><a name="writeJsonObjectToFile"></a><code>[static slot] </code><span class="type">bool</span> Util::<span class="name">writeJsonObjectToFile</span>(const <span class="type">QString</span> &amp;<i>absoluteFilePath</i>, const <span class="type">QJsonObject</span> &amp;<i>object</i>, <span class="type">bool</span> <i>truncate</i> = true)</h3>
<p>Writes a given QJsonObject to a file. The path must be absolute. When truncate is set to true the exsisting json file will be overriten.</p>
<!-- @@@writeJsonObjectToFile -->
</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>

View File

@ -56,13 +56,13 @@
<p>The App class contains all members for <a href="screenplay.html">ScreenPlay</a>. <a href="screenplay-app.html#details">More...</a></p>
<!-- @@@App -->
<h3> class <a href="screenplay-create.html">Create</a></h3><!-- $$$Create-brief -->
<p>Baseclass for creating wallapers, widgets and the corresponding wizards. As for this writing (April 2019) it is solely used to import webm wallpaper and create the gif/web 5 second previews. <a href="screenplay-create.html#details">More...</a></p>
<p>Baseclass for creating wallapers, widgets and the corresponding wizards. <a href="screenplay-create.html#details">More...</a></p>
<!-- @@@Create -->
<h3> class <a href="screenplay-createimportvideo.html">CreateImportVideo</a></h3><!-- $$$CreateImportVideo-brief -->
<p>This class imports (copies) and creates wallaper previews. <a href="screenplay-createimportvideo.html#details">More...</a></p>
<!-- @@@CreateImportVideo -->
<h3> class <a href="screenplay-installedlistfilter.html">InstalledListFilter</a></h3><!-- $$$InstalledListFilter-brief -->
<p>Proxy between Installed List Model and QML view to filter items. Maybe this class could be merged with the <a href="screenplay-installedlistmodel.html">InstalledListModel</a>... <a href="screenplay-installedlistfilter.html#details">More...</a></p>
<p>Proxy between Installed List Model and QML view to filter items. <a href="screenplay-installedlistfilter.html#details">More...</a></p>
<!-- @@@InstalledListFilter -->
<h3> class <a href="screenplay-installedlistmodel.html">InstalledListModel</a></h3><!-- $$$InstalledListModel-brief -->
<p>Lists all installed wallpapers, widgets etc. from a given Path. <a href="screenplay-installedlistmodel.html#details">More...</a></p>
@ -71,29 +71,29 @@
<p>MonitorListModel. <a href="screenplay-monitorlistmodel.html#details">More...</a></p>
<!-- @@@MonitorListModel -->
<h3> class <a href="screenplay-profilelistmodel.html">ProfileListModel</a></h3><!-- $$$ProfileListModel-brief -->
<p>ProfileListModel. <a href="screenplay-profilelistmodel.html#details">More...</a></p>
<p>Used to save all active wallpapers and widgets position and configurations after a restart. <a href="screenplay-profilelistmodel.html#details">More...</a></p>
<!-- @@@ProfileListModel -->
<h3> class <a href="screenplay-projectsettingslistmodel.html">ProjectSettingsListModel</a></h3><!-- $$$ProjectSettingsListModel-brief -->
<p>ProjectSettingsListModel. <a href="screenplay-projectsettingslistmodel.html#details">More...</a></p>
<p>ProjectSettingsListModel used for the dynamic loading of the properties json object inside a project.json. <a href="screenplay-projectsettingslistmodel.html#details">More...</a></p>
<!-- @@@ProjectSettingsListModel -->
<h3> class <a href="screenplay-sdkconnector.html">SDKConnector</a></h3><!-- $$$SDKConnector-brief -->
<p>SDKConnector. <a href="screenplay-sdkconnector.html#details">More...</a></p>
<p>SDKConnector is used for the QLocalSocket connection between <a href="screenplay.html">ScreenPlay</a> and the standalone <a href="screenplay-screenplaywallpaper.html">ScreenPlayWallpaper</a> and <a href="screenplay-screenplaywidget.html">ScreenPlayWidget</a> executables. <a href="screenplay-sdkconnector.html#details">More...</a></p>
<!-- @@@SDKConnector -->
<h3> class <a href="screenplay-screenplaymanager.html">ScreenPlayManager</a></h3><!-- $$$ScreenPlayManager-brief -->
<p>ScreenPlayManager. <a href="screenplay-screenplaymanager.html#details">More...</a></p>
<p>The ScreenPlayManager is used to manage multiple <a href="screenplay-screenplaywallpaper.html">ScreenPlayWallpaper</a> and <a href="screenplay-screenplaywidget.html">ScreenPlayWidget</a>. <a href="screenplay-screenplaymanager.html#details">More...</a></p>
<!-- @@@ScreenPlayManager -->
<h3> class <a href="screenplay-screenplaywallpaper.html">ScreenPlayWallpaper</a></h3><!-- $$$ScreenPlayWallpaper-brief -->
<p>ScreenPlayWallpaper. <a href="screenplay-screenplaywallpaper.html#details">More...</a></p>
<p>A Single Object to manage a Wallpaper. <a href="screenplay-screenplaywallpaper.html#details">More...</a></p>
<!-- @@@ScreenPlayWallpaper -->
<h3> class <a href="screenplay-screenplaywidget.html">ScreenPlayWidget</a></h3><!-- $$$ScreenPlayWidget-brief -->
<p>ScreenPlayWidget. <a href="screenplay-screenplaywidget.html#details">More...</a></p>
<p>A Single Object to manage a Widget. <a href="screenplay-screenplaywidget.html#details">More...</a></p>
<!-- @@@ScreenPlayWidget -->
<h3> class <a href="screenplay-settings.html">Settings</a></h3><!-- $$$Settings-brief -->
<p>Used for:. <a href="screenplay-settings.html#details">More...</a></p>
<p>Global settings class for reading and writing settings. <a href="screenplay-settings.html#details">More...</a></p>
<!-- @@@Settings -->
<h3> class <a href="screenplay-util.html">Util</a></h3><!-- $$$Util-brief -->
<p>Easy to use global object to use to:. <a href="screenplay-util.html#details">More...</a></p>
<p>Easy to use global object to use when certain functionality is not available in QML. <a href="screenplay-util.html#details">More...</a></p>
<!-- @@@Util -->
</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></body>
<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>

26
Docs/js/mermaid.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,32 @@ namespace ScreenPlay {
\inmodule ScreenPlay
\brief The App class contains all members for ScreenPlay.
Text
\raw HTML
<div class="mermaid">
graph TD
Main.cpp --> App
App --> QQmlApplicationEngine
App --> GlobalVariables
App --> ScreenPlayManager
ScreenPlayManager --> ScreenPlayWallpaper
ScreenPlayManager --> ScreenPlayWidget
App --> Create
Create--> CreateVideoImport
App --> Util
App --> Settings
App --> SDKConnector
App --> InstalledListModel
InstalledListModel --> ProjectFile
App --> InstalledListFilter
App --> MonitorListModel
MonitorListModel --> Monitor
App --> ProfileListModel
ProfileListModel --> Profile
</div>
\endraw
*/
App::App()

View File

@ -4,8 +4,11 @@
\class ScreenPlay::Create
\inmodule ScreenPlay
\brief Baseclass for creating wallapers, widgets and the corresponding
wizards. As for this writing (April 2019) it is solely used to
import webm wallpaper and create the gif/web 5 second previews.
wizards.
As for this writing (April 2019) it is solely used to import webm wallpaper
and create the gif/web 5 second previews.
*/
namespace ScreenPlay {
@ -19,7 +22,9 @@ Create::Create(const shared_ptr<GlobalVariables>& globalVariables, QObject* pare
qmlRegisterType<Create>("ScreenPlay.Create", 1, 0, "Create");
}
// Constructor for the QMLEngine
/*!
Constructor for the QMLEngine.
*/
Create::Create()
: QObject(nullptr)
, m_globalVariables(nullptr)
@ -29,6 +34,9 @@ Create::Create()
qmlRegisterType<Create>("ScreenPlay.Create", 1, 0, "Create");
}
/*!
Starts the process.
*/
void Create::createWallpaperStart(QString videoPath)
{
clearFfmpegOutput();
@ -67,6 +75,9 @@ void Create::createWallpaperStart(QString videoPath)
}
/*!
When converting of the wallpaper steps where successful.
*/
void Create::saveWallpaper(QString title, QString description, QString filePath, QString previewImagePath, QString youtube, QVector<QString> tags)
{
filePath.remove("file:///");

View File

@ -13,11 +13,21 @@ namespace ScreenPlay {
*/
/*!
This constructor is only needed for calling qRegisterMetaType on CreateImportVideo to register the enums.
\code
qRegisterMetaType<CreateImportVideo::ImportVideoState>("CreateImportVideo::ImportVideoState");
\endcode
*/
CreateImportVideo::CreateImportVideo(QObject* parent)
: QObject(parent)
{
}
/*!
Creates a CreateImportVideo object to be used in a different thread. A \a videoPath and a \a exportPath are
needed for convertion.
*/
CreateImportVideo::CreateImportVideo(const QString& videoPath, const QString& exportPath, QObject* parent)
: QObject(parent)
{
@ -25,6 +35,18 @@ CreateImportVideo::CreateImportVideo(const QString& videoPath, const QString& ex
m_exportPath = exportPath;
}
/*!
Processes the multiple steps of creating a wallpaper.
\list 1
\li createWallpaperInfo()
\li createWallpaperImagePreview()
\li createWallpaperVideoPreview()
\li createWallpaperGifPreview()
\li createWallpaperVideo() - skiped if already a webm
\li extractWallpaperAudio() - skiped if no audio
\li emit createWallpaperStateChanged(ImportVideoState::Finished);
\endlist
*/
void CreateImportVideo::process()
{
@ -64,6 +86,16 @@ void CreateImportVideo::process()
emit createWallpaperStateChanged(ImportVideoState::Finished);
}
/*!
Starts ffprobe and tries to parse the resulting json.
Returns \return false if :
\list
\li Parsing the output json of ffprobe fails.
\li Has no video.
\li Cannot parse number of frames.
\li Is a wrong file format or generally broken.
\endlist
*/
bool CreateImportVideo::createWallpaperInfo()
{
// Get video info
@ -209,6 +241,25 @@ bool CreateImportVideo::createWallpaperInfo()
return true;
}
/*!
Starts ffmpeg and tries to covert the given video to a five second preview.
\code
//[...]
args.append("-vf");
// We allways want to have a 5 second clip via 24fps -> 120 frames
// Divided by the number of frames we can skip (timeInSeconds * Framrate)
// scale & crop parameter: https://unix.stackexchange.com/a/284731
args.append("select='not(mod(n," + QString::number((m_length / 5)) + "))',setpts=N/FRAME_RATE/TB,crop=in_h*16/9:in_h,scale=-2:400");
// Disable audio
args.append("-an");
args.append(m_exportPath + "/preview.webm");
\endcode
Returns \return false if :
\list
\li Cannot convert the video
\li Generally broken.
\endlist
*/
bool CreateImportVideo::createWallpaperVideoPreview()
{
emit createWallpaperStateChanged(ImportVideoState::ConvertingPreviewVideo);
@ -286,6 +337,20 @@ bool CreateImportVideo::createWallpaperVideoPreview()
return true;
}
/*!
Starts ffmpeg and tries to covert the given video to a 5 second preview gif.
\code
//[...]
args.append("-filter_complex");
args.append("[0:v] fps=12,scale=w=480:h=-1,split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1");
args.append(m_exportPath + "/preview.gif");
\endcode
Returns \return false if :
\list
\li Cannot convert the video
\li Generally broken.
\endlist
*/
bool CreateImportVideo::createWallpaperGifPreview()
{
@ -339,6 +404,14 @@ bool CreateImportVideo::createWallpaperGifPreview()
return true;
}
/*!
Starts ffmpeg and tries to covert the given video to a image preview.
Returns \return false if :
\list
\li Cannot convert the video
\li Generally broken.
\endlist
*/
bool CreateImportVideo::createWallpaperImagePreview()
{
@ -397,6 +470,25 @@ bool CreateImportVideo::createWallpaperImagePreview()
return true;
}
/*!
Starts ffmpeg and tries to covert the given video to a webm video.
\code
//[...]
args.append("-c:v");
args.append("libvpx-vp8");
args.append("-crf");
args.append("30");
args.append("-pix_fmt");
args.append("yuv420p");
args.append("-b:v");
args.append("0");
\endcode
Returns \return false if :
\list
\li Cannot convert the video
\li Generally broken.
\endlist
*/
bool CreateImportVideo::createWallpaperVideo()
{
@ -488,7 +580,22 @@ bool CreateImportVideo::createWallpaperVideo()
return true;
}
/*!
Starts ffmpeg and tries to covert the given audio into a seperate mp3.
\code
//[...]
args.append("mp3");
args.append("-ab");
args.append("192000");
args.append("-vn");
args.append(m_exportPath + "/audio.mp3");
\endcode
Returns \return false if :
\list
\li Cannot convert the audio
\li Generally broken.
\endlist
*/
bool CreateImportVideo::extractWallpaperAudio()
{

View File

@ -1,15 +1,19 @@
#include "installedlistfilter.h"
namespace ScreenPlay {
/*!
\class ScreenPlay::InstalledListFilter
\inmodule ScreenPlay
\brief Proxy between Installed List Model and QML view to filter items.
Maybe this class could be merged with the InstalledListModel...
This class could be merged with the InstalledListModel in the future.
*/
/*!
Sets the default role type to "All" to display all available content. Needs a given
\a ilm (InstalledListModel).
*/
InstalledListFilter::InstalledListFilter(const shared_ptr<InstalledListModel>& ilm)
: QSortFilterProxyModel()
, m_ilm(ilm)
@ -19,6 +23,15 @@ InstalledListFilter::InstalledListFilter(const shared_ptr<InstalledListModel>& i
sortByRoleType("All");
}
/*!
Set the filter proxy to sort by the given \a type. This can be
\list
\li All
\li Videos
\li Widgets
\li Scenes
\endlist
*/
void InstalledListFilter::sortByRoleType(QString type)
{
if (type == "All") {
@ -38,6 +51,10 @@ void InstalledListFilter::sortByRoleType(QString type)
sort(0);
}
/*!
Invoked when the user uses the quicksearch at the top right of the installed page.
Uses the \a name to sort by name. This name is saved in the project.json title.
*/
void InstalledListFilter::sortByName(QString name)
{
setFilterRole(InstalledListModel::InstalledRole::TitleRole);
@ -46,6 +63,9 @@ void InstalledListFilter::sortByName(QString name)
sort(0);
}
/*!
Resets the filter and sorts by title.
*/
void InstalledListFilter::resetFilter()
{
setFilterRole(InstalledListModel::InstalledRole::TitleRole);

View File

@ -1,9 +1,10 @@
#pragma once
#include "installedlistmodel.h"
#include <QRegExp>
#include <QSortFilterProxyModel>
#include <memory>
#include "installedlistmodel.h"
namespace ScreenPlay {
class InstalledListFilter : public QSortFilterProxyModel {
@ -16,6 +17,7 @@ public slots:
void sortByRoleType(QString type);
void sortByName(QString name);
void resetFilter();
private:
const shared_ptr<InstalledListModel> m_ilm;
};

View File

@ -5,8 +5,11 @@ namespace ScreenPlay {
/*!
\class ScreenPlay::InstalledListModel
\inmodule ScreenPlay
\brief Lists all installed wallpapers, widgets etc. from a given Path
\brief Lists all installed wallpapers, widgets etc. from a given Path.
Currently we only support one path for the user content. Via a QFileSystemWatcher we
automatically reload the list. Dynamic insert and remove is not yet implemented.
Otherwhise it is a regular QAbstractListModel based list model.
*/
InstalledListModel::InstalledListModel(

View File

@ -6,6 +6,7 @@
#include <QDir>
#include <QDirIterator>
#include <QFile>
#include <QFileSystemWatcher>
#include <QFuture>
#include <QFutureWatcher>
#include <QJsonArray>
@ -15,13 +16,11 @@
#include <QString>
#include <QUrl>
#include <QVector>
#include <QFileSystemWatcher>
#include <QtConcurrent/QtConcurrent>
#include "globalvariables.h"
#include "profilelistmodel.h"
#include "projectfile.h"
#include "globalvariables.h"
#include <memory>
@ -43,7 +42,6 @@ public:
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
QHash<int, QByteArray> roleNames() const override;
enum InstalledRole {
TitleRole = Qt::UserRole,
TypeRole,
@ -56,7 +54,6 @@ public:
};
Q_ENUM(InstalledRole)
int count() const
{
return m_count;
@ -64,7 +61,7 @@ public:
public slots:
void loadInstalledContent();
void append(const QJsonObject &, const QString &);
void append(const QJsonObject&, const QString&);
void reset();
void init();
QVariantMap get(QString folderId);
@ -89,7 +86,7 @@ signals:
private:
QFileSystemWatcher m_fileSystemWatcher;
QVector<ProjectFile> m_screenPlayFiles;
int m_count{0};
int m_count { 0 };
const shared_ptr<GlobalVariables>& m_globalVariables;
};

View File

@ -7,6 +7,14 @@ namespace ScreenPlay {
\inmodule ScreenPlay
\brief MonitorListModel.
Loads all available monitors and saves them in a QAbstractListModel inherited list model.
This list model gets updated if:
\list
\li A user adds or removes a monitor
\li A user adds or removes a wallpaper
\li On startup based on profiles.json
\endlist
This listmodel is also needed for calculating the monitor preview in the UI.
*/
MonitorListModel::MonitorListModel(QObject* parent)

View File

@ -19,11 +19,6 @@
#include <memory>
#include <optional>
/*!
\class Monitor List Model
\brief Listsmodel for all active monitors
*/
namespace ScreenPlay {
struct Monitor {
@ -79,7 +74,6 @@ public:
std::optional<QString> getAppIDByMonitorIndex(const int index) const;
signals:
void monitorReloadCompleted();
void setNewActiveMonitor(int index, QString path);
@ -92,13 +86,13 @@ public slots:
void screenAdded(QScreen* screen)
{
qDebug() << "screenAdded" << screen->geometry()<< m_monitorList.size();
qDebug() << "screenAdded" << screen->geometry() << m_monitorList.size();
emit monitorConfigurationChanged();
reset();
}
void screenRemoved(QScreen* screen)
{
qDebug() << "screenRemoved"<< screen->geometry() << m_monitorList.size();
qDebug() << "screenRemoved" << screen->geometry() << m_monitorList.size();
emit monitorConfigurationChanged();
reset();
}
@ -109,7 +103,6 @@ public slots:
return app->screens().at(0)->availableVirtualGeometry();
}
private:
void loadMonitors();

View File

@ -3,13 +3,16 @@
#include <QString>
#include <QUrl>
namespace ScreenPlay {
/*!
\class Profile
\class ScreenPlay::Profile
\inmodule ScreenPlay
\brief A classed used in combination with Profile List Model.
See Profile List Model for more details
*/
namespace ScreenPlay {
struct Profile {
Profile() {}

View File

@ -11,7 +11,9 @@ namespace ScreenPlay {
/*!
\class ScreenPlay::ProfileListModel
\inmodule ScreenPlay
\brief ProfileListModel.
\brief Used to save all active wallpapers and widgets position and configurations after a restart.
Not yet in used class. Otherwhise it is a regular QAbstractListModel based list model.
*/

View File

@ -14,13 +14,6 @@
#include <memory>
/*!
\class Profile List Model
\brief Use to save all active wallpapers and widgets position and configurations after a restart
\todo Implement this!
- Add a profile for a combination of active wallpaper and widgets!
*/
namespace ScreenPlay {
using std::shared_ptr;

View File

@ -3,13 +3,15 @@
#include <QString>
#include <QVariant>
namespace ScreenPlay {
/*!
\class Project Settings List Item
\brief List Item for Project Settings List Model. See Project Settings List Model for more informations
\class ScreenPlay::ProjectSettingsListItem
\inmodule ScreenPlay
\brief List Item for Project Settings List Model. See ProjectSettingsListModel for more informations.
*/
namespace ScreenPlay {
struct ProjectSettingsListItem {

View File

@ -5,8 +5,33 @@ namespace ScreenPlay {
/*!
\class ScreenPlay::ProjectSettingsListModel
\inmodule ScreenPlay
\brief ProjectSettingsListModel.
\brief ProjectSettingsListModel used for the dynamic loading of the properties json object inside a project.json.
The loaded properties are allowed to have one level of nesting to simulate headlines:
\code
"properties": {
"Attractor": {
"attStrength": {
"from": 0,
"stepSize": 100,
"to": 100000,
"type": "slider",
"value": 8000000
}
},
"Emitter": {
"emitRate": {
"from": 0,
"stepSize": 1,
"to": 2500,
"type": "slider",
"value": 25
}
}
}
\endcode
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.
*/
ProjectSettingsListModel::ProjectSettingsListModel(QString file, QObject* parent)
: QAbstractListModel(parent)
@ -54,6 +79,10 @@ QHash<int, QByteArray> ProjectSettingsListModel::roleNames() const
return roles;
}
/*!
Recursively loads the content of a project.json.
See also \l {https://kelteseth.gitlab.io/ScreenPlayDocs/project/project/} .
*/
void ProjectSettingsListModel::init(QString file)
{
QFile configTmp;

View File

@ -7,24 +7,18 @@
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QQmlContext>
#include <QVector>
#include "projectsettingslistitem.h"
/*!
\class Project Settings List Model
\brief Reads the project.json for every Wallpaper, Scene or Widget "general" object and displays it for the user to modify
*/
namespace ScreenPlay {
class ProjectSettingsListModel : public QAbstractListModel {
Q_OBJECT
public:
explicit ProjectSettingsListModel(QString file, QObject* parent = nullptr);
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
QHash<int, QByteArray> roleNames() const override;

View File

@ -5,10 +5,11 @@ namespace ScreenPlay {
/*!
\class ScreenPlay::ScreenPlayManager
\inmodule ScreenPlay
\brief ScreenPlayManager.
\brief The ScreenPlayManager is used to manage multiple ScreenPlayWallpaper and ScreenPlayWidget.
Creates and (indirectly) destroys Wallpaper and Widgets via opening and closing QLocalPipe connectons of the ScreenPlaySDK.
Also responsible to set the current active wallpaper to the monitorListModel.
*/
ScreenPlayManager::ScreenPlayManager(
const shared_ptr<GlobalVariables>& globalVariables,
const shared_ptr<MonitorListModel>& mlm,
@ -22,6 +23,12 @@ ScreenPlayManager::ScreenPlayManager(
loadWallpaperProfiles();
}
/*!
Creates a wallpaper with a given \a monitorIndex list, \a a absoluteStoragePath folder,
a \a previewImage (relative path to the absoluteStoragePath), a default \a volume,
a \a fillMode, a \a type (htmlWallpaper, qmlWallpaper etc.), a \a saveToProfilesConfigFile bool only set to flase
if we call the method when using via the settings on startup to skip a unnecessary save.
*/
void ScreenPlayManager::createWallpaper(
QVector<int> monitorIndex,
const QString& absoluteStoragePath,
@ -93,6 +100,9 @@ void ScreenPlayManager::createWallpaper(
increaseActiveWallpaperCounter();
}
/*!
Creates a ScreenPlayWidget object via a \a absoluteStoragePath and a \a preview image (relative path).
*/
void ScreenPlayManager::createWidget(const QUrl& absoluteStoragePath, const QString& previewImage)
{
increaseActiveWidgetsCounter();
@ -107,6 +117,10 @@ void ScreenPlayManager::createWidget(const QUrl& absoluteStoragePath, const QStr
this));
}
/*!
Removes all wallpaper entries in the profiles.json. This method will likely be removed
when using nlohmann/json in the future.
*/
void ScreenPlayManager::removeAllWallpapers()
{
if (!m_screenPlayWallpapers.empty()) {
@ -143,15 +157,27 @@ void ScreenPlayManager::removeAllWallpapers()
}
}
void ScreenPlayManager::removeWallpaperAt(int at)
/*!
Removes a Wallpaper at the given monitor \a at (index). Internally searches for a appID at the
given monitor index and then closes the sdk connection, removes the entries in the
monitor list model and decreases the active wallpaper counter property of ScreenPlayManager.
*/
bool ScreenPlayManager::removeWallpaperAt(int at)
{
if (auto appID = m_monitorListModel->getAppIDByMonitorIndex(at)) {
m_sdkconnector->closeWallpaper(appID.value());
m_monitorListModel->closeWallpaper(appID.value());
decreaseActiveWallpaperCounter();
return true;
}
return false;
}
/*!
Request a spesific json profile to display in the active wallpaper popup on the right.
*/
void ScreenPlayManager::requestProjectSettingsListModelAt(const int index)
{
for (const shared_ptr<ScreenPlayWallpaper>& uPtrWallpaper : m_screenPlayWallpapers) {
@ -165,6 +191,9 @@ void ScreenPlayManager::requestProjectSettingsListModelAt(const int index)
emit projectSettingsListModelNotFound();
}
/*!
Set a wallpaper \a value at a given \a index and \a key.
*/
void ScreenPlayManager::setWallpaperValue(const int index, const QString& key, const QString& value)
{
if (auto appID = m_monitorListModel->getAppIDByMonitorIndex(index)) {
@ -176,6 +205,9 @@ void ScreenPlayManager::setWallpaperValue(const int index, const QString& key, c
}
}
/*!
Convenient function to set a \a value at a given \a index and \a key for all wallaper. For exmaple used to mute all wallpaper.
*/
void ScreenPlayManager::setAllWallpaperValue(const QString& key, const QString& value)
{
for (const shared_ptr<ScreenPlayWallpaper>& uPtrWallpaper : m_screenPlayWallpapers) {
@ -183,6 +215,9 @@ void ScreenPlayManager::setAllWallpaperValue(const QString& key, const QString&
}
}
/*!
Returns \return a ScreenPlayWallpaper if successful, otherwhise \return std::nullopt.
*/
std::optional<shared_ptr<ScreenPlayWallpaper>> ScreenPlayManager::getWallpaperByAppID(const QString& appID)
{
for (auto& wallpaper : m_screenPlayWallpapers) {
@ -193,6 +228,10 @@ std::optional<shared_ptr<ScreenPlayWallpaper>> ScreenPlayManager::getWallpaperBy
return std::nullopt;
}
/*!
Saves a given wallpaper \a newProfileObject to a \a profileName. We ignore the profileName argument
because we currently only support one profile. Returns \return true if successfuly saved to profiles.json, otherwise \return false.
*/
bool ScreenPlayManager::saveWallpaperProfile(const QString& profileName, const QJsonObject& newProfileObject)
{
// Remove when implementing profiles
@ -212,7 +251,7 @@ bool ScreenPlayManager::saveWallpaperProfile(const QString& profileName, const Q
QJsonArray newWallpaperArray;
if (oldWallpaperArray.empty()) {
newWallpaperArray.append(newProfileObject);
newWallpaperArray.append(newProfileObject);
} else {
for (QJsonValueRef wallpaper : oldWallpaperArray) {
QJsonObject entry = wallpaper.toObject();
@ -244,6 +283,9 @@ bool ScreenPlayManager::saveWallpaperProfile(const QString& profileName, const Q
return Util::writeJsonObjectToFile(absoluteProfilesFilePath, newConfig);
}
/*!
Loads all wallpaper from profiles.json when the version number matches and starts the available wallpaper
*/
void ScreenPlayManager::loadWallpaperProfiles()
{

View File

@ -19,11 +19,6 @@
#include <memory>
#include <optional>
/*!
\class ScreenPlay
\brief Used for Creation of Wallpaper, Scenes and Widgets
*/
namespace ScreenPlay {
using std::shared_ptr,
@ -47,7 +42,6 @@ public:
const shared_ptr<SDKConnector>& sdkc,
QObject* parent = nullptr);
int activeWallpaperCounter() const
{
return m_activeWallpaperCounter;
@ -102,14 +96,13 @@ public slots:
void createWidget(const QUrl& absoluteStoragePath, const QString& previewImage);
void removeAllWallpapers();
void removeWallpaperAt(const int at = 0);
bool removeWallpaperAt(const int at = 0);
void requestProjectSettingsListModelAt(const int index);
void setWallpaperValue(const int index, const QString& key, const QString& value);
void setAllWallpaperValue(const QString& key, const QString& value);
std::optional<shared_ptr<ScreenPlayWallpaper>> getWallpaperByAppID(const QString& appID);
void setActiveWallpaperCounter(int activeWallpaperCounter)
{
if (m_activeWallpaperCounter == activeWallpaperCounter)
@ -132,7 +125,6 @@ private:
void loadWallpaperProfiles();
bool saveWallpaperProfile(const QString& profileName, const QJsonObject& content);
private:
const shared_ptr<GlobalVariables>& m_globalVariables;
const shared_ptr<MonitorListModel>& m_monitorListModel;

View File

@ -6,9 +6,14 @@ namespace ScreenPlay {
/*!
\class ScreenPlay::ScreenPlayWallpaper
\inmodule ScreenPlay
\brief ScreenPlayWallpaper.
\brief A Single Object to manage a Wallpaper.
This class is only for managing the QProcess to an extern ScreenPlayWallpaper!
*/
/*!
Constructor for video Wallpaper.
*/
ScreenPlayWallpaper::ScreenPlayWallpaper(
const QVector<int>& screenNumber,
const shared_ptr<GlobalVariables>& globalVariables,
@ -62,6 +67,9 @@ ScreenPlayWallpaper::ScreenPlayWallpaper(
m_process.startDetached();
}
/*!
Constructor for scene Wallpaper with multile json settings.
*/
ScreenPlayWallpaper::ScreenPlayWallpaper(
const QVector<int>& screenNumber,
const shared_ptr<GlobalVariables>& globalVariables,

View File

@ -49,7 +49,6 @@ public:
const QJsonObject& profileJsonObject,
QObject* parent = nullptr);
const shared_ptr<ProjectSettingsListModel>& projectSettingsListModel() const
{
return m_projectSettingsListModel;

View File

@ -5,7 +5,9 @@ namespace ScreenPlay {
/*!
\class ScreenPlay::ScreenPlayWidget
\inmodule ScreenPlay
\brief ScreenPlayWidget.
\brief A Single Object to manage a Widget.
This class is only for managing the QProcess to an extern ScreenPlayWidget!
*/
ScreenPlayWidget::ScreenPlayWidget(

View File

@ -5,9 +5,16 @@ namespace ScreenPlay {
/*!
\class ScreenPlay::SDKConnector
\inmodule ScreenPlay
\brief SDKConnector.
\brief SDKConnector is used for the QLocalSocket connection between ScreenPlay and the standalone ScreenPlayWallpaper and ScreenPlayWidget executables.
To deal with crashes in faulty widgets and wallpaper we open an external application. The communication is done via the ScreenPlaySDK subproject.
To identify a incomming connection we use the appID. When a new connection is established we save the QLocalSocket and wait for the first message.
If the message contains "appID=MyUniqueKeyA-Z_a-z_0-9,type=qmlWallpaper" we cant map the socket to a wallpaper/widget.
*/
/*!
Starts the QLocalServer with the pipename ScreenPlay.
*/
SDKConnector::SDKConnector(QObject* parent)
: QObject(parent)
, m_server { make_unique<QLocalServer>() }
@ -23,11 +30,17 @@ void SDKConnector::readyRead()
{
}
/*!
Appends a new SDKConnection object shared_ptr to the m_clients list.
*/
void SDKConnector::newConnection()
{
m_clients.append(make_shared<SDKConnection>(m_server->nextPendingConnection()));
}
/*!
Closes all m_clients connections and clears the QVector.
*/
void SDKConnector::closeAllConnections()
{
for (auto& client : m_clients) {
@ -36,6 +49,15 @@ void SDKConnector::closeAllConnections()
m_clients.clear();
}
/*!
Closes all wallpaper connection with the following type:
\list
\li videoWallpaper
\li qmlWallpaper
\li htmlWallpaper
\li godotWallpaper
\endlist
*/
void SDKConnector::closeAllWallpapers()
{
QStringList types {
@ -44,13 +66,19 @@ void SDKConnector::closeAllWallpapers()
"htmlWallpaper",
"godotWallpaper"
};
for (auto& client : m_clients) {
if (types.contains(client->type())) {
client->close();
m_clients.removeOne(client);
}
}
}
/*!
Closes a wallpaper at the given \a index. The native monitor index is used here.
On Windows the monitor 0 is the main display.
*/
void SDKConnector::closeWallpapersAt(int at)
{
for (const shared_ptr<SDKConnection>& refSDKConnection : m_clients) {
@ -68,16 +96,23 @@ void SDKConnector::closeWallpapersAt(int at)
}
}
/*!
Closes a wallpaper by the given \a appID.
*/
void SDKConnector::closeWallpaper(const QString& appID)
{
for (auto& item : m_clients) {
if (item->appID() == appID) {
item->close();
m_clients.removeOne(item);
return;
}
}
}
/*!
Sets a given \a value to a given \a key. The \a appID is used to identify the receiver socket.
*/
void SDKConnector::setWallpaperValue(QString appID, QString key, QString value)
{
@ -93,6 +128,9 @@ void SDKConnector::setWallpaperValue(QString appID, QString key, QString value)
}
}
/*!
Sets a given \a value to a given \a key. The \a appID is used to identify the receiver socket.
*/
void SDKConnector::setSceneValue(QString appID, QString key, QString value)
{
for (int i = 0; i < m_clients.count(); ++i) {
@ -108,8 +146,4 @@ void SDKConnector::setSceneValue(QString appID, QString key, QString value)
}
}
QLocalSocket* SDKConnection::socket() const
{
return m_socket;
}
}

View File

@ -53,6 +53,9 @@ class SDKConnection : public QObject {
Q_PROPERTY(QVector<int> monitor READ monitor WRITE setMonitor NOTIFY monitorChanged)
public:
/*!
SDKConnection.
*/
explicit SDKConnection(QLocalSocket* socket, QObject* parent = nullptr)
: QObject(parent)
{
@ -76,7 +79,10 @@ public:
return m_appID;
}
QLocalSocket* socket() const;
QLocalSocket* socket() const
{
return m_socket;
}
QVector<int> monitor() const
{
@ -108,7 +114,6 @@ public slots:
QString appID = args.at(0);
m_appID = appID.remove("appID=");
QStringList types {
"videoWallpaper",
"qmlWallpaper",
@ -116,12 +121,12 @@ public slots:
"godotWallpaper"
};
for (QString type : types) {
if(msg.contains(type)){
if (msg.contains(type)) {
m_type = type;
}
}
qInfo() << "###### Wallpaper created:"
<< "\t AppID:" << m_appID << "\t type: " << m_type;
<< "\t AppID:" << m_appID << "\t type: " << m_type;
} else {
qInfo() << "### Message from: " << m_appID << ": " << msg;

View File

@ -6,14 +6,37 @@ namespace ScreenPlay {
/*!
\class ScreenPlay::Settings
\inmodule ScreenPlay
\brief Used for:
\list
\i User configuration
\i Communication via the SDK Connector
\endlist
\brief Global settings class for reading and writing settings.
Used for:
\list
\li User configuration via AppData\Local\ScreenPlay\ScreenPlay
\list
\li profiles.json - saved wallpaper and widgets config
\li settings.json - saved settings like autostart and installedContentPath
\li Computer\\HKEY_CURRENT_USER\\Software\\ScreenPlay\\ScreenPlay - ScreenPlayContentPath for steam plugin
\endlist
\li Communication via the SDK Connector
\endlist
Currently we save the regular settings (not the setup of the wallpaper and widgets) in two different locations.
This can change in the future!
*/
/*!
Constructor and sets up:
\list 1
\li Sets the git build hash via ScreenPlay.pro c++ define
\li Checks the langauge via settings or system and available ones and installes a translator.
\li Checks the paths for config folders in appdata
\li Checks if settings.json and profiles.json are available. If first run it creates the default settings and profiles json.
\li Parses the version and checks with the compiled one.
\li Checks the absoluteStoragePath.
\li Checks regisitry for steam plugin settings
\li Parses autostart, anonymousTelemetry, highPriorityStart
\li Checks ScreenPlayWallpaper and ScreenPlayWidgets executable paths.
\endlist
More errorchecking is needed here. For example when the proile or settings json cannot to parsed, use the default settings.
*/
Settings::Settings(const shared_ptr<GlobalVariables>& globalVariables,
QObject* parent)
: QObject(parent)
@ -145,6 +168,9 @@ Settings::Settings(const shared_ptr<GlobalVariables>& globalVariables,
setupWidgetAndWindowPaths();
}
/*!
Save a single \a value with a given \a name (key) into the settings.json. Returns \c true when successful otherise returns \c false.
*/
bool Settings::writeSingleSettingConfig(QString name, QVariant value)
{
QString filename = m_globalVariables->localSettingsPath().toLocalFile() + "/settings.json";
@ -161,6 +187,13 @@ bool Settings::writeSingleSettingConfig(QString name, QVariant value)
return Util::writeJsonObjectToFile(filename, newConfig);
}
/*!
Writes the default JsonFile from the resources and the given \a filename. Currently we have two default json files:
\list
\li profiles.json
\li settings.json
\endlist
*/
void Settings::writeJsonFileFromResource(const QString& filename)
{
QFile file(m_globalVariables->localSettingsPath().toLocalFile() + "/" + filename + ".json");
@ -178,6 +211,11 @@ void Settings::writeJsonFileFromResource(const QString& filename)
defaultSettings.close();
}
/*!
To have a better developer experience we check if we use a debug version. Then we assume
That the paths are the default QtCreator paths and set the widgets and wallpaper executable
paths accordingly.
*/
void Settings::setupWidgetAndWindowPaths()
{
QDir workingDir(QDir::currentPath());
@ -231,6 +269,11 @@ void Settings::setupWidgetAndWindowPaths()
#endif
}
/*!
When no default language is set in the registry we check the system set language. If there is no
matching translation is available we set it to english. This function gets called from the UI when
the user manually changes the language.
*/
void Settings::setupLanguage()
{
auto* app = static_cast<QGuiApplication*>(QGuiApplication::instance());

View File

@ -126,6 +126,9 @@ signals:
public slots:
bool writeSingleSettingConfig(QString name, QVariant value);
void writeJsonFileFromResource(const QString& filename);
void setupWidgetAndWindowPaths();
void setupLanguage();
void setqSetting(const QString& key, const QString& value)
{
m_qSettings.setValue(key, value);
@ -223,7 +226,6 @@ public slots:
m_silentStart = silentStart;
emit silentStartChanged(m_silentStart);
}
void setupLanguage();
void setAnonymousTelemetry(bool anonymousTelemetry)
{
@ -234,10 +236,6 @@ public slots:
emit anonymousTelemetryChanged(m_anonymousTelemetry);
}
private:
void writeJsonFileFromResource(const QString& filename);
void setupWidgetAndWindowPaths();
private:
QVersionNumber m_version;
QSettings m_qSettings;

View File

@ -5,11 +5,7 @@ namespace ScreenPlay {
/*!
\class ScreenPlay::Util
\inmodule ScreenPlay
\brief Easy to use global object to use to:
\list
\i Navigate the main menu
\i Open Explorer at a given path
\endlist
\brief Easy to use global object to use when certain functionality is not available in QML.
*/
Util::Util(QNetworkAccessManager* networkAccessManager, QObject* parent)
@ -45,12 +41,19 @@ Util::Util(QNetworkAccessManager* networkAccessManager, QObject* parent)
setFfmpegAvailable(true);
}
void Util::copyToClipboard(const QString &text) const
/*!
Copies the given string to the clipboard.
*/
void Util::copyToClipboard(const QString& text) const
{
auto* clipboard = QGuiApplication::clipboard();
clipboard->setText(text);
}
/*!
Opens a json file (absolute path) and tries to convert it to a QJsonObject.
Return std::nullopt when not successful.
*/
std::optional<QJsonObject> Util::openJsonFileToObject(const QString& path)
{
auto jsonString = openJsonFileToString(path);
@ -71,6 +74,10 @@ std::optional<QJsonObject> Util::openJsonFileToObject(const QString& path)
return jsonDocument.object();
}
/*!
Opens a json file (absolute path) and tries to convert it to a QString.
Return std::nullopt when not successful.
*/
std::optional<QString> Util::openJsonFileToString(const QString& path)
{
QFile file;
@ -85,6 +92,14 @@ std::optional<QString> Util::openJsonFileToString(const QString& path)
return { fileContent };
}
/*!
Generates a (non secure) random string with the default length of 32. Can contain:
\list
\li A-Z
\li a-z
\li 0-9
\endlist
*/
QString Util::generateRandomString(quint32 length)
{
const QString possibleCharacters {
@ -101,6 +116,11 @@ QString Util::generateRandomString(quint32 length)
return randomString;
}
/*!
Parses a version from a given QString. The QString must be looke like this:
1.0.0 - Major.Minor.Patch. A fixed position is used for parsing (at 0,2,4).
Return std::nullopt when not successful.
*/
std::optional<QVersionNumber> Util::getVersionNumberFromString(const QString& str)
{
// Must be: Major.Minor.Patch
@ -119,6 +139,10 @@ std::optional<QVersionNumber> Util::getVersionNumberFromString(const QString& st
return QVersionNumber(major, minor, patch);
}
/*!
Writes a given QJsonObject to a file. The path must be absolute. When truncate is set to
true the exsisting json file will be overriten.
*/
bool Util::writeJsonObjectToFile(const QString& absoluteFilePath, const QJsonObject& object, bool truncate)
{
QFile configTmp;
@ -141,11 +165,16 @@ bool Util::writeJsonObjectToFile(const QString& absoluteFilePath, const QJsonObj
return true;
}
QString Util::fixWindowsPath(QString url)
{
return url.replace("/", "\\\\");
}
/*!
Opens a native folder window on the given path. Windows and Mac only for now!
*/
void Util::openFolderInExplorer(const QString& url) const
{
QString fileString { "file:///" };
@ -170,6 +199,10 @@ void Util::openFolderInExplorer(const QString& url) const
explorer.startDetached();
}
/*!
Loads all content of the legal folder in the qrc into a property string of this class.
allLicenseLoaded is emited when loading is finished.
*/
void Util::Util::requestAllLicenses()
{
@ -212,6 +245,10 @@ void Util::Util::requestAllLicenses()
});
}
/*!
Loads all dataprotection of the legal folder in the qrc into a property string of this class.
allDataProtectionLoaded is emited when loading is finished.
*/
void Util::Util::requestAllLDataProtection()
{
QtConcurrent::run([this]() {
@ -228,6 +265,11 @@ void Util::Util::requestAllLDataProtection()
});
}
/*!
Downloads and extracts ffmpeg static version from https://ffmpeg.zeranoe.com
The progress is tracked via setAquireFFMPEGStatus(AquireFFMPEGStatus);
*/
void Util::downloadFFMPEG()
{
QNetworkRequest req;
@ -308,6 +350,10 @@ void Util::downloadFFMPEG()
});
}
/*!
Basic logging to the GUI. No logging is done to a log file for now. This string can be copied
in the settings tab in the UI.
*/
void Util::logToGui(QtMsgType type, const QMessageLogContext& context, const QString& msg)
{
qDebug() << msg;
@ -340,6 +386,10 @@ void Util::logToGui(QtMsgType type, const QMessageLogContext& context, const QSt
utilPointer->appendDebugMessages(log);
}
/*!
Convenient function for the ffmpeg download extraction via libzippp. Extracts a given bytearray
to a given absolute file path and file name. Returns false if extraction or saving wasn't successful.
*/
bool Util::saveExtractedByteArray(libzippp::ZipEntry& entry, std::string& absolutePathAndName)
{
std::ofstream ofUnzippedFile(absolutePathAndName, std::ofstream::binary);