94 lines
22 KiB
HTML
94 lines
22 KiB
HTML
<!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.13"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Boxing Timer: src/boxingsettings.h 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">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Boxing Timer
|
|
 <span id="projectnumber">1.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.13 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
</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> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">boxingsettings.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="boxingsettings_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef BOXINGSETTINGS_H</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define BOXINGSETTINGS_H</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> </div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include <QString></span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include <QStringList></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include <QSettings></span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#ifdef QT_DEBUG</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor"> #include <QDebug></span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> </div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="class_boxing_settings.html"> 19</a></span> <span class="keyword">class </span><a class="code" href="class_boxing_settings.html">BoxingSettings</a> : <span class="keyword">public</span> QSettings {</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  Q_OBJECT</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  Q_PROPERTY(QString preset READ <a class="code" href="class_boxing_settings.html#a2d03c793ed7ad6e97894e21b1f85105b">getPreset</a> WRITE <a class="code" href="class_boxing_settings.html#a71e6d017856266fa95b07ed0030ed05b">setPreset</a> NOTIFY <a class="code" href="class_boxing_settings.html#a811dbd6c80f86ad219bbb9166571a2e9">presetChanged</a>)</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  Q_PROPERTY(QString presetName READ <a class="code" href="class_boxing_settings.html#ac0641004a9f244dcce8056c722685065">getPresetName</a> NOTIFY presetChanged)</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  Q_PROPERTY(<span class="keywordtype">int</span> rounds READ <a class="code" href="class_boxing_settings.html#ae57079ed791d793bfb310712063b1dab">getRounds</a> WRITE <a class="code" href="class_boxing_settings.html#a5fee80840f4bfe8cb0fa95dea161e586">setRounds</a> NOTIFY presetChanged)</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  Q_PROPERTY(<span class="keywordtype">int</span> roundsMs READ <a class="code" href="class_boxing_settings.html#a2b9ff4ab1dbd14f5e8f37b88677e73f4">getRoundMilliseconds</a> WRITE <a class="code" href="class_boxing_settings.html#aaa691ab3a2fa5d1812975207b7e9f9ed">setRoundMilliseconds</a> NOTIFY presetChanged)</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  Q_PROPERTY(<span class="keywordtype">int</span> restMs READ <a class="code" href="class_boxing_settings.html#a84fd6052ef19488b015638c68fa2be72">getRestMilliseconds</a> WRITE <a class="code" href="class_boxing_settings.html#ad7c283d2b4ebe1333c1680a0fd19cb0c">setRestMilliseconds</a> NOTIFY presetChanged)</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> DefaultRounds = 12;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> DefaultRoundMilliseconds = 3 * 60 * 1000;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> DefaultRestMilliseconds = 60 * 1000;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keyword">const</span> QString DefaultPreset = <span class="stringliteral">""</span>;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keyword">const</span> QString DefaultPresetName = <span class="stringliteral">"Default"</span>;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  Q_INVOKABLE <span class="keyword">const</span> QStringList <a class="code" href="class_boxing_settings.html#a507b3038f2851cff0d17fffc027019de">presetsList</a>();</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  Q_INVOKABLE <span class="keywordtype">void</span> <a class="code" href="class_boxing_settings.html#a24906b544896052c08f0b93ded92823b">savePreset</a>(<span class="keyword">const</span> QString &name, <span class="keyword">const</span> <span class="keywordtype">int</span> &rounds, <span class="keyword">const</span> <span class="keywordtype">int</span> &roundMilliseconds, <span class="keyword">const</span> <span class="keywordtype">int</span> &restMilliseconds);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  Q_INVOKABLE <span class="keywordtype">void</span> <a class="code" href="class_boxing_settings.html#a6475be7b9b7eacc3b4a9ca853311b5a9">deletePreset</a>(<span class="keyword">const</span> QString &name);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <a class="code" href="class_boxing_settings.html#a62af206ef42670b751e0cec59c206896">BoxingSettings</a>();</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="class_boxing_settings.html#a62af206ef42670b751e0cec59c206896">BoxingSettings</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> &rounds, <span class="keyword">const</span> <span class="keywordtype">int</span> &roundMilliseconds, <span class="keyword">const</span> <span class="keywordtype">int</span> &restMilliseconds);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="class_boxing_settings.html#ae57079ed791d793bfb310712063b1dab"> 102</a></span>  <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="class_boxing_settings.html#ae57079ed791d793bfb310712063b1dab">getRounds</a>() { <span class="keywordflow">return</span> this->mRounds; }</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> </div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="class_boxing_settings.html#a2b9ff4ab1dbd14f5e8f37b88677e73f4"> 109</a></span>  <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="class_boxing_settings.html#a2b9ff4ab1dbd14f5e8f37b88677e73f4">getRoundMilliseconds</a>() { <span class="keywordflow">return</span> this->mRoundMilliseconds; }</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span> </div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="class_boxing_settings.html#a84fd6052ef19488b015638c68fa2be72"> 116</a></span>  <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="class_boxing_settings.html#a84fd6052ef19488b015638c68fa2be72">getRestMilliseconds</a>() { <span class="keywordflow">return</span> this->mRestMilliseconds; }</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="class_boxing_settings.html#a2d03c793ed7ad6e97894e21b1f85105b"> 123</a></span>  <span class="keyword">inline</span> QString <a class="code" href="class_boxing_settings.html#a2d03c793ed7ad6e97894e21b1f85105b">getPreset</a>() { <span class="keywordflow">return</span> this->mPreset; }</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span> </div><div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="class_boxing_settings.html#ac0641004a9f244dcce8056c722685065"> 130</a></span>  <span class="keyword">inline</span> QString <a class="code" href="class_boxing_settings.html#ac0641004a9f244dcce8056c722685065">getPresetName</a>() { <span class="keywordflow">return</span> this->mPresetName; }</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> </div><div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="class_boxing_settings.html#a5fee80840f4bfe8cb0fa95dea161e586"> 138</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_boxing_settings.html#a5fee80840f4bfe8cb0fa95dea161e586">setRounds</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> &rounds) { mRounds = rounds; }</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> </div><div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="class_boxing_settings.html#aaa691ab3a2fa5d1812975207b7e9f9ed"> 146</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_boxing_settings.html#aaa691ab3a2fa5d1812975207b7e9f9ed">setRoundMilliseconds</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> &roundMilliseconds) { mRoundMilliseconds = roundMilliseconds; }</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div><div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="class_boxing_settings.html#ad7c283d2b4ebe1333c1680a0fd19cb0c"> 154</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_boxing_settings.html#ad7c283d2b4ebe1333c1680a0fd19cb0c">setRestMilliseconds</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> &restMilliseconds) { mRestMilliseconds = restMilliseconds; }</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> </div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="keywordtype">void</span> <a class="code" href="class_boxing_settings.html#a71e6d017856266fa95b07ed0030ed05b">setPreset</a>(<span class="keyword">const</span> QString &preset);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span> </div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keywordtype">int</span> mRounds;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keywordtype">int</span> mRoundMilliseconds;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="keywordtype">int</span> mRestMilliseconds;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span> </div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  QString mPreset;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  QString mPresetName;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordtype">void</span> loadPreset();</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordtype">void</span> setDefaultPreset();</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> </div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keyword">inline</span> <span class="keyword">const</span> QString convertRichNameToGroup(<span class="keyword">const</span> QString &richName) { <span class="keywordflow">return</span> richName.toLower().simplified().replace(<span class="stringliteral">" "</span>, <span class="stringliteral">""</span>); }</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> </div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  signals:</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keywordtype">void</span> <a class="code" href="class_boxing_settings.html#a811dbd6c80f86ad219bbb9166571a2e9">presetChanged</a>();</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span> };</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> </div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span> <span class="preprocessor">#endif // BOXINGSETTINGS_H</span></div><div class="ttc" id="class_boxing_settings_html_ad7c283d2b4ebe1333c1680a0fd19cb0c"><div class="ttname"><a href="class_boxing_settings.html#ad7c283d2b4ebe1333c1680a0fd19cb0c">BoxingSettings::setRestMilliseconds</a></div><div class="ttdeci">void setRestMilliseconds(const int &restMilliseconds)</div><div class="ttdoc">Setter for milliseconds of rest. </div><div class="ttdef"><b>Definition:</b> boxingsettings.h:154</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_a71e6d017856266fa95b07ed0030ed05b"><div class="ttname"><a href="class_boxing_settings.html#a71e6d017856266fa95b07ed0030ed05b">BoxingSettings::setPreset</a></div><div class="ttdeci">void setPreset(const QString &preset)</div><div class="ttdoc">Setter for preset. </div><div class="ttdef"><b>Definition:</b> boxingsettings.cpp:25</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_a2d03c793ed7ad6e97894e21b1f85105b"><div class="ttname"><a href="class_boxing_settings.html#a2d03c793ed7ad6e97894e21b1f85105b">BoxingSettings::getPreset</a></div><div class="ttdeci">QString getPreset()</div><div class="ttdef"><b>Definition:</b> boxingsettings.h:123</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_a507b3038f2851cff0d17fffc027019de"><div class="ttname"><a href="class_boxing_settings.html#a507b3038f2851cff0d17fffc027019de">BoxingSettings::presetsList</a></div><div class="ttdeci">Q_INVOKABLE const QStringList presetsList()</div><div class="ttdef"><b>Definition:</b> boxingsettings.cpp:84</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_a5fee80840f4bfe8cb0fa95dea161e586"><div class="ttname"><a href="class_boxing_settings.html#a5fee80840f4bfe8cb0fa95dea161e586">BoxingSettings::setRounds</a></div><div class="ttdeci">void setRounds(const int &rounds)</div><div class="ttdoc">Setter for number of rounds. </div><div class="ttdef"><b>Definition:</b> boxingsettings.h:138</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_a24906b544896052c08f0b93ded92823b"><div class="ttname"><a href="class_boxing_settings.html#a24906b544896052c08f0b93ded92823b">BoxingSettings::savePreset</a></div><div class="ttdeci">Q_INVOKABLE void savePreset(const QString &name, const int &rounds, const int &roundMilliseconds, const int &restMilliseconds)</div><div class="ttdoc">Save or override settings about specific preset. </div><div class="ttdef"><b>Definition:</b> boxingsettings.cpp:59</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_a811dbd6c80f86ad219bbb9166571a2e9"><div class="ttname"><a href="class_boxing_settings.html#a811dbd6c80f86ad219bbb9166571a2e9">BoxingSettings::presetChanged</a></div><div class="ttdeci">void presetChanged()</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_a84fd6052ef19488b015638c68fa2be72"><div class="ttname"><a href="class_boxing_settings.html#a84fd6052ef19488b015638c68fa2be72">BoxingSettings::getRestMilliseconds</a></div><div class="ttdeci">int getRestMilliseconds()</div><div class="ttdef"><b>Definition:</b> boxingsettings.h:116</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_a2b9ff4ab1dbd14f5e8f37b88677e73f4"><div class="ttname"><a href="class_boxing_settings.html#a2b9ff4ab1dbd14f5e8f37b88677e73f4">BoxingSettings::getRoundMilliseconds</a></div><div class="ttdeci">int getRoundMilliseconds()</div><div class="ttdef"><b>Definition:</b> boxingsettings.h:109</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_a6475be7b9b7eacc3b4a9ca853311b5a9"><div class="ttname"><a href="class_boxing_settings.html#a6475be7b9b7eacc3b4a9ca853311b5a9">BoxingSettings::deletePreset</a></div><div class="ttdeci">Q_INVOKABLE void deletePreset(const QString &name)</div><div class="ttdoc">Delete a specified preset. </div><div class="ttdef"><b>Definition:</b> boxingsettings.cpp:72</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_ac0641004a9f244dcce8056c722685065"><div class="ttname"><a href="class_boxing_settings.html#ac0641004a9f244dcce8056c722685065">BoxingSettings::getPresetName</a></div><div class="ttdeci">QString getPresetName()</div><div class="ttdef"><b>Definition:</b> boxingsettings.h:130</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_a62af206ef42670b751e0cec59c206896"><div class="ttname"><a href="class_boxing_settings.html#a62af206ef42670b751e0cec59c206896">BoxingSettings::BoxingSettings</a></div><div class="ttdeci">BoxingSettings()</div><div class="ttdef"><b>Definition:</b> boxingsettings.cpp:5</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_ae57079ed791d793bfb310712063b1dab"><div class="ttname"><a href="class_boxing_settings.html#ae57079ed791d793bfb310712063b1dab">BoxingSettings::getRounds</a></div><div class="ttdeci">int getRounds()</div><div class="ttdef"><b>Definition:</b> boxingsettings.h:102</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html"><div class="ttname"><a href="class_boxing_settings.html">BoxingSettings</a></div><div class="ttdoc">Handle settings about timer. Can save, load and delete a specific preset. </div><div class="ttdef"><b>Definition:</b> boxingsettings.h:19</div></div>
|
|
<div class="ttc" id="class_boxing_settings_html_aaa691ab3a2fa5d1812975207b7e9f9ed"><div class="ttname"><a href="class_boxing_settings.html#aaa691ab3a2fa5d1812975207b7e9f9ed">BoxingSettings::setRoundMilliseconds</a></div><div class="ttdeci">void setRoundMilliseconds(const int &roundMilliseconds)</div><div class="ttdoc">Setter for duration of round (in milliseconds) </div><div class="ttdef"><b>Definition:</b> boxingsettings.h:146</div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.13
|
|
</small></address>
|
|
</body>
|
|
</html>
|