Migration of QtMvvm from github
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

219 lines
14 KiB

<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>QtMvvm: QtMvvm::ISettingsSetupLoader Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="display: inline;">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">QtMvvm
&#160;<span id="projectnumber">1.0.0</span>
</div>
<div id="projectbrief">A mvvm oriented library for Qt, to create Projects for Widgets and Quick in parallel</div>
</td>
</tr>
</tbody>
</table>
<a style="float: right;" target="_blank" href="https://github.com/Skycoder42/QtMvvm">
<img style="padding: 10px;" src="GitHub_Logo.png"/>
</a>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespace_qt_mvvm.html">QtMvvm</a></li><li class="navelem"><a class="el" href="class_qt_mvvm_1_1_i_settings_setup_loader.html">ISettingsSetupLoader</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_qt_mvvm_1_1_i_settings_setup_loader-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">QtMvvm::ISettingsSetupLoader Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>An interface for a generic settings setup loader.
<a href="class_qt_mvvm_1_1_i_settings_setup_loader.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="settingssetup_8h_source.html">settingssetup.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a44a7e98e3b55215f03d47cb44949ccef"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qt_mvvm_1_1_i_settings_setup_loader.html#a44a7e98e3b55215f03d47cb44949ccef">changeDefaultIcon</a> (const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.10.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qurl.html">QUrl</a> &amp;defaultIcon)=0</td></tr>
<tr class="memdesc:a44a7e98e3b55215f03d47cb44949ccef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Can be used to overwrite the default icon for categories. <a href="#a44a7e98e3b55215f03d47cb44949ccef">More...</a><br /></td></tr>
<tr class="separator:a44a7e98e3b55215f03d47cb44949ccef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75b197a1c259e4a7a23498f594a9ec0c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespace_qt_mvvm_1_1_settings_elements.html#struct_qt_mvvm_1_1_settings_elements_1_1_setup">SettingsElements::Setup</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qt_mvvm_1_1_i_settings_setup_loader.html#a75b197a1c259e4a7a23498f594a9ec0c">loadSetup</a> (const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.10.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qstring.html">QString</a> &amp;filePath, const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.10.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qstring.html">QString</a> &amp;frontend, const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.10.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qfileselector.html">QFileSelector</a> *selector) const =0</td></tr>
<tr class="memdesc:a75b197a1c259e4a7a23498f594a9ec0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the settings setup from the given file. <a href="#a75b197a1c259e4a7a23498f594a9ec0c">More...</a><br /></td></tr>
<tr class="separator:a75b197a1c259e4a7a23498f594a9ec0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An interface for a generic settings setup loader. </p>
<p>It is used by the <a class="el" href="class_qt_mvvm_1_1_settings_view_model.html" title="A ViewModel for a generic settings dialog based of an XML settings file. ">SettingsViewModel</a> to load a <a class="el" href="namespace_qt_mvvm_1_1_settings_elements.html#struct_qt_mvvm_1_1_settings_elements_1_1_setup" title="The whole settings setup. ">SettingsElements::Setup</a> from a generic file. The default implementation that is used by default implements a loader for an XML format. You can implement your own format, but unless you need to open things other then normal files/resources (or hate XML), there is no advantage of doing so.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="settingssetup_8h.html#af1563f0d6fb636b0217430681053ec1c" title="The Iid of the QtMvvm::ISettingsSetupLoader class. ">QtMvvm_ISettingsSetupLoaderIid</a>, <a class="el" href="class_qt_mvvm_1_1_settings_view_model.html" title="A ViewModel for a generic settings dialog based of an XML settings file. ">SettingsViewModel</a>, <a class="el" href="class_qt_mvvm_1_1_settings_loader_exception.html" title="An exception throw in case loading a settings setup went wrong. ">SettingsLoaderException</a>, <a class="el" href="namespace_qt_mvvm_1_1_settings_elements.html#struct_qt_mvvm_1_1_settings_elements_1_1_setup" title="The whole settings setup. ">SettingsElements::Setup</a>, <a class="el" href="settings_xml.html">The XML settings format</a> </dd></dl>
<p class="definition">Definition at line <a class="el" href="settingssetup_8h_source.html#l00115">115</a> of file <a class="el" href="settingssetup_8h_source.html">settingssetup.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a44a7e98e3b55215f03d47cb44949ccef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44a7e98e3b55215f03d47cb44949ccef">&#9670;&nbsp;</a></span>changeDefaultIcon()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">QtMvvm::ISettingsSetupLoader::changeDefaultIcon </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.10.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qurl.html">QUrl</a> &amp;&#160;</td>
<td class="paramname"><em>defaultIcon</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Can be used to overwrite the default icon for categories. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">defaultIcon</td><td>The URL to the icon to use as overwrite</td></tr>
</table>
</dd>
</dl>
<p>The default icon used by the XML loader is <code>qrc:/de/skycoder42/qtmvvm/icons/settings.svg</code>. If you want to overwrite that path (for example because you want to use a png instead of a svg icon) you can do so via this function</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qt_mvvm_1_1_settings_dialog.html#adb8b5cbc4e49f7b734e167cb5e642672" title="Return a url to overwrite the default settings icon. ">SettingsDialog::iconOverwrite</a> </dd></dl>
</div>
</div>
<a id="a75b197a1c259e4a7a23498f594a9ec0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75b197a1c259e4a7a23498f594a9ec0c">&#9670;&nbsp;</a></span>loadSetup()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">QtMvvm::ISettingsSetupLoader::loadSetup </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.10.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qstring.html">QString</a> &amp;&#160;</td>
<td class="paramname"><em>filePath</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.10.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qstring.html">QString</a> &amp;&#160;</td>
<td class="paramname"><em>frontend</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.10.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qfileselector.html">QFileSelector</a> *&#160;</td>
<td class="paramname"><em>selector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Loads the settings setup from the given file. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filePath</td><td>The path to the file to be loaded </td></tr>
<tr><td class="paramname">frontend</td><td>The name of the GUI frontend beeing used </td></tr>
<tr><td class="paramname">selector</td><td>The currently active file selectors </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The loaded and filtered settings setup </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="class_qt_mvvm_1_1_settings_loader_exception.html" title="An exception throw in case loading a settings setup went wrong. ">SettingsLoaderException</a></td><td>In case the loaded file is invalid</td></tr>
</table>
</dd>
</dl>
<p>The frontend is used to filter elements by their <code>frontends</code> variable. It is always the name of the view type that is loading the settings via the viewmodel. Current values are:</p>
<ul>
<li><code>widgets</code> for the Widgets GUI</li>
<li><code>quick</code> for the Quick Controls 2 GUI</li>
</ul>
<p>The selector should be used to a.) select the files to open (event the one passed). Use the select method to apply the paths. This applies for the elements as well, via the <code>selectors</code> variable.</p>
<dl class="section note"><dt>Note</dt><dd>The syntax etc of these two variables depends on your loader and they are only used by you, not by anyone using this method. The default syntax used by the XML load implementation can be found in the <a class="el" href="settings_xml.html">XML documentation</a></dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="namespace_qt_mvvm_1_1_settings_elements.html#struct_qt_mvvm_1_1_settings_elements_1_1_setup" title="The whole settings setup. ">SettingsElements::Setup</a>, <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.10.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qfileselector.html">QFileSelector</a>, <a class="el" href="settings_xml.html">The XML settings format</a> </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="settingssetup_8h_source.html">settingssetup.h</a></li>
<li>settingssetup.dox</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Mar 14 2018 16:19:59 for QtMvvm by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>