mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-22 18:52:30 +01:00
e8fbe8e565
Update to qdoc Qt 6.1 Add module for every project
145 lines
16 KiB
HTML
145 lines
16 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<!-- settings.cpp -->
|
|
<title>Settings Class | ScreenPlay</title>
|
|
<link rel="stylesheet" type="text/css" href="../css/style.css"/> <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
|
|
</head>
|
|
<body>
|
|
<div class="container-fullwidth nav sticky-top"><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>Settings</li>
|
|
<div class="sidebar">
|
|
<div class="toc">
|
|
<h3><a name="toc">Contents</a></h3>
|
|
<ul>
|
|
<li class="level1"><a href="#public-functions">Public Functions</a></li>
|
|
<li class="level1"><a href="#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>
|
|
</div>
|
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
|
<h1 class="title">Settings Class</h1>
|
|
<span class="small-subtitle">class <a href="screenplay-module.html">ScreenPlay</a>::Settings</span>
|
|
<!-- $$$Settings-brief -->
|
|
<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 <Settings></span>
|
|
</td></tr></table></div><ul>
|
|
<li><a href="screenplay-settings-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-settings.html#Settings">Settings</a></b>(const std::shared_ptr<GlobalVariables> &<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"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#checkWallpaperVisible-prop">checkWallpaperVisible</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>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> ScreenPlay::Settings::DesktopEnvironment </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#desktopEnvironment-prop">desktopEnvironment</a></b>() const</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#font-prop">font</a></b>() const</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#gitBuildHash-prop">gitBuildHash</a></b>() const</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#highPriorityStart-prop">highPriorityStart</a></b>() const</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> ScreenPlay::Settings::Language </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#language-prop">language</a></b>() const</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#offlineMode-prop">offlineMode</a></b>() const</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"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#silentStart-prop">silentStart</a></b>() const</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#steamVersion-prop">steamVersion</a></b>() const</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> ScreenPlay::Settings::Theme </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#theme-prop">theme</a></b>() const</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#videoFillMode-prop">videoFillMode</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-settings.html#retranslateUI">retranslateUI</a></b>()</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#anonymousTelemetry-prop">setAnonymousTelemetry</a></b>(bool <i>anonymousTelemetry</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#autostart-prop">setAutostart</a></b>(bool <i>autostart</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#checkWallpaperVisible-prop">setCheckWallpaperVisible</a></b>(bool <i>checkWallpaperVisible</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#decoder-prop">setDecoder</a></b>(QString <i>decoder</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#desktopEnvironment-prop">setDesktopEnvironment</a></b>(ScreenPlay::Settings::DesktopEnvironment <i>desktopEnvironment</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#font-prop">setFont</a></b>(QString <i>font</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#gitBuildHash-prop">setGitBuildHash</a></b>(QString <i>gitBuildHash</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#highPriorityStart-prop">setHighPriorityStart</a></b>(bool <i>highPriorityStart</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#language-prop">setLanguage</a></b>(ScreenPlay::Settings::Language <i>language</i>)</td></tr>
|
|
<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#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#steamVersion-prop">setSteamVersion</a></b>(bool <i>steamVersion</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#theme-prop">setTheme</a></b>(ScreenPlay::Settings::Theme <i>theme</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#videoFillMode-prop">setVideoFillMode</a></b>(int <i>videoFillMode</i>)</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 &<i>filename</i>)</td></tr>
|
|
</table></div>
|
|
<a name="signals"></a>
|
|
<h2 id="signals">Signals</h2>
|
|
<div class="table"><table class="alignedsummary">
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#anonymousTelemetry-prop">anonymousTelemetryChanged</a></b>(bool <i>anonymousTelemetry</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#autostart-prop">autostartChanged</a></b>(bool <i>autostart</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#checkWallpaperVisible-prop">checkWallpaperVisibleChanged</a></b>(bool <i>checkWallpaperVisible</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#decoder-prop">decoderChanged</a></b>(QString <i>decoder</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#desktopEnvironment-prop">desktopEnvironmentChanged</a></b>(ScreenPlay::Settings::DesktopEnvironment <i>desktopEnvironment</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#font-prop">fontChanged</a></b>(QString <i>font</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#gitBuildHash-prop">gitBuildHashChanged</a></b>(QString <i>gitBuildHash</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#highPriorityStart-prop">highPriorityStartChanged</a></b>(bool <i>highPriorityStart</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#language-prop">languageChanged</a></b>(ScreenPlay::Settings::Language <i>language</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#offlineMode-prop">offlineModeChanged</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#silentStart-prop">silentStartChanged</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#steamVersion-prop">steamVersionChanged</a></b>(bool <i>steamVersion</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#theme-prop">themeChanged</a></b>(ScreenPlay::Settings::Theme <i>theme</i>)</td></tr>
|
|
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="screenplay-settings.html#videoFillMode-prop">videoFillModeChanged</a></b>(int <i>videoFillMode</i>)</td></tr>
|
|
</table></div>
|
|
<a name="details"></a>
|
|
<!-- $$$Settings-description -->
|
|
<div class="descr">
|
|
<h2 id="details">Detailed Description</h2>
|
|
<p>Used for:</p>
|
|
<ul>
|
|
<li>User configuration via AppData<b class="redFont"><code>\Local</code></b>ScreenPlayScreenPlay<ul>
|
|
<li>profiles.json - saved wallpaper and widgets config</li>
|
|
<li>Computer\HKEY_CURRENT_USER\Software\<a href="screenplay-module.html">ScreenPlay</a>\<a href="screenplay-module.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 class="func">
|
|
<h2>Member Function Documentation</h2>
|
|
<!-- $$$Settings[overload1]$$$Settingsconststd::shared_ptr<GlobalVariables>&QObject* -->
|
|
<h3 class="fn" id="Settings"><a name="Settings"></a>Settings::<span class="name">Settings</span>(const <span class="type">std::shared_ptr</span><<span class="type"><a href="screenplay-globalvariables.html">GlobalVariables</a></span>> &<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-module.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 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 -->
|
|
<!-- $$$retranslateUI[overload1]$$$retranslateUI -->
|
|
<h3 class="fn" id="retranslateUI"><a name="retranslateUI"></a><code>[slot] </code><span class="type">bool</span> Settings::<span class="name">retranslateUI</span>()</h3>
|
|
<p>Check for supported langauges. If we use a langauge that not uses latin characters, we change the font. For example this happens for korean user. We ship google Noto Sans CJK KR Regular for this..</p>
|
|
<!-- @@@retranslateUI -->
|
|
<!-- $$$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> &<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 -->
|
|
<!-- $$$setupLanguage[overload1]$$$setupLanguage -->
|
|
<h3 class="fn" id="setupLanguage"><a name="setupLanguage"></a><span class="type">void</span> Settings::<span class="name">setupLanguage</span>()</h3>
|
|
<p>Checks if there is already a saved language. If not we try to use the system langauge. If we do not support the system language we use english.</p>
|
|
<!-- @@@setupLanguage -->
|
|
</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/bootstrap.bundle.min.js"></script> <script src="../js/mermaid.min.js"></script> <script>var config = {startOnLoad:true,flowchart:{useMaxWidth:true,htmlLabels:true}};mermaid.initialize(config);</script></body>
|
|
</html>
|