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.
 
 
 
 
 

98 lines
20 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: QtMvvmApp.qml Source File</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.1.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="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_a8bd8bcf293c2ab1210f2c2ecd8006f3.html">imports</a></li><li class="navelem"><a class="el" href="dir_37f1474803778587967f116c1887a4b4.html">mvvmquick</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">QtMvvmApp.qml</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="keyword">import</span> <a class="code" href="namespace_qt_quick.html">QtQuick</a> 2.10</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;import <a class="code" href="namespace_qt_quick.html">QtQuick</a>.Controls 2.3</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;import <a class="codeRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.11.1/qtrestclient/qtrestclient.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/namespacede_1_1skycoder42_1_1_qt_rest_client.html">de</a>.<a class="codeRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.11.1/qtrestclient/qtrestclient.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/namespacede_1_1skycoder42_1_1_qt_rest_client.html">skycoder42</a>.<a class="code" href="namespacede_1_1skycoder42_1_1_qt_mvvm.html">QtMvvm</a>.<a class="code" href="namespacede_1_1skycoder42_1_1_qt_mvvm_1_1_quick.html">Quick</a> 1.1</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;ApplicationWindow {</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_qt_mvvm_app.html"> 17</a></span>&#160; id: _root</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; visible: <span class="keyword">true</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; width: 360</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; height: 520</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; readonly <span class="keyword">property</span> alias drawer: _drawerLoader.item</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keyword">property</span> <span class="keywordtype">bool</span> rootOnlyDrawer: <span class="keyword">true</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <a class="code" href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_presenter_progress.html">PresenterProgress</a> {</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; id: _rootProgress</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; z: _rootStack.empty ? 10 : -10</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; }</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <a class="code" href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_presenting_stack_view.html">PresentingStackView</a> {</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; id: _rootStack</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; anchors.fill: parent</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; }</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; Loader {</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; id: _drawerLoader</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; active: <span class="keyword">false</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; asynchronous: <span class="keyword">false</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; sourceComponent: <a class="code" href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_presenting_drawer.html">PresentingDrawer</a> {</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; id: _rootDrawer</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; interactive: !_root.rootOnlyDrawer || _rootStack.depth == 1</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; }</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; }</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <a class="code" href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_popup_presenter.html">PopupPresenter</a> {</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; id: _rootPopup</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; rootItem: _root.contentItem</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; }</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <a class="code" href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_dialog_presenter.html">DialogPresenter</a> {</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; id: _rootDialogs</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; rootItem: _root.contentItem</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; }</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="keyword">function</span> presentDrawerContent(item) {</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keywordflow">if</span>(!_drawerLoader.item)</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; _drawerLoader.active = <span class="keyword">true</span>;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="keywordflow">return</span> _drawerLoader.item.presentDrawerContent(item);</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; }</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="keyword">function</span> presentItem(item) {</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordflow">return</span> _rootStack.presentItem(item);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; }</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="keyword">function</span> presentPopup(popup) {</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordflow">return</span> _rootPopup.presentPopup(popup);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; }</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="keyword">function</span> showDialog(config, result) {</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keywordflow">return</span> _rootDialogs.<a class="code" href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_dialog_presenter.html#a43fbeca076a52a0eacf34a9da706eb19">showDialog</a>(config, result);</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; }</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keyword">function</span> toggleDrawer() {</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordflow">if</span>(_drawerLoader.item)</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; _drawerLoader.item.toggle();</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; console.warn(<span class="stringliteral">&quot;No drawer like view active. Cannot toggle drawer&quot;</span>);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; }</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="keyword">function</span> closeAction() {</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; var closed = <span class="keyword">false</span>;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keywordflow">if</span>(!closed)</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; closed = _rootDialogs.closeAction();</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="keywordflow">if</span>(!closed)</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; closed = _rootPopup.closeAction();</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="keywordflow">if</span>(!closed &amp;&amp; _drawerLoader.item)</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; closed = _drawerLoader.item.closeAction();</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="keywordflow">if</span>(!closed)</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; closed = _rootStack.closeAction();</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="comment">//if everything was closed -&gt; still accept it</span></div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="keywordflow">if</span>(closed &amp;&amp; _rootDialogs.emtpy &amp;&amp; _rootPopup.empty &amp;&amp; _rootStack.empty)</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; closed = <span class="keyword">false</span>;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="keywordflow">return</span> closed;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; }</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; Component.onCompleted: <a class="code" href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_quick_presenter.html">QuickPresenter</a>.<a class="code" href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_quick_presenter.html#a40272bbdd220ace763f8670d5228f058">qmlPresenter</a> = _root</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; onClosing: close.accepted = !closeAction();</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;}</div><div class="ttc" id="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_presenting_drawer_html"><div class="ttname"><a href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_presenting_drawer.html">de::skycoder42::QtMvvm::Quick::PresentingDrawer</a></div><div class="ttdoc">A Drawer that can be used as a presenter for drawer views. </div><div class="ttdef"><b>Definition:</b> <a href="_presenting_drawer_8qml_source.html#l00043">PresentingDrawer.qml:43</a></div></div>
<div class="ttc" id="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_presenter_progress_html"><div class="ttname"><a href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_presenter_progress.html">de::skycoder42::QtMvvm::Quick::PresenterProgress</a></div><div class="ttdoc">A ProgressBar with automatic bindings to the presenters view loading progress. </div><div class="ttdef"><b>Definition:</b> <a href="_presenter_progress_8qml_source.html#l00019">PresenterProgress.qml:19</a></div></div>
<div class="ttc" id="namespacede_1_1skycoder42_1_1_qt_rest_client_html"><div class="ttname"><a href="https://doc.qt.io/qt-5/namespacede_1_1skycoder42_1_1_qt_rest_client.html">de</a></div></div>
<div class="ttc" id="namespace_qt_quick_html"><div class="ttname"><a href="namespace_qt_quick.html">QtQuick</a></div></div>
<div class="ttc" id="namespacede_1_1skycoder42_1_1_qt_mvvm_html"><div class="ttname"><a href="namespacede_1_1skycoder42_1_1_qt_mvvm.html">de::skycoder42::QtMvvm</a></div></div>
<div class="ttc" id="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_quick_presenter_html_a40272bbdd220ace763f8670d5228f058"><div class="ttname"><a href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_quick_presenter.html#a40272bbdd220ace763f8670d5228f058">de::skycoder42::QtMvvm::Quick::QuickPresenter::qmlPresenter</a></div><div class="ttdeci">QObject qmlPresenter</div><div class="ttdoc">The primary presenter QML object. </div><div class="ttdef"><b>Definition:</b> <a href="qqmlquickpresenter_8h_source.html#l00083">qqmlquickpresenter.h:83</a></div></div>
<div class="ttc" id="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_presenting_stack_view_html"><div class="ttname"><a href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_presenting_stack_view.html">de::skycoder42::QtMvvm::Quick::PresentingStackView</a></div><div class="ttdoc">A presentation helper that can present standard mvvm views. </div><div class="ttdef"><b>Definition:</b> <a href="_presenting_stack_view_8qml_source.html#l00039">PresentingStackView.qml:39</a></div></div>
<div class="ttc" id="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_dialog_presenter_html"><div class="ttname"><a href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_dialog_presenter.html">de::skycoder42::QtMvvm::Quick::DialogPresenter</a></div><div class="ttdoc">A presentation helper that can present generic mvvm dialogs. </div><div class="ttdef"><b>Definition:</b> <a href="_dialog_presenter_8qml_source.html#l00041">DialogPresenter.qml:41</a></div></div>
<div class="ttc" id="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_dialog_presenter_html_a43fbeca076a52a0eacf34a9da706eb19"><div class="ttname"><a href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_dialog_presenter.html#a43fbeca076a52a0eacf34a9da706eb19">de::skycoder42::QtMvvm::Quick::DialogPresenter::showDialog</a></div><div class="ttdeci">bool showDialog(MessageConfig config, MessageResult result)</div><div class="ttdoc">The primary presenting method to present a dialog. </div></div>
<div class="ttc" id="namespacede_1_1skycoder42_1_1_qt_mvvm_1_1_quick_html"><div class="ttname"><a href="namespacede_1_1skycoder42_1_1_qt_mvvm_1_1_quick.html">de::skycoder42::QtMvvm::Quick</a></div><div class="ttdoc">The QML import for the QtMvvmQuick QML module. </div><div class="ttdef"><b>Definition:</b> <a href="_action_button_8qml_source.html#l00004">ActionButton.qml:4</a></div></div>
<div class="ttc" id="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_popup_presenter_html"><div class="ttname"><a href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_popup_presenter.html">de::skycoder42::QtMvvm::Quick::PopupPresenter</a></div><div class="ttdoc">A presentation helper that can present mvvm views that extend the Popup type. </div><div class="ttdef"><b>Definition:</b> <a href="_popup_presenter_8qml_source.html#l00040">PopupPresenter.qml:40</a></div></div>
<div class="ttc" id="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_quick_presenter_html"><div class="ttname"><a href="classde_1_1skycoder42_1_1_qt_mvvm_1_1_quick_1_1_quick_presenter.html">de::skycoder42::QtMvvm::Quick::QuickPresenter</a></div><div class="ttdoc">A QML singleton to access common presenter methods globally. </div><div class="ttdef"><b>Definition:</b> <a href="qqmlquickpresenter_8h_source.html#l00036">qqmlquickpresenter.h:36</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Aug 8 2018 19:15:45 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>