Без опису

grid_8h_source.html 40KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.9.1"/>
  7. <title>My Project: grid.h Source File</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/searchdata.js"></script>
  13. <script type="text/javascript" src="search/search.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function() { init_search(); });
  16. </script>
  17. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  18. </head>
  19. <body>
  20. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  21. <div id="titlearea">
  22. <table cellspacing="0" cellpadding="0">
  23. <tbody>
  24. <tr style="height: 56px;">
  25. <td style="padding-left: 0.5em;">
  26. <div id="projectname">My Project
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.9.1 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li><a href="annotated.html"><span>Classes</span></a></li>
  42. <li class="current"><a href="files.html"><span>Files</span></a></li>
  43. <li>
  44. <div id="MSearchBox" class="MSearchBoxInactive">
  45. <span class="left">
  46. <img id="MSearchSelect" src="search/mag_sel.png"
  47. onmouseover="return searchBox.OnSearchSelectShow()"
  48. onmouseout="return searchBox.OnSearchSelectHide()"
  49. alt=""/>
  50. <input type="text" id="MSearchField" value="Search" accesskey="S"
  51. onfocus="searchBox.OnSearchFieldFocus(true)"
  52. onblur="searchBox.OnSearchFieldFocus(false)"
  53. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  54. </span><span class="right">
  55. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  56. </span>
  57. </div>
  58. </li>
  59. </ul>
  60. </div>
  61. <div id="navrow2" class="tabs2">
  62. <ul class="tablist">
  63. <li><a href="files.html"><span>File&#160;List</span></a></li>
  64. </ul>
  65. </div>
  66. </div><!-- top -->
  67. <!-- window showing the filter options -->
  68. <div id="MSearchSelectWindow"
  69. onmouseover="return searchBox.OnSearchSelectShow()"
  70. onmouseout="return searchBox.OnSearchSelectHide()"
  71. onkeydown="return searchBox.OnSearchSelectKey(event)">
  72. </div>
  73. <!-- iframe showing the search results (closed by default) -->
  74. <div id="MSearchResultsWindow">
  75. <iframe src="javascript:void(0)" frameborder="0"
  76. name="MSearchResults" id="MSearchResults">
  77. </iframe>
  78. </div>
  79. <div class="header">
  80. <div class="headertitle">
  81. <div class="title">grid.h</div> </div>
  82. </div><!--header-->
  83. <div class="contents">
  84. <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/***************************************************************************</span></div>
  85. <div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">** **</span></div>
  86. <div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">** GridView, a simple GridView made with Qt4 **</span></div>
  87. <div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">** Copyright (C) 2013 Sacha Schutz **</span></div>
  88. <div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">** **</span></div>
  89. <div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">** This program is free software: you can redistribute it and/or modify **</span></div>
  90. <div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">** it under the terms of the GNU General Public License as published by **</span></div>
  91. <div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">** the Free Software Foundation, either version 3 of the License, or **</span></div>
  92. <div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">** (at your option) any later version. **</span></div>
  93. <div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">** **</span></div>
  94. <div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">** This program is distributed in the hope that it will be useful, **</span></div>
  95. <div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">** but WITHOUT ANY WARRANTY; without even the implied warranty of **</span></div>
  96. <div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **</span></div>
  97. <div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">** GNU General Public License for more details. **</span></div>
  98. <div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">** **</span></div>
  99. <div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">** You should have received a copy of the GNU General Public License **</span></div>
  100. <div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">** along with this program. If not, see http://www.gnu.org/licenses/. **</span></div>
  101. <div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">** **</span></div>
  102. <div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">****************************************************************************</span></div>
  103. <div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">** Author : Sacha Schutz **</span></div>
  104. <div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">** Website: http://www.labsquare.org **</span></div>
  105. <div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment">** Email : sacha@labsquare.org **</span></div>
  106. <div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">** Date : 12.03.12 **</span></div>
  107. <div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment">****************************************************************************/</span></div>
  108. <div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div>
  109. <div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#ifndef GRIDVIEW_H</span></div>
  110. <div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#define GRIDVIEW_H</span></div>
  111. <div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div>
  112. <div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &lt;QtGui&gt;</span></div>
  113. <div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &lt;QWidget&gt;</span></div>
  114. <div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &lt;QScrollArea&gt;</span></div>
  115. <div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &lt;QVector&gt;</span></div>
  116. <div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div>
  117. <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="keyword">class </span><a class="code" href="class_grid_widget.html">GridWidget</a>;</div>
  118. <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div>
  119. <div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="class_grid_widget.html"> 42</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_grid_widget.html">GridWidget</a> : <span class="keyword">public</span> QWidget</div>
  120. <div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;{</div>
  121. <div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; Q_OBJECT</div>
  122. <div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="keyword">public</span>:</div>
  123. <div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div>
  124. <div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keyword">explicit</span> <a class="code" href="class_grid_widget.html#ad3370c8905e4f03b666d1be221f4c412">GridWidget</a>(<span class="keywordtype">int</span> rowCount = 100, <span class="keywordtype">int</span> columnCount =100,QWidget *parent = 0);</div>
  125. <div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div>
  126. <div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <a class="code" href="class_grid_widget.html#ad3370c8905e4f03b666d1be221f4c412">GridWidget</a>(QWidget *parent);</div>
  127. <div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div>
  128. <div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a87a46b6a3e5522e851732093b757baae">setGridSize</a>(<span class="keywordtype">int</span> rowCount, <span class="keywordtype">int</span> columnCount);</div>
  129. <div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div>
  130. <div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#ace3447d5fc329c47b55395a52a9eaf13">switchOn</a>(<span class="keywordtype">int</span> x,<span class="keywordtype">int</span> y, <span class="keyword">const</span> QColor&amp; color);</div>
  131. <div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;</div>
  132. <div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; QColor <a class="code" href="class_grid_widget.html#a50a2a9b2490de84dba08be23130fd9d4">getCellColor</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y) ;</div>
  133. <div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div>
  134. <div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div>
  135. <div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#aca84a4a79a25f1adebaeb69f32022882">switchOff</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y);</div>
  136. <div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div>
  137. <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;</div>
  138. <div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_grid_widget.html#a1b92c3f484ea93338f3c0b8348a334f9">getGridColumns</a>() ;</div>
  139. <div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;</div>
  140. <div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_grid_widget.html#afa1e34f8dbae400cf200fdeb2398f138">getGridRows</a>() ;</div>
  141. <div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div>
  142. <div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a7979db95cc3533858a17946b8a70abe3">clear</a>();</div>
  143. <div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;</div>
  144. <div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a8a128f08a3471f751442dfe1306250f4">setCellSize</a>(<span class="keywordtype">int</span> size);</div>
  145. <div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;</div>
  146. <div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a242812c406b269657eb6092af4a0ae7e">setTool</a>(QString tool);</div>
  147. <div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;</div>
  148. <div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#abe71249d6d54e84698dcb831c9df4c17">setFront</a>(QString front);</div>
  149. <div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;</div>
  150. <div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a64cd0418127923278bd7dd3ddd3bd459">setBack</a>(QString back);</div>
  151. <div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;</div>
  152. <div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#aca5c4e4edab002da08a7d76b7acf8ce7">setToolSize</a>(<span class="keywordtype">int</span> size);</div>
  153. <div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;</div>
  154. <div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#ac4b7dcf1fd4f6f3f00f6c83837af762d">identifyTool</a>(QString tool, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y);</div>
  155. <div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;</div>
  156. <div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a9eae49724fc8eb51dacb29cf0f1d0f7f">Dot</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, QColor colorSelected);</div>
  157. <div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;</div>
  158. <div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a85f85cefe91f2c4e9c79566b5e65d5df">RowMajorFill</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, QColor colorClicked, QColor toolColor);</div>
  159. <div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160;</div>
  160. <div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a1850e0f0dde766350c7cff9668424633">ColMajorFill</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, QColor colorClicked, QColor toolColor);</div>
  161. <div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160;</div>
  162. <div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a2de94a6b9cda8d27be4598ebd2b80ef1">DiagonalLeft</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, QColor colorClicked, QColor toolColor);</div>
  163. <div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;</div>
  164. <div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a8ff474d6ac0e76685839e4107c85c10b">DiagonalRight</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, QColor colorClicked, QColor toolColor);</div>
  165. <div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160;</div>
  166. <div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a3d25401530305223417a0a0313e7105b">square</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, QColor toolColor, <span class="keywordtype">int</span> toolSize);</div>
  167. <div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160;</div>
  168. <div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#abee64aeb022f670f15870500e9127cda">triangle</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, QColor toolColor, <span class="keywordtype">int</span> toolSize);</div>
  169. <div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160;</div>
  170. <div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a4de59f7c6dba342ff0406137ca87bf8d">circle</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, QColor toolColor, <span class="keywordtype">int</span> toolSize);</div>
  171. <div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160;</div>
  172. <div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a6426b82953f555dc84ede652cd44ee13">undo</a>();</div>
  173. <div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160;</div>
  174. <div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160;</div>
  175. <div class="line"><a name="l00387"></a><span class="lineno"> 387</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a0a8b52721ac642d4f7261896ef2fff74">redo</a>();</div>
  176. <div class="line"><a name="l00388"></a><span class="lineno"> 388</span>&#160;</div>
  177. <div class="line"><a name="l00389"></a><span class="lineno"> 389</span>&#160;<span class="keyword">protected</span>:</div>
  178. <div class="line"><a name="l00390"></a><span class="lineno"> 390</span>&#160;</div>
  179. <div class="line"><a name="l00402"></a><span class="lineno"> 402</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a2b49b1ee6683c99f4a497f7ad89e8097">drawGrid</a>(QPaintDevice * device);</div>
  180. <div class="line"><a name="l00403"></a><span class="lineno"> 403</span>&#160;</div>
  181. <div class="line"><a name="l00413"></a><span class="lineno"> 413</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#a727fa338640fe7e856519f4ed0078b33">paintEvent</a>(QPaintEvent *);</div>
  182. <div class="line"><a name="l00414"></a><span class="lineno"> 414</span>&#160;</div>
  183. <div class="line"><a name="l00425"></a><span class="lineno"> 425</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_grid_widget.html#adbd85c9494fa35df467d912e2eb41742">mousePressEvent</a>(QMouseEvent *);</div>
  184. <div class="line"><a name="l00426"></a><span class="lineno"> 426</span>&#160;</div>
  185. <div class="line"><a name="l00427"></a><span class="lineno"> 427</span>&#160;signals:</div>
  186. <div class="line"><a name="l00428"></a><span class="lineno"> 428</span>&#160;</div>
  187. <div class="line"><a name="l00429"></a><span class="lineno"> 429</span>&#160; <span class="keywordtype">void</span> cellClicked(QPoint pos);</div>
  188. <div class="line"><a name="l00430"></a><span class="lineno"> 430</span>&#160;</div>
  189. <div class="line"><a name="l00431"></a><span class="lineno"> 431</span>&#160; <span class="keywordtype">void</span> canUndo(<span class="keywordtype">bool</span> can);</div>
  190. <div class="line"><a name="l00432"></a><span class="lineno"> 432</span>&#160;</div>
  191. <div class="line"><a name="l00433"></a><span class="lineno"> 433</span>&#160; <span class="keywordtype">void</span> canRedo(<span class="keywordtype">bool</span> can);</div>
  192. <div class="line"><a name="l00434"></a><span class="lineno"> 434</span>&#160;</div>
  193. <div class="line"><a name="l00435"></a><span class="lineno"> 435</span>&#160;<span class="keyword">private</span>:</div>
  194. <div class="line"><a name="l00436"></a><span class="lineno"> 436</span>&#160;</div>
  195. <div class="line"><a name="l00437"></a><span class="lineno"><a class="line" href="class_grid_widget.html#a2913542510201e3e0c7fffe81abf0253"> 437</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_grid_widget.html#a2913542510201e3e0c7fffe81abf0253">mCellSize</a>; </div>
  196. <div class="line"><a name="l00439"></a><span class="lineno"><a class="line" href="class_grid_widget.html#a3d818ef6eb5868e53e26e1fd48f19057"> 439</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_grid_widget.html#a3d818ef6eb5868e53e26e1fd48f19057">mRowCount</a>; </div>
  197. <div class="line"><a name="l00441"></a><span class="lineno"><a class="line" href="class_grid_widget.html#ab530d1fa7b44c05afe4e70c2e410e579"> 441</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_grid_widget.html#ab530d1fa7b44c05afe4e70c2e410e579">mColumnCount</a>; </div>
  198. <div class="line"><a name="l00443"></a><span class="lineno"><a class="line" href="class_grid_widget.html#a1b67bb85e389d27e03ef34e4f0b90750"> 443</a></span>&#160; QPixmap <a class="code" href="class_grid_widget.html#a1b67bb85e389d27e03ef34e4f0b90750">mGridPix</a>; </div>
  199. <div class="line"><a name="l00445"></a><span class="lineno"><a class="line" href="class_grid_widget.html#a65644f377d72a22e4925ad21fc9ccbf5"> 445</a></span>&#160; QHash&lt;int, QColor &gt; <a class="code" href="class_grid_widget.html#a65644f377d72a22e4925ad21fc9ccbf5">mColors</a>; </div>
  200. <div class="line"><a name="l00448"></a><span class="lineno"><a class="line" href="class_grid_widget.html#a53e89b667667aed308430da93a25b7a1"> 448</a></span>&#160; QString <a class="code" href="class_grid_widget.html#a53e89b667667aed308430da93a25b7a1">Tool</a>; </div>
  201. <div class="line"><a name="l00450"></a><span class="lineno"><a class="line" href="class_grid_widget.html#a48b162752c6e7853b2ce3c6cb8db5661"> 450</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_grid_widget.html#a48b162752c6e7853b2ce3c6cb8db5661">ToolSize</a>; </div>
  202. <div class="line"><a name="l00452"></a><span class="lineno"><a class="line" href="class_grid_widget.html#a857bb9b33ae7f241a568f884f4e6f5bf"> 452</a></span>&#160; QColor <a class="code" href="class_grid_widget.html#a857bb9b33ae7f241a568f884f4e6f5bf">frontColor</a>; </div>
  203. <div class="line"><a name="l00454"></a><span class="lineno"><a class="line" href="class_grid_widget.html#aa36b97142702844f4888a9bbee37b670"> 454</a></span>&#160; QColor <a class="code" href="class_grid_widget.html#aa36b97142702844f4888a9bbee37b670">backColor</a>; </div>
  204. <div class="line"><a name="l00456"></a><span class="lineno"><a class="line" href="class_grid_widget.html#a6afb043b34520019af1acb14fb4682d4"> 456</a></span>&#160; QColor <a class="code" href="class_grid_widget.html#a6afb043b34520019af1acb14fb4682d4">background</a>; </div>
  205. <div class="line"><a name="l00458"></a><span class="lineno"><a class="line" href="class_grid_widget.html#aa41b383c851c5ef1c11871507aa1f28d"> 458</a></span>&#160; QVector &lt; QHash&lt;int, QColor &gt; &gt; <a class="code" href="class_grid_widget.html#aa41b383c851c5ef1c11871507aa1f28d">oldStates</a>; </div>
  206. <div class="line"><a name="l00460"></a><span class="lineno"><a class="line" href="class_grid_widget.html#a8c84952dfa2f11876ab8f1346667c565"> 460</a></span>&#160; QVector &lt; QHash&lt;int, QColor &gt; &gt; <a class="code" href="class_grid_widget.html#a8c84952dfa2f11876ab8f1346667c565">newStates</a>; </div>
  207. <div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160;};</div>
  208. <div class="line"><a name="l00463"></a><span class="lineno"> 463</span>&#160;<span class="preprocessor">#endif // GRIDVIEW_H</span></div>
  209. <div class="ttc" id="class_grid_widget_html_a857bb9b33ae7f241a568f884f4e6f5bf"><div class="ttname"><a href="class_grid_widget.html#a857bb9b33ae7f241a568f884f4e6f5bf">GridWidget::frontColor</a></div><div class="ttdeci">QColor frontColor</div><div class="ttdef"><b>Definition:</b> grid.h:452</div></div>
  210. <div class="ttc" id="class_grid_widget_html_a9eae49724fc8eb51dacb29cf0f1d0f7f"><div class="ttname"><a href="class_grid_widget.html#a9eae49724fc8eb51dacb29cf0f1d0f7f">GridWidget::Dot</a></div><div class="ttdeci">void Dot(int x, int y, QColor colorSelected)</div><div class="ttdoc">Receives the coordinates of the grid where the user clicked and paints that cell with the color of th...</div><div class="ttdef"><b>Definition:</b> tools.cpp:17</div></div>
  211. <div class="ttc" id="class_grid_widget_html_a2913542510201e3e0c7fffe81abf0253"><div class="ttname"><a href="class_grid_widget.html#a2913542510201e3e0c7fffe81abf0253">GridWidget::mCellSize</a></div><div class="ttdeci">int mCellSize</div><div class="ttdef"><b>Definition:</b> grid.h:437</div></div>
  212. <div class="ttc" id="class_grid_widget_html_a4de59f7c6dba342ff0406137ca87bf8d"><div class="ttname"><a href="class_grid_widget.html#a4de59f7c6dba342ff0406137ca87bf8d">GridWidget::circle</a></div><div class="ttdeci">void circle(int x, int y, QColor toolColor, int toolSize)</div><div class="ttdoc">Receives the coordinates of the grid where the user clicked and paints a circle of the size and with ...</div><div class="ttdef"><b>Definition:</b> tools.cpp:243</div></div>
  213. <div class="ttc" id="class_grid_widget_html_ab530d1fa7b44c05afe4e70c2e410e579"><div class="ttname"><a href="class_grid_widget.html#ab530d1fa7b44c05afe4e70c2e410e579">GridWidget::mColumnCount</a></div><div class="ttdeci">int mColumnCount</div><div class="ttdef"><b>Definition:</b> grid.h:441</div></div>
  214. <div class="ttc" id="class_grid_widget_html_a1b92c3f484ea93338f3c0b8348a334f9"><div class="ttname"><a href="class_grid_widget.html#a1b92c3f484ea93338f3c0b8348a334f9">GridWidget::getGridColumns</a></div><div class="ttdeci">int getGridColumns()</div><div class="ttdoc">Returns the number of columns in the grid. </div><div class="ttdef"><b>Definition:</b> grid.cpp:302</div></div>
  215. <div class="ttc" id="class_grid_widget_html_a65644f377d72a22e4925ad21fc9ccbf5"><div class="ttname"><a href="class_grid_widget.html#a65644f377d72a22e4925ad21fc9ccbf5">GridWidget::mColors</a></div><div class="ttdeci">QHash&lt; int, QColor &gt; mColors</div><div class="ttdef"><b>Definition:</b> grid.h:445</div></div>
  216. <div class="ttc" id="class_grid_widget_html_a87a46b6a3e5522e851732093b757baae"><div class="ttname"><a href="class_grid_widget.html#a87a46b6a3e5522e851732093b757baae">GridWidget::setGridSize</a></div><div class="ttdeci">void setGridSize(int rowCount, int columnCount)</div><div class="ttdoc">Sets the number of columns and rows of the grid. </div><div class="ttdef"><b>Definition:</b> grid.cpp:155</div></div>
  217. <div class="ttc" id="class_grid_widget_html_a48b162752c6e7853b2ce3c6cb8db5661"><div class="ttname"><a href="class_grid_widget.html#a48b162752c6e7853b2ce3c6cb8db5661">GridWidget::ToolSize</a></div><div class="ttdeci">int ToolSize</div><div class="ttdef"><b>Definition:</b> grid.h:450</div></div>
  218. <div class="ttc" id="class_grid_widget_html_a2de94a6b9cda8d27be4598ebd2b80ef1"><div class="ttname"><a href="class_grid_widget.html#a2de94a6b9cda8d27be4598ebd2b80ef1">GridWidget::DiagonalLeft</a></div><div class="ttdeci">void DiagonalLeft(int x, int y, QColor colorClicked, QColor toolColor)</div><div class="ttdoc">Recieves the coordinates of the grid where the user clicked and paints (from that point) the longest ...</div><div class="ttdef"><b>Definition:</b> tools.cpp:111</div></div>
  219. <div class="ttc" id="class_grid_widget_html_abee64aeb022f670f15870500e9127cda"><div class="ttname"><a href="class_grid_widget.html#abee64aeb022f670f15870500e9127cda">GridWidget::triangle</a></div><div class="ttdeci">void triangle(int x, int y, QColor toolColor, int toolSize)</div><div class="ttdoc">Receives the coordinates of the grid where the user clicked and paints a triangle of the size and wit...</div><div class="ttdef"><b>Definition:</b> tools.cpp:213</div></div>
  220. <div class="ttc" id="class_grid_widget_html_afa1e34f8dbae400cf200fdeb2398f138"><div class="ttname"><a href="class_grid_widget.html#afa1e34f8dbae400cf200fdeb2398f138">GridWidget::getGridRows</a></div><div class="ttdeci">int getGridRows()</div><div class="ttdoc">Returns the number of rows in the grid. </div><div class="ttdef"><b>Definition:</b> grid.cpp:313</div></div>
  221. <div class="ttc" id="class_grid_widget_html_a8ff474d6ac0e76685839e4107c85c10b"><div class="ttname"><a href="class_grid_widget.html#a8ff474d6ac0e76685839e4107c85c10b">GridWidget::DiagonalRight</a></div><div class="ttdeci">void DiagonalRight(int x, int y, QColor colorClicked, QColor toolColor)</div><div class="ttdoc">Recieves the coordinates of the grid where the user clicked and paints (from that point) the longest ...</div><div class="ttdef"><b>Definition:</b> tools.cpp:147</div></div>
  222. <div class="ttc" id="class_grid_widget_html_aa41b383c851c5ef1c11871507aa1f28d"><div class="ttname"><a href="class_grid_widget.html#aa41b383c851c5ef1c11871507aa1f28d">GridWidget::oldStates</a></div><div class="ttdeci">QVector&lt; QHash&lt; int, QColor &gt; &gt; oldStates</div><div class="ttdef"><b>Definition:</b> grid.h:458</div></div>
  223. <div class="ttc" id="class_grid_widget_html_a3d818ef6eb5868e53e26e1fd48f19057"><div class="ttname"><a href="class_grid_widget.html#a3d818ef6eb5868e53e26e1fd48f19057">GridWidget::mRowCount</a></div><div class="ttdeci">int mRowCount</div><div class="ttdef"><b>Definition:</b> grid.h:439</div></div>
  224. <div class="ttc" id="class_grid_widget_html_a1b67bb85e389d27e03ef34e4f0b90750"><div class="ttname"><a href="class_grid_widget.html#a1b67bb85e389d27e03ef34e4f0b90750">GridWidget::mGridPix</a></div><div class="ttdeci">QPixmap mGridPix</div><div class="ttdef"><b>Definition:</b> grid.h:443</div></div>
  225. <div class="ttc" id="class_grid_widget_html_ace3447d5fc329c47b55395a52a9eaf13"><div class="ttname"><a href="class_grid_widget.html#ace3447d5fc329c47b55395a52a9eaf13">GridWidget::switchOn</a></div><div class="ttdeci">void switchOn(int x, int y, const QColor &amp;color)</div><div class="ttdoc">Saves the given color and position in the vector that represents the painted cells of the grid...</div><div class="ttdef"><b>Definition:</b> grid.cpp:271</div></div>
  226. <div class="ttc" id="class_grid_widget_html_a1850e0f0dde766350c7cff9668424633"><div class="ttname"><a href="class_grid_widget.html#a1850e0f0dde766350c7cff9668424633">GridWidget::ColMajorFill</a></div><div class="ttdeci">void ColMajorFill(int x, int y, QColor colorClicked, QColor toolColor)</div><div class="ttdoc">Receives the coordinates of the grid where the user clicked and paints (from that point up and down) ...</div><div class="ttdef"><b>Definition:</b> tools.cpp:75</div></div>
  227. <div class="ttc" id="class_grid_widget_html_a2b49b1ee6683c99f4a497f7ad89e8097"><div class="ttname"><a href="class_grid_widget.html#a2b49b1ee6683c99f4a497f7ad89e8097">GridWidget::drawGrid</a></div><div class="ttdeci">void drawGrid(QPaintDevice *device)</div><div class="ttdoc">Function that first sets the size of the GridWidget, then paints the cells with the color selected fo...</div><div class="ttdef"><b>Definition:</b> grid.cpp:370</div></div>
  228. <div class="ttc" id="class_grid_widget_html_aa36b97142702844f4888a9bbee37b670"><div class="ttname"><a href="class_grid_widget.html#aa36b97142702844f4888a9bbee37b670">GridWidget::backColor</a></div><div class="ttdeci">QColor backColor</div><div class="ttdef"><b>Definition:</b> grid.h:454</div></div>
  229. <div class="ttc" id="class_grid_widget_html_aca84a4a79a25f1adebaeb69f32022882"><div class="ttname"><a href="class_grid_widget.html#aca84a4a79a25f1adebaeb69f32022882">GridWidget::switchOff</a></div><div class="ttdeci">void switchOff(int x, int y)</div><div class="ttdoc">Removes the given position from the vector that represents the painted cells of the grid...</div><div class="ttdef"><b>Definition:</b> grid.cpp:328</div></div>
  230. <div class="ttc" id="class_grid_widget_html_a0a8b52721ac642d4f7261896ef2fff74"><div class="ttname"><a href="class_grid_widget.html#a0a8b52721ac642d4f7261896ef2fff74">GridWidget::redo</a></div><div class="ttdeci">void redo()</div><div class="ttdoc">When the redo button is pressed the current state is pushed into the undo vector(oldStates) and the l...</div><div class="ttdef"><b>Definition:</b> grid.cpp:245</div></div>
  231. <div class="ttc" id="class_grid_widget_html_a50a2a9b2490de84dba08be23130fd9d4"><div class="ttname"><a href="class_grid_widget.html#a50a2a9b2490de84dba08be23130fd9d4">GridWidget::getCellColor</a></div><div class="ttdeci">QColor getCellColor(int x, int y)</div><div class="ttdoc">Returns the color of the cell in position (x,y) </div><div class="ttdef"><b>Definition:</b> grid.cpp:289</div></div>
  232. <div class="ttc" id="class_grid_widget_html_a53e89b667667aed308430da93a25b7a1"><div class="ttname"><a href="class_grid_widget.html#a53e89b667667aed308430da93a25b7a1">GridWidget::Tool</a></div><div class="ttdeci">QString Tool</div><div class="ttdef"><b>Definition:</b> grid.h:448</div></div>
  233. <div class="ttc" id="class_grid_widget_html_a242812c406b269657eb6092af4a0ae7e"><div class="ttname"><a href="class_grid_widget.html#a242812c406b269657eb6092af4a0ae7e">GridWidget::setTool</a></div><div class="ttdeci">void setTool(QString tool)</div><div class="ttdoc">Sets the tool. </div><div class="ttdef"><b>Definition:</b> grid.cpp:109</div></div>
  234. <div class="ttc" id="class_grid_widget_html_a7979db95cc3533858a17946b8a70abe3"><div class="ttname"><a href="class_grid_widget.html#a7979db95cc3533858a17946b8a70abe3">GridWidget::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">Clears the grid and sets it to its initial state. </div><div class="ttdef"><b>Definition:</b> grid.cpp:339</div></div>
  235. <div class="ttc" id="class_grid_widget_html_adbd85c9494fa35df467d912e2eb41742"><div class="ttname"><a href="class_grid_widget.html#adbd85c9494fa35df467d912e2eb41742">GridWidget::mousePressEvent</a></div><div class="ttdeci">virtual void mousePressEvent(QMouseEvent *)</div><div class="ttdoc">When the mouse is clicked on a cell of the grid it gets the x,y coordinates of the mouse and uses the...</div><div class="ttdef"><b>Definition:</b> grid.cpp:186</div></div>
  236. <div class="ttc" id="class_grid_widget_html_a8c84952dfa2f11876ab8f1346667c565"><div class="ttname"><a href="class_grid_widget.html#a8c84952dfa2f11876ab8f1346667c565">GridWidget::newStates</a></div><div class="ttdeci">QVector&lt; QHash&lt; int, QColor &gt; &gt; newStates</div><div class="ttdef"><b>Definition:</b> grid.h:460</div></div>
  237. <div class="ttc" id="class_grid_widget_html_abe71249d6d54e84698dcb831c9df4c17"><div class="ttname"><a href="class_grid_widget.html#abe71249d6d54e84698dcb831c9df4c17">GridWidget::setFront</a></div><div class="ttdeci">void setFront(QString front)</div><div class="ttdoc">Sets the color of the brush. </div><div class="ttdef"><b>Definition:</b> grid.cpp:120</div></div>
  238. <div class="ttc" id="class_grid_widget_html_a3d25401530305223417a0a0313e7105b"><div class="ttname"><a href="class_grid_widget.html#a3d25401530305223417a0a0313e7105b">GridWidget::square</a></div><div class="ttdeci">void square(int x, int y, QColor toolColor, int toolSize)</div><div class="ttdoc">Receives the coordinates of the grid where the user clicked and paints a square of the size and with ...</div><div class="ttdef"><b>Definition:</b> tools.cpp:181</div></div>
  239. <div class="ttc" id="class_grid_widget_html_aca5c4e4edab002da08a7d76b7acf8ce7"><div class="ttname"><a href="class_grid_widget.html#aca5c4e4edab002da08a7d76b7acf8ce7">GridWidget::setToolSize</a></div><div class="ttdeci">void setToolSize(int size)</div><div class="ttdoc">Sets the size of the tool. </div><div class="ttdef"><b>Definition:</b> grid.cpp:142</div></div>
  240. <div class="ttc" id="class_grid_widget_html_a64cd0418127923278bd7dd3ddd3bd459"><div class="ttname"><a href="class_grid_widget.html#a64cd0418127923278bd7dd3ddd3bd459">GridWidget::setBack</a></div><div class="ttdeci">void setBack(QString back)</div><div class="ttdoc">Sets the color of the background. </div><div class="ttdef"><b>Definition:</b> grid.cpp:131</div></div>
  241. <div class="ttc" id="class_grid_widget_html_ad3370c8905e4f03b666d1be221f4c412"><div class="ttname"><a href="class_grid_widget.html#ad3370c8905e4f03b666d1be221f4c412">GridWidget::GridWidget</a></div><div class="ttdeci">GridWidget(int rowCount=100, int columnCount=100, QWidget *parent=0)</div><div class="ttdoc">Constructor which receives the number of rows and columns in the grid. </div><div class="ttdef"><b>Definition:</b> grid.cpp:85</div></div>
  242. <div class="ttc" id="class_grid_widget_html_a8a128f08a3471f751442dfe1306250f4"><div class="ttname"><a href="class_grid_widget.html#a8a128f08a3471f751442dfe1306250f4">GridWidget::setCellSize</a></div><div class="ttdeci">void setCellSize(int size)</div><div class="ttdoc">Sets the size of the cells in the grid. </div><div class="ttdef"><b>Definition:</b> grid.cpp:354</div></div>
  243. <div class="ttc" id="class_grid_widget_html_a85f85cefe91f2c4e9c79566b5e65d5df"><div class="ttname"><a href="class_grid_widget.html#a85f85cefe91f2c4e9c79566b5e65d5df">GridWidget::RowMajorFill</a></div><div class="ttdeci">void RowMajorFill(int x, int y, QColor colorClicked, QColor toolColor)</div><div class="ttdoc">Receives the coordinates of the grid where the user clicked and paints (from that point left and righ...</div><div class="ttdef"><b>Definition:</b> tools.cpp:40</div></div>
  244. <div class="ttc" id="class_grid_widget_html"><div class="ttname"><a href="class_grid_widget.html">GridWidget</a></div><div class="ttdef"><b>Definition:</b> grid.h:42</div></div>
  245. <div class="ttc" id="class_grid_widget_html_a6afb043b34520019af1acb14fb4682d4"><div class="ttname"><a href="class_grid_widget.html#a6afb043b34520019af1acb14fb4682d4">GridWidget::background</a></div><div class="ttdeci">QColor background</div><div class="ttdef"><b>Definition:</b> grid.h:456</div></div>
  246. <div class="ttc" id="class_grid_widget_html_ac4b7dcf1fd4f6f3f00f6c83837af762d"><div class="ttname"><a href="class_grid_widget.html#ac4b7dcf1fd4f6f3f00f6c83837af762d">GridWidget::identifyTool</a></div><div class="ttdeci">void identifyTool(QString tool, int x, int y)</div><div class="ttdoc">This function is called on each mousePressEvent inside the grid. It identifies the way the grid will ...</div><div class="ttdef"><b>Definition:</b> grid.cpp:424</div></div>
  247. <div class="ttc" id="class_grid_widget_html_a6426b82953f555dc84ede652cd44ee13"><div class="ttname"><a href="class_grid_widget.html#a6426b82953f555dc84ede652cd44ee13">GridWidget::undo</a></div><div class="ttdeci">void undo()</div><div class="ttdoc">When the undo button is pressed the current state is pushed into the redo vector(newStates) and the l...</div><div class="ttdef"><b>Definition:</b> grid.cpp:214</div></div>
  248. <div class="ttc" id="class_grid_widget_html_a727fa338640fe7e856519f4ed0078b33"><div class="ttname"><a href="class_grid_widget.html#a727fa338640fe7e856519f4ed0078b33">GridWidget::paintEvent</a></div><div class="ttdeci">virtual void paintEvent(QPaintEvent *)</div><div class="ttdoc">This function is automatically invoked each time the widget or its parent receives a repaint signal...</div><div class="ttdef"><b>Definition:</b> grid.cpp:170</div></div>
  249. </div><!-- fragment --></div><!-- contents -->
  250. <!-- start footer part -->
  251. <hr class="footer"/><address class="footer"><small>
  252. Generated on Thu Jun 18 2015 16:01:02 for My Project by &#160;<a href="http://www.doxygen.org/index.html">
  253. <img class="footer" src="doxygen.png" alt="doxygen"/>
  254. </a> 1.8.9.1
  255. </small></address>
  256. </body>
  257. </html>