Nav apraksta

class_grid_widget.html 66KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430
  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: GridWidget Class Reference</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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
  42. <li><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="annotated.html"><span>Class&#160;List</span></a></li>
  64. <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
  65. <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
  66. <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
  67. </ul>
  68. </div>
  69. <!-- window showing the filter options -->
  70. <div id="MSearchSelectWindow"
  71. onmouseover="return searchBox.OnSearchSelectShow()"
  72. onmouseout="return searchBox.OnSearchSelectHide()"
  73. onkeydown="return searchBox.OnSearchSelectKey(event)">
  74. </div>
  75. <!-- iframe showing the search results (closed by default) -->
  76. <div id="MSearchResultsWindow">
  77. <iframe src="javascript:void(0)" frameborder="0"
  78. name="MSearchResults" id="MSearchResults">
  79. </iframe>
  80. </div>
  81. </div><!-- top -->
  82. <div class="header">
  83. <div class="summary">
  84. <a href="#signals">Signals</a> &#124;
  85. <a href="#pub-methods">Public Member Functions</a> &#124;
  86. <a href="#pro-methods">Protected Member Functions</a> &#124;
  87. <a href="#pri-attribs">Private Attributes</a> &#124;
  88. <a href="class_grid_widget-members.html">List of all members</a> </div>
  89. <div class="headertitle">
  90. <div class="title">GridWidget Class Reference</div> </div>
  91. </div><!--header-->
  92. <div class="contents">
  93. <p><code>#include &lt;<a class="el" href="grid_8h_source.html">grid.h</a>&gt;</code></p>
  94. <div class="dynheader">
  95. Inheritance diagram for GridWidget:</div>
  96. <div class="dyncontent">
  97. <div class="center">
  98. <img src="class_grid_widget.png" usemap="#GridWidget_map" alt=""/>
  99. <map id="GridWidget_map" name="GridWidget_map">
  100. </map>
  101. </div></div>
  102. <table class="memberdecls">
  103. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
  104. Signals</h2></td></tr>
  105. <tr class="memitem:a03fb9de07df9c6d1e10050160ef0bce5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a03fb9de07df9c6d1e10050160ef0bce5"></a>
  106. void&#160;</td><td class="memItemRight" valign="bottom"><b>cellClicked</b> (QPoint pos)</td></tr>
  107. <tr class="separator:a03fb9de07df9c6d1e10050160ef0bce5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <tr class="memitem:a4fe89ce12f526ca7b48dda9a97398807"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4fe89ce12f526ca7b48dda9a97398807"></a>
  109. void&#160;</td><td class="memItemRight" valign="bottom"><b>canUndo</b> (bool can)</td></tr>
  110. <tr class="separator:a4fe89ce12f526ca7b48dda9a97398807"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <tr class="memitem:a476721515464b1217486a1a3e6f573fc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a476721515464b1217486a1a3e6f573fc"></a>
  112. void&#160;</td><td class="memItemRight" valign="bottom"><b>canRedo</b> (bool can)</td></tr>
  113. <tr class="separator:a476721515464b1217486a1a3e6f573fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. </table><table class="memberdecls">
  115. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  116. Public Member Functions</h2></td></tr>
  117. <tr class="memitem:ad3370c8905e4f03b666d1be221f4c412"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#ad3370c8905e4f03b666d1be221f4c412">GridWidget</a> (int rowCount=100, int columnCount=100, QWidget *parent=0)</td></tr>
  118. <tr class="memdesc:ad3370c8905e4f03b666d1be221f4c412"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor which receives the number of rows and columns in the grid. <a href="#ad3370c8905e4f03b666d1be221f4c412">More...</a><br /></td></tr>
  119. <tr class="separator:ad3370c8905e4f03b666d1be221f4c412"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a8d85ee082bf0dd38eb581697844f825d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a8d85ee082bf0dd38eb581697844f825d">GridWidget</a> (QWidget *parent)</td></tr>
  121. <tr class="memdesc:a8d85ee082bf0dd38eb581697844f825d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. The properties of the grid are set as follows: <a href="#a8d85ee082bf0dd38eb581697844f825d">More...</a><br /></td></tr>
  122. <tr class="separator:a8d85ee082bf0dd38eb581697844f825d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:a87a46b6a3e5522e851732093b757baae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a87a46b6a3e5522e851732093b757baae">setGridSize</a> (int rowCount, int columnCount)</td></tr>
  124. <tr class="memdesc:a87a46b6a3e5522e851732093b757baae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number of columns and rows of the grid. <a href="#a87a46b6a3e5522e851732093b757baae">More...</a><br /></td></tr>
  125. <tr class="separator:a87a46b6a3e5522e851732093b757baae"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:ace3447d5fc329c47b55395a52a9eaf13"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#ace3447d5fc329c47b55395a52a9eaf13">switchOn</a> (int x, int y, const QColor &amp;color)</td></tr>
  127. <tr class="memdesc:ace3447d5fc329c47b55395a52a9eaf13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves the given color and position in the vector that represents the painted cells of the grid. <a href="#ace3447d5fc329c47b55395a52a9eaf13">More...</a><br /></td></tr>
  128. <tr class="separator:ace3447d5fc329c47b55395a52a9eaf13"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:a50a2a9b2490de84dba08be23130fd9d4"><td class="memItemLeft" align="right" valign="top">QColor&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a50a2a9b2490de84dba08be23130fd9d4">getCellColor</a> (int x, int y)</td></tr>
  130. <tr class="memdesc:a50a2a9b2490de84dba08be23130fd9d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the color of the cell in position (x,y) <a href="#a50a2a9b2490de84dba08be23130fd9d4">More...</a><br /></td></tr>
  131. <tr class="separator:a50a2a9b2490de84dba08be23130fd9d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <tr class="memitem:aca84a4a79a25f1adebaeb69f32022882"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#aca84a4a79a25f1adebaeb69f32022882">switchOff</a> (int x, int y)</td></tr>
  133. <tr class="memdesc:aca84a4a79a25f1adebaeb69f32022882"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes the given position from the vector that represents the painted cells of the grid. <a href="#aca84a4a79a25f1adebaeb69f32022882">More...</a><br /></td></tr>
  134. <tr class="separator:aca84a4a79a25f1adebaeb69f32022882"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <tr class="memitem:a1b92c3f484ea93338f3c0b8348a334f9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a1b92c3f484ea93338f3c0b8348a334f9">getGridColumns</a> ()</td></tr>
  136. <tr class="memdesc:a1b92c3f484ea93338f3c0b8348a334f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of columns in the grid. <a href="#a1b92c3f484ea93338f3c0b8348a334f9">More...</a><br /></td></tr>
  137. <tr class="separator:a1b92c3f484ea93338f3c0b8348a334f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:afa1e34f8dbae400cf200fdeb2398f138"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#afa1e34f8dbae400cf200fdeb2398f138">getGridRows</a> ()</td></tr>
  139. <tr class="memdesc:afa1e34f8dbae400cf200fdeb2398f138"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of rows in the grid. <a href="#afa1e34f8dbae400cf200fdeb2398f138">More...</a><br /></td></tr>
  140. <tr class="separator:afa1e34f8dbae400cf200fdeb2398f138"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <tr class="memitem:a7979db95cc3533858a17946b8a70abe3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7979db95cc3533858a17946b8a70abe3"></a>
  142. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a7979db95cc3533858a17946b8a70abe3">clear</a> ()</td></tr>
  143. <tr class="memdesc:a7979db95cc3533858a17946b8a70abe3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the grid and sets it to its initial state. <br /></td></tr>
  144. <tr class="separator:a7979db95cc3533858a17946b8a70abe3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  145. <tr class="memitem:a8a128f08a3471f751442dfe1306250f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a8a128f08a3471f751442dfe1306250f4">setCellSize</a> (int size)</td></tr>
  146. <tr class="memdesc:a8a128f08a3471f751442dfe1306250f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the size of the cells in the grid. <a href="#a8a128f08a3471f751442dfe1306250f4">More...</a><br /></td></tr>
  147. <tr class="separator:a8a128f08a3471f751442dfe1306250f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  148. <tr class="memitem:a242812c406b269657eb6092af4a0ae7e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a242812c406b269657eb6092af4a0ae7e">setTool</a> (QString tool)</td></tr>
  149. <tr class="memdesc:a242812c406b269657eb6092af4a0ae7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the tool. <a href="#a242812c406b269657eb6092af4a0ae7e">More...</a><br /></td></tr>
  150. <tr class="separator:a242812c406b269657eb6092af4a0ae7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  151. <tr class="memitem:abe71249d6d54e84698dcb831c9df4c17"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#abe71249d6d54e84698dcb831c9df4c17">setFront</a> (QString front)</td></tr>
  152. <tr class="memdesc:abe71249d6d54e84698dcb831c9df4c17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the color of the brush. <a href="#abe71249d6d54e84698dcb831c9df4c17">More...</a><br /></td></tr>
  153. <tr class="separator:abe71249d6d54e84698dcb831c9df4c17"><td class="memSeparator" colspan="2">&#160;</td></tr>
  154. <tr class="memitem:a64cd0418127923278bd7dd3ddd3bd459"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a64cd0418127923278bd7dd3ddd3bd459">setBack</a> (QString back)</td></tr>
  155. <tr class="memdesc:a64cd0418127923278bd7dd3ddd3bd459"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the color of the background. <a href="#a64cd0418127923278bd7dd3ddd3bd459">More...</a><br /></td></tr>
  156. <tr class="separator:a64cd0418127923278bd7dd3ddd3bd459"><td class="memSeparator" colspan="2">&#160;</td></tr>
  157. <tr class="memitem:aca5c4e4edab002da08a7d76b7acf8ce7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#aca5c4e4edab002da08a7d76b7acf8ce7">setToolSize</a> (int size)</td></tr>
  158. <tr class="memdesc:aca5c4e4edab002da08a7d76b7acf8ce7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the size of the tool. <a href="#aca5c4e4edab002da08a7d76b7acf8ce7">More...</a><br /></td></tr>
  159. <tr class="separator:aca5c4e4edab002da08a7d76b7acf8ce7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  160. <tr class="memitem:ac4b7dcf1fd4f6f3f00f6c83837af762d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#ac4b7dcf1fd4f6f3f00f6c83837af762d">identifyTool</a> (QString tool, int x, int y)</td></tr>
  161. <tr class="memdesc:ac4b7dcf1fd4f6f3f00f6c83837af762d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is called on each mousePressEvent inside the grid. It identifies the way the grid will be painted calling the function of the tool received in the parameters (dot, rowfill, column fill, diagonal, square, triangles and circles). <a href="#ac4b7dcf1fd4f6f3f00f6c83837af762d">More...</a><br /></td></tr>
  162. <tr class="separator:ac4b7dcf1fd4f6f3f00f6c83837af762d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  163. <tr class="memitem:a9eae49724fc8eb51dacb29cf0f1d0f7f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a9eae49724fc8eb51dacb29cf0f1d0f7f">Dot</a> (int x, int y, QColor colorSelected)</td></tr>
  164. <tr class="memdesc:a9eae49724fc8eb51dacb29cf0f1d0f7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives the coordinates of the grid where the user clicked and paints that cell with the color of the tool. <a href="#a9eae49724fc8eb51dacb29cf0f1d0f7f">More...</a><br /></td></tr>
  165. <tr class="separator:a9eae49724fc8eb51dacb29cf0f1d0f7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  166. <tr class="memitem:a85f85cefe91f2c4e9c79566b5e65d5df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a85f85cefe91f2c4e9c79566b5e65d5df">RowMajorFill</a> (int x, int y, QColor colorClicked, QColor toolColor)</td></tr>
  167. <tr class="memdesc:a85f85cefe91f2c4e9c79566b5e65d5df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives the coordinates of the grid where the user clicked and paints (from that point left and right) the longest row of the same color of the cell that was clicked with the color of the tool. <a href="#a85f85cefe91f2c4e9c79566b5e65d5df">More...</a><br /></td></tr>
  168. <tr class="separator:a85f85cefe91f2c4e9c79566b5e65d5df"><td class="memSeparator" colspan="2">&#160;</td></tr>
  169. <tr class="memitem:a1850e0f0dde766350c7cff9668424633"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a1850e0f0dde766350c7cff9668424633">ColMajorFill</a> (int x, int y, QColor colorClicked, QColor toolColor)</td></tr>
  170. <tr class="memdesc:a1850e0f0dde766350c7cff9668424633"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives the coordinates of the grid where the user clicked and paints (from that point up and down) the longest column of the same color of the cell that was clicked with the color of the tool. <a href="#a1850e0f0dde766350c7cff9668424633">More...</a><br /></td></tr>
  171. <tr class="separator:a1850e0f0dde766350c7cff9668424633"><td class="memSeparator" colspan="2">&#160;</td></tr>
  172. <tr class="memitem:a2de94a6b9cda8d27be4598ebd2b80ef1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a2de94a6b9cda8d27be4598ebd2b80ef1">DiagonalLeft</a> (int x, int y, QColor colorClicked, QColor toolColor)</td></tr>
  173. <tr class="memdesc:a2de94a6b9cda8d27be4598ebd2b80ef1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Recieves the coordinates of the grid where the user clicked and paints (from that point) the longest left-diagonal of the color of the cell that was clicked with the color of the tool. <a href="#a2de94a6b9cda8d27be4598ebd2b80ef1">More...</a><br /></td></tr>
  174. <tr class="separator:a2de94a6b9cda8d27be4598ebd2b80ef1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  175. <tr class="memitem:a8ff474d6ac0e76685839e4107c85c10b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a8ff474d6ac0e76685839e4107c85c10b">DiagonalRight</a> (int x, int y, QColor colorClicked, QColor toolColor)</td></tr>
  176. <tr class="memdesc:a8ff474d6ac0e76685839e4107c85c10b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Recieves the coordinates of the grid where the user clicked and paints (from that point) the longest right-diagonal of the color of the cell that was clicked with the color of the tool. <a href="#a8ff474d6ac0e76685839e4107c85c10b">More...</a><br /></td></tr>
  177. <tr class="separator:a8ff474d6ac0e76685839e4107c85c10b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  178. <tr class="memitem:a3d25401530305223417a0a0313e7105b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a3d25401530305223417a0a0313e7105b">square</a> (int x, int y, QColor toolColor, int toolSize)</td></tr>
  179. <tr class="memdesc:a3d25401530305223417a0a0313e7105b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives the coordinates of the grid where the user clicked and paints a square of the size and with the color of the tool. <a href="#a3d25401530305223417a0a0313e7105b">More...</a><br /></td></tr>
  180. <tr class="separator:a3d25401530305223417a0a0313e7105b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  181. <tr class="memitem:abee64aeb022f670f15870500e9127cda"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#abee64aeb022f670f15870500e9127cda">triangle</a> (int x, int y, QColor toolColor, int toolSize)</td></tr>
  182. <tr class="memdesc:abee64aeb022f670f15870500e9127cda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives the coordinates of the grid where the user clicked and paints a triangle of the size and with the color of the tool. <a href="#abee64aeb022f670f15870500e9127cda">More...</a><br /></td></tr>
  183. <tr class="separator:abee64aeb022f670f15870500e9127cda"><td class="memSeparator" colspan="2">&#160;</td></tr>
  184. <tr class="memitem:a4de59f7c6dba342ff0406137ca87bf8d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a4de59f7c6dba342ff0406137ca87bf8d">circle</a> (int x, int y, QColor toolColor, int toolSize)</td></tr>
  185. <tr class="memdesc:a4de59f7c6dba342ff0406137ca87bf8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives the coordinates of the grid where the user clicked and paints a circle of the size and with the color of the tool. <a href="#a4de59f7c6dba342ff0406137ca87bf8d">More...</a><br /></td></tr>
  186. <tr class="separator:a4de59f7c6dba342ff0406137ca87bf8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  187. <tr class="memitem:a6426b82953f555dc84ede652cd44ee13"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6426b82953f555dc84ede652cd44ee13"></a>
  188. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a6426b82953f555dc84ede652cd44ee13">undo</a> ()</td></tr>
  189. <tr class="memdesc:a6426b82953f555dc84ede652cd44ee13"><td class="mdescLeft">&#160;</td><td class="mdescRight">When the undo button is pressed the current state is pushed into the redo vector(newStates) and the last state in the undo vector(oldStates) is painted on the grid. <br /></td></tr>
  190. <tr class="separator:a6426b82953f555dc84ede652cd44ee13"><td class="memSeparator" colspan="2">&#160;</td></tr>
  191. <tr class="memitem:a0a8b52721ac642d4f7261896ef2fff74"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a8b52721ac642d4f7261896ef2fff74"></a>
  192. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a0a8b52721ac642d4f7261896ef2fff74">redo</a> ()</td></tr>
  193. <tr class="memdesc:a0a8b52721ac642d4f7261896ef2fff74"><td class="mdescLeft">&#160;</td><td class="mdescRight">When the redo button is pressed the current state is pushed into the undo vector(oldStates) and the last state in the redo vector(newStates) is painted on the grid. <br /></td></tr>
  194. <tr class="separator:a0a8b52721ac642d4f7261896ef2fff74"><td class="memSeparator" colspan="2">&#160;</td></tr>
  195. </table><table class="memberdecls">
  196. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
  197. Protected Member Functions</h2></td></tr>
  198. <tr class="memitem:a2b49b1ee6683c99f4a497f7ad89e8097"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a2b49b1ee6683c99f4a497f7ad89e8097">drawGrid</a> (QPaintDevice *device)</td></tr>
  199. <tr class="memdesc:a2b49b1ee6683c99f4a497f7ad89e8097"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that first sets the size of the <a class="el" href="class_grid_widget.html">GridWidget</a>, then paints the cells with the color selected for the background and finally paints the lines to form the grid. <a href="#a2b49b1ee6683c99f4a497f7ad89e8097">More...</a><br /></td></tr>
  200. <tr class="separator:a2b49b1ee6683c99f4a497f7ad89e8097"><td class="memSeparator" colspan="2">&#160;</td></tr>
  201. <tr class="memitem:a727fa338640fe7e856519f4ed0078b33"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a727fa338640fe7e856519f4ed0078b33">paintEvent</a> (QPaintEvent *)</td></tr>
  202. <tr class="memdesc:a727fa338640fe7e856519f4ed0078b33"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is automatically invoked each time the widget or its parent receives a repaint signal. <a href="#a727fa338640fe7e856519f4ed0078b33">More...</a><br /></td></tr>
  203. <tr class="separator:a727fa338640fe7e856519f4ed0078b33"><td class="memSeparator" colspan="2">&#160;</td></tr>
  204. <tr class="memitem:adbd85c9494fa35df467d912e2eb41742"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#adbd85c9494fa35df467d912e2eb41742">mousePressEvent</a> (QMouseEvent *)</td></tr>
  205. <tr class="memdesc:adbd85c9494fa35df467d912e2eb41742"><td class="mdescLeft">&#160;</td><td class="mdescRight">When the mouse is clicked on a cell of the grid it gets the x,y coordinates of the mouse and uses them to paint the tool at that location. <a href="#adbd85c9494fa35df467d912e2eb41742">More...</a><br /></td></tr>
  206. <tr class="separator:adbd85c9494fa35df467d912e2eb41742"><td class="memSeparator" colspan="2">&#160;</td></tr>
  207. </table><table class="memberdecls">
  208. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
  209. Private Attributes</h2></td></tr>
  210. <tr class="memitem:a2913542510201e3e0c7fffe81abf0253"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a2913542510201e3e0c7fffe81abf0253">mCellSize</a></td></tr>
  211. <tr class="separator:a2913542510201e3e0c7fffe81abf0253"><td class="memSeparator" colspan="2">&#160;</td></tr>
  212. <tr class="memitem:a3d818ef6eb5868e53e26e1fd48f19057"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a3d818ef6eb5868e53e26e1fd48f19057">mRowCount</a></td></tr>
  213. <tr class="separator:a3d818ef6eb5868e53e26e1fd48f19057"><td class="memSeparator" colspan="2">&#160;</td></tr>
  214. <tr class="memitem:ab530d1fa7b44c05afe4e70c2e410e579"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#ab530d1fa7b44c05afe4e70c2e410e579">mColumnCount</a></td></tr>
  215. <tr class="separator:ab530d1fa7b44c05afe4e70c2e410e579"><td class="memSeparator" colspan="2">&#160;</td></tr>
  216. <tr class="memitem:a1b67bb85e389d27e03ef34e4f0b90750"><td class="memItemLeft" align="right" valign="top">QPixmap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a1b67bb85e389d27e03ef34e4f0b90750">mGridPix</a></td></tr>
  217. <tr class="separator:a1b67bb85e389d27e03ef34e4f0b90750"><td class="memSeparator" colspan="2">&#160;</td></tr>
  218. <tr class="memitem:a65644f377d72a22e4925ad21fc9ccbf5"><td class="memItemLeft" align="right" valign="top">QHash&lt; int, QColor &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a65644f377d72a22e4925ad21fc9ccbf5">mColors</a></td></tr>
  219. <tr class="separator:a65644f377d72a22e4925ad21fc9ccbf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  220. <tr class="memitem:a53e89b667667aed308430da93a25b7a1"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a53e89b667667aed308430da93a25b7a1">Tool</a></td></tr>
  221. <tr class="separator:a53e89b667667aed308430da93a25b7a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  222. <tr class="memitem:a48b162752c6e7853b2ce3c6cb8db5661"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a48b162752c6e7853b2ce3c6cb8db5661">ToolSize</a></td></tr>
  223. <tr class="separator:a48b162752c6e7853b2ce3c6cb8db5661"><td class="memSeparator" colspan="2">&#160;</td></tr>
  224. <tr class="memitem:a857bb9b33ae7f241a568f884f4e6f5bf"><td class="memItemLeft" align="right" valign="top">QColor&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a857bb9b33ae7f241a568f884f4e6f5bf">frontColor</a></td></tr>
  225. <tr class="separator:a857bb9b33ae7f241a568f884f4e6f5bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
  226. <tr class="memitem:aa36b97142702844f4888a9bbee37b670"><td class="memItemLeft" align="right" valign="top">QColor&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#aa36b97142702844f4888a9bbee37b670">backColor</a></td></tr>
  227. <tr class="separator:aa36b97142702844f4888a9bbee37b670"><td class="memSeparator" colspan="2">&#160;</td></tr>
  228. <tr class="memitem:a6afb043b34520019af1acb14fb4682d4"><td class="memItemLeft" align="right" valign="top">QColor&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a6afb043b34520019af1acb14fb4682d4">background</a></td></tr>
  229. <tr class="separator:a6afb043b34520019af1acb14fb4682d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  230. <tr class="memitem:aa41b383c851c5ef1c11871507aa1f28d"><td class="memItemLeft" align="right" valign="top">QVector&lt; QHash&lt; int, QColor &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#aa41b383c851c5ef1c11871507aa1f28d">oldStates</a></td></tr>
  231. <tr class="separator:aa41b383c851c5ef1c11871507aa1f28d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  232. <tr class="memitem:a8c84952dfa2f11876ab8f1346667c565"><td class="memItemLeft" align="right" valign="top">QVector&lt; QHash&lt; int, QColor &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_grid_widget.html#a8c84952dfa2f11876ab8f1346667c565">newStates</a></td></tr>
  233. <tr class="separator:a8c84952dfa2f11876ab8f1346667c565"><td class="memSeparator" colspan="2">&#160;</td></tr>
  234. </table>
  235. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  236. <div class="textblock"><p><a class="el" href="class_grid_widget.html">GridWidget</a>: Shows a GridView without scrolling. If you want to have Scroll option, use GridView instead. <a class="el" href="class_grid_widget.html">GridWidget</a> also supports mouse selection, sends the signal cellClicked with the associated grid coordinates. </p>
  237. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  238. <a class="anchor" id="ad3370c8905e4f03b666d1be221f4c412"></a>
  239. <div class="memitem">
  240. <div class="memproto">
  241. <table class="mlabels">
  242. <tr>
  243. <td class="mlabels-left">
  244. <table class="memname">
  245. <tr>
  246. <td class="memname">GridWidget::GridWidget </td>
  247. <td>(</td>
  248. <td class="paramtype">int&#160;</td>
  249. <td class="paramname"><em>rowCount</em> = <code>100</code>, </td>
  250. </tr>
  251. <tr>
  252. <td class="paramkey"></td>
  253. <td></td>
  254. <td class="paramtype">int&#160;</td>
  255. <td class="paramname"><em>columnCount</em> = <code>100</code>, </td>
  256. </tr>
  257. <tr>
  258. <td class="paramkey"></td>
  259. <td></td>
  260. <td class="paramtype">QWidget *&#160;</td>
  261. <td class="paramname"><em>parent</em> = <code>0</code>&#160;</td>
  262. </tr>
  263. <tr>
  264. <td></td>
  265. <td>)</td>
  266. <td></td><td></td>
  267. </tr>
  268. </table>
  269. </td>
  270. <td class="mlabels-right">
  271. <span class="mlabels"><span class="mlabel">explicit</span></span> </td>
  272. </tr>
  273. </table>
  274. </div><div class="memdoc">
  275. <p>Constructor which receives the number of rows and columns in the grid. </p>
  276. <dl class="params"><dt>Parameters</dt><dd>
  277. <table class="params">
  278. <tr><td class="paramname">rowCount</td><td>number of rows in the grid </td></tr>
  279. <tr><td class="paramname">columnCount</td><td>number of columns in the grid </td></tr>
  280. <tr><td class="paramname">parent</td><td>parent window</td></tr>
  281. </table>
  282. </dd>
  283. </dl>
  284. <p>Constructor que recibe el numero de filas y columnas en la cuadricula </p><dl class="params"><dt>Parameters</dt><dd>
  285. <table class="params">
  286. <tr><td class="paramname">rowCount</td><td>numero de filas en la cuadricula </td></tr>
  287. <tr><td class="paramname">columnCount</td><td>numero de columnas en la cuadricula </td></tr>
  288. <tr><td class="paramname">parent</td><td>ventana padre </td></tr>
  289. </table>
  290. </dd>
  291. </dl>
  292. </div>
  293. </div>
  294. <a class="anchor" id="a8d85ee082bf0dd38eb581697844f825d"></a>
  295. <div class="memitem">
  296. <div class="memproto">
  297. <table class="memname">
  298. <tr>
  299. <td class="memname">GridWidget::GridWidget </td>
  300. <td>(</td>
  301. <td class="paramtype">QWidget *&#160;</td>
  302. <td class="paramname"><em>parent</em></td><td>)</td>
  303. <td></td>
  304. </tr>
  305. </table>
  306. </div><div class="memdoc">
  307. <p>Default constructor. The properties of the grid are set as follows: </p>
  308. <ul>
  309. <li>mCellSize: Sets the size of the cell to 10px</li>
  310. <li>mRowCount: Sets the number of rows in the grid to 39</li>
  311. <li>mColumnCount: Sets the number of columns in the grid to 27</li>
  312. <li>Tool and ToolSize: Sets the Tool which is going to be used to draw the grid</li>
  313. <li>frontColor: The color which will be used to paint to black</li>
  314. <li>backColor: Current clicked square</li>
  315. <li>background: Sets the background color to white</li>
  316. </ul>
  317. <p>Constructor por defecto. Las propiedades de el grid se ajustan como sigue:</p><ul>
  318. <li>mCellSize: Ajusta el tamano de la celda a 10px</li>
  319. <li>mRowCount: Ajusta el numero de filas en la cuadricula a 39</li>
  320. <li>ColumnCount: Ajusta el numero de columnas en el grid a 27</li>
  321. <li>Tool and ToolSize: Ajusta la herramiento que se va a utilizar para dibujar el grid.</li>
  322. <li>frontColor: El color que se utilizara para pintar a negro</li>
  323. <li>backColor: Cuadrado marcado actualmente</li>
  324. <li>background: El color del fondo en blanco </li>
  325. </ul>
  326. </div>
  327. </div>
  328. <h2 class="groupheader">Member Function Documentation</h2>
  329. <a class="anchor" id="a4de59f7c6dba342ff0406137ca87bf8d"></a>
  330. <div class="memitem">
  331. <div class="memproto">
  332. <table class="memname">
  333. <tr>
  334. <td class="memname">void GridWidget::circle </td>
  335. <td>(</td>
  336. <td class="paramtype">int&#160;</td>
  337. <td class="paramname"><em>x</em>, </td>
  338. </tr>
  339. <tr>
  340. <td class="paramkey"></td>
  341. <td></td>
  342. <td class="paramtype">int&#160;</td>
  343. <td class="paramname"><em>y</em>, </td>
  344. </tr>
  345. <tr>
  346. <td class="paramkey"></td>
  347. <td></td>
  348. <td class="paramtype">QColor&#160;</td>
  349. <td class="paramname"><em>toolColor</em>, </td>
  350. </tr>
  351. <tr>
  352. <td class="paramkey"></td>
  353. <td></td>
  354. <td class="paramtype">int&#160;</td>
  355. <td class="paramname"><em>toolSize</em>&#160;</td>
  356. </tr>
  357. <tr>
  358. <td></td>
  359. <td>)</td>
  360. <td></td><td></td>
  361. </tr>
  362. </table>
  363. </div><div class="memdoc">
  364. <p>Receives the coordinates of the grid where the user clicked and paints a circle of the size and with the color of the tool. </p>
  365. <dl class="params"><dt>Parameters</dt><dd>
  366. <table class="params">
  367. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid </td></tr>
  368. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid </td></tr>
  369. <tr><td class="paramname">toolColor</td><td>color of the cells painted by the tool </td></tr>
  370. <tr><td class="paramname">toolSize</td><td>size of the tool to be painted </td></tr>
  371. </table>
  372. </dd>
  373. </dl>
  374. </div>
  375. </div>
  376. <a class="anchor" id="a1850e0f0dde766350c7cff9668424633"></a>
  377. <div class="memitem">
  378. <div class="memproto">
  379. <table class="memname">
  380. <tr>
  381. <td class="memname">void GridWidget::ColMajorFill </td>
  382. <td>(</td>
  383. <td class="paramtype">int&#160;</td>
  384. <td class="paramname"><em>x</em>, </td>
  385. </tr>
  386. <tr>
  387. <td class="paramkey"></td>
  388. <td></td>
  389. <td class="paramtype">int&#160;</td>
  390. <td class="paramname"><em>y</em>, </td>
  391. </tr>
  392. <tr>
  393. <td class="paramkey"></td>
  394. <td></td>
  395. <td class="paramtype">QColor&#160;</td>
  396. <td class="paramname"><em>colorClicked</em>, </td>
  397. </tr>
  398. <tr>
  399. <td class="paramkey"></td>
  400. <td></td>
  401. <td class="paramtype">QColor&#160;</td>
  402. <td class="paramname"><em>toolColor</em>&#160;</td>
  403. </tr>
  404. <tr>
  405. <td></td>
  406. <td>)</td>
  407. <td></td><td></td>
  408. </tr>
  409. </table>
  410. </div><div class="memdoc">
  411. <p>Receives the coordinates of the grid where the user clicked and paints (from that point up and down) the longest column of the same color of the cell that was clicked with the color of the tool. </p>
  412. <dl class="params"><dt>Parameters</dt><dd>
  413. <table class="params">
  414. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid </td></tr>
  415. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid </td></tr>
  416. <tr><td class="paramname">colorClicked</td><td>current color of the clicked cell </td></tr>
  417. <tr><td class="paramname">toolColor</td><td>color of the cells painted by the tool </td></tr>
  418. </table>
  419. </dd>
  420. </dl>
  421. </div>
  422. </div>
  423. <a class="anchor" id="a2de94a6b9cda8d27be4598ebd2b80ef1"></a>
  424. <div class="memitem">
  425. <div class="memproto">
  426. <table class="memname">
  427. <tr>
  428. <td class="memname">void GridWidget::DiagonalLeft </td>
  429. <td>(</td>
  430. <td class="paramtype">int&#160;</td>
  431. <td class="paramname"><em>x</em>, </td>
  432. </tr>
  433. <tr>
  434. <td class="paramkey"></td>
  435. <td></td>
  436. <td class="paramtype">int&#160;</td>
  437. <td class="paramname"><em>y</em>, </td>
  438. </tr>
  439. <tr>
  440. <td class="paramkey"></td>
  441. <td></td>
  442. <td class="paramtype">QColor&#160;</td>
  443. <td class="paramname"><em>colorClicked</em>, </td>
  444. </tr>
  445. <tr>
  446. <td class="paramkey"></td>
  447. <td></td>
  448. <td class="paramtype">QColor&#160;</td>
  449. <td class="paramname"><em>toolColor</em>&#160;</td>
  450. </tr>
  451. <tr>
  452. <td></td>
  453. <td>)</td>
  454. <td></td><td></td>
  455. </tr>
  456. </table>
  457. </div><div class="memdoc">
  458. <p>Recieves the coordinates of the grid where the user clicked and paints (from that point) the longest left-diagonal of the color of the cell that was clicked with the color of the tool. </p>
  459. <dl class="params"><dt>Parameters</dt><dd>
  460. <table class="params">
  461. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid </td></tr>
  462. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid </td></tr>
  463. <tr><td class="paramname">colorClicked</td><td>current color of the clicked cell </td></tr>
  464. <tr><td class="paramname">toolColor</td><td>color of the cells painted by the tool </td></tr>
  465. </table>
  466. </dd>
  467. </dl>
  468. </div>
  469. </div>
  470. <a class="anchor" id="a8ff474d6ac0e76685839e4107c85c10b"></a>
  471. <div class="memitem">
  472. <div class="memproto">
  473. <table class="memname">
  474. <tr>
  475. <td class="memname">void GridWidget::DiagonalRight </td>
  476. <td>(</td>
  477. <td class="paramtype">int&#160;</td>
  478. <td class="paramname"><em>x</em>, </td>
  479. </tr>
  480. <tr>
  481. <td class="paramkey"></td>
  482. <td></td>
  483. <td class="paramtype">int&#160;</td>
  484. <td class="paramname"><em>y</em>, </td>
  485. </tr>
  486. <tr>
  487. <td class="paramkey"></td>
  488. <td></td>
  489. <td class="paramtype">QColor&#160;</td>
  490. <td class="paramname"><em>colorClicked</em>, </td>
  491. </tr>
  492. <tr>
  493. <td class="paramkey"></td>
  494. <td></td>
  495. <td class="paramtype">QColor&#160;</td>
  496. <td class="paramname"><em>toolColor</em>&#160;</td>
  497. </tr>
  498. <tr>
  499. <td></td>
  500. <td>)</td>
  501. <td></td><td></td>
  502. </tr>
  503. </table>
  504. </div><div class="memdoc">
  505. <p>Recieves the coordinates of the grid where the user clicked and paints (from that point) the longest right-diagonal of the color of the cell that was clicked with the color of the tool. </p>
  506. <dl class="params"><dt>Parameters</dt><dd>
  507. <table class="params">
  508. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid </td></tr>
  509. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid </td></tr>
  510. <tr><td class="paramname">colorClicked</td><td>current color of the clicked cell </td></tr>
  511. <tr><td class="paramname">toolColor</td><td>color of the cells painted by the tool </td></tr>
  512. </table>
  513. </dd>
  514. </dl>
  515. </div>
  516. </div>
  517. <a class="anchor" id="a9eae49724fc8eb51dacb29cf0f1d0f7f"></a>
  518. <div class="memitem">
  519. <div class="memproto">
  520. <table class="memname">
  521. <tr>
  522. <td class="memname">void GridWidget::Dot </td>
  523. <td>(</td>
  524. <td class="paramtype">int&#160;</td>
  525. <td class="paramname"><em>x</em>, </td>
  526. </tr>
  527. <tr>
  528. <td class="paramkey"></td>
  529. <td></td>
  530. <td class="paramtype">int&#160;</td>
  531. <td class="paramname"><em>y</em>, </td>
  532. </tr>
  533. <tr>
  534. <td class="paramkey"></td>
  535. <td></td>
  536. <td class="paramtype">QColor&#160;</td>
  537. <td class="paramname"><em>toolColor</em>&#160;</td>
  538. </tr>
  539. <tr>
  540. <td></td>
  541. <td>)</td>
  542. <td></td><td></td>
  543. </tr>
  544. </table>
  545. </div><div class="memdoc">
  546. <p>Receives the coordinates of the grid where the user clicked and paints that cell with the color of the tool. </p>
  547. <dl class="params"><dt>Parameters</dt><dd>
  548. <table class="params">
  549. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid </td></tr>
  550. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid </td></tr>
  551. <tr><td class="paramname">toolColor</td><td>color of the cells painted by the tool </td></tr>
  552. </table>
  553. </dd>
  554. </dl>
  555. </div>
  556. </div>
  557. <a class="anchor" id="a2b49b1ee6683c99f4a497f7ad89e8097"></a>
  558. <div class="memitem">
  559. <div class="memproto">
  560. <table class="mlabels">
  561. <tr>
  562. <td class="mlabels-left">
  563. <table class="memname">
  564. <tr>
  565. <td class="memname">void GridWidget::drawGrid </td>
  566. <td>(</td>
  567. <td class="paramtype">QPaintDevice *&#160;</td>
  568. <td class="paramname"><em>device</em></td><td>)</td>
  569. <td></td>
  570. </tr>
  571. </table>
  572. </td>
  573. <td class="mlabels-right">
  574. <span class="mlabels"><span class="mlabel">protected</span></span> </td>
  575. </tr>
  576. </table>
  577. </div><div class="memdoc">
  578. <p>Function that first sets the size of the <a class="el" href="class_grid_widget.html">GridWidget</a>, then paints the cells with the color selected for the background and finally paints the lines to form the grid. </p>
  579. <dl class="params"><dt>Parameters</dt><dd>
  580. <table class="params">
  581. <tr><td class="paramname">device</td><td>the panel to paint the grid </td></tr>
  582. </table>
  583. </dd>
  584. </dl>
  585. </div>
  586. </div>
  587. <a class="anchor" id="a50a2a9b2490de84dba08be23130fd9d4"></a>
  588. <div class="memitem">
  589. <div class="memproto">
  590. <table class="memname">
  591. <tr>
  592. <td class="memname">QColor GridWidget::getCellColor </td>
  593. <td>(</td>
  594. <td class="paramtype">int&#160;</td>
  595. <td class="paramname"><em>x</em>, </td>
  596. </tr>
  597. <tr>
  598. <td class="paramkey"></td>
  599. <td></td>
  600. <td class="paramtype">int&#160;</td>
  601. <td class="paramname"><em>y</em>&#160;</td>
  602. </tr>
  603. <tr>
  604. <td></td>
  605. <td>)</td>
  606. <td></td><td></td>
  607. </tr>
  608. </table>
  609. </div><div class="memdoc">
  610. <p>Returns the color of the cell in position (x,y) </p>
  611. <dl class="params"><dt>Parameters</dt><dd>
  612. <table class="params">
  613. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid </td></tr>
  614. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid </td></tr>
  615. </table>
  616. </dd>
  617. </dl>
  618. <dl class="section return"><dt>Returns</dt><dd>the color of the cell </dd></dl>
  619. </div>
  620. </div>
  621. <a class="anchor" id="a1b92c3f484ea93338f3c0b8348a334f9"></a>
  622. <div class="memitem">
  623. <div class="memproto">
  624. <table class="memname">
  625. <tr>
  626. <td class="memname">int GridWidget::getGridColumns </td>
  627. <td>(</td>
  628. <td class="paramname"></td><td>)</td>
  629. <td></td>
  630. </tr>
  631. </table>
  632. </div><div class="memdoc">
  633. <p>Returns the number of columns in the grid. </p>
  634. <dl class="section return"><dt>Returns</dt><dd>number of columns in the grid </dd></dl>
  635. </div>
  636. </div>
  637. <a class="anchor" id="afa1e34f8dbae400cf200fdeb2398f138"></a>
  638. <div class="memitem">
  639. <div class="memproto">
  640. <table class="memname">
  641. <tr>
  642. <td class="memname">int GridWidget::getGridRows </td>
  643. <td>(</td>
  644. <td class="paramname"></td><td>)</td>
  645. <td></td>
  646. </tr>
  647. </table>
  648. </div><div class="memdoc">
  649. <p>Returns the number of rows in the grid. </p>
  650. <dl class="section return"><dt>Returns</dt><dd>number of rows in the grid </dd></dl>
  651. </div>
  652. </div>
  653. <a class="anchor" id="ac4b7dcf1fd4f6f3f00f6c83837af762d"></a>
  654. <div class="memitem">
  655. <div class="memproto">
  656. <table class="memname">
  657. <tr>
  658. <td class="memname">void GridWidget::identifyTool </td>
  659. <td>(</td>
  660. <td class="paramtype">QString&#160;</td>
  661. <td class="paramname"><em>tool</em>, </td>
  662. </tr>
  663. <tr>
  664. <td class="paramkey"></td>
  665. <td></td>
  666. <td class="paramtype">int&#160;</td>
  667. <td class="paramname"><em>x</em>, </td>
  668. </tr>
  669. <tr>
  670. <td class="paramkey"></td>
  671. <td></td>
  672. <td class="paramtype">int&#160;</td>
  673. <td class="paramname"><em>y</em>&#160;</td>
  674. </tr>
  675. <tr>
  676. <td></td>
  677. <td>)</td>
  678. <td></td><td></td>
  679. </tr>
  680. </table>
  681. </div><div class="memdoc">
  682. <p>This function is called on each mousePressEvent inside the grid. It identifies the way the grid will be painted calling the function of the tool received in the parameters (dot, rowfill, column fill, diagonal, square, triangles and circles). </p>
  683. <dl class="params"><dt>Parameters</dt><dd>
  684. <table class="params">
  685. <tr><td class="paramname">tool</td><td>the tool to be called by the funtion </td></tr>
  686. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid. </td></tr>
  687. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid. </td></tr>
  688. </table>
  689. </dd>
  690. </dl>
  691. </div>
  692. </div>
  693. <a class="anchor" id="adbd85c9494fa35df467d912e2eb41742"></a>
  694. <div class="memitem">
  695. <div class="memproto">
  696. <table class="mlabels">
  697. <tr>
  698. <td class="mlabels-left">
  699. <table class="memname">
  700. <tr>
  701. <td class="memname">void GridWidget::mousePressEvent </td>
  702. <td>(</td>
  703. <td class="paramtype">QMouseEvent *&#160;</td>
  704. <td class="paramname"><em>event</em></td><td>)</td>
  705. <td></td>
  706. </tr>
  707. </table>
  708. </td>
  709. <td class="mlabels-right">
  710. <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
  711. </tr>
  712. </table>
  713. </div><div class="memdoc">
  714. <p>When the mouse is clicked on a cell of the grid it gets the x,y coordinates of the mouse and uses them to paint the tool at that location. </p>
  715. <dl class="params"><dt>Parameters</dt><dd>
  716. <table class="params">
  717. <tr><td class="paramname">event</td><td>received event reference </td></tr>
  718. </table>
  719. </dd>
  720. </dl>
  721. </div>
  722. </div>
  723. <a class="anchor" id="a727fa338640fe7e856519f4ed0078b33"></a>
  724. <div class="memitem">
  725. <div class="memproto">
  726. <table class="mlabels">
  727. <tr>
  728. <td class="mlabels-left">
  729. <table class="memname">
  730. <tr>
  731. <td class="memname">void GridWidget::paintEvent </td>
  732. <td>(</td>
  733. <td class="paramtype">QPaintEvent *&#160;</td>
  734. <td class="paramname"><em>event</em></td><td>)</td>
  735. <td></td>
  736. </tr>
  737. </table>
  738. </td>
  739. <td class="mlabels-right">
  740. <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
  741. </tr>
  742. </table>
  743. </div><div class="memdoc">
  744. <p>This function is automatically invoked each time the widget or its parent receives a repaint signal. </p>
  745. <dl class="params"><dt>Parameters</dt><dd>
  746. <table class="params">
  747. <tr><td class="paramname">event</td><td>received event reference </td></tr>
  748. </table>
  749. </dd>
  750. </dl>
  751. </div>
  752. </div>
  753. <a class="anchor" id="a85f85cefe91f2c4e9c79566b5e65d5df"></a>
  754. <div class="memitem">
  755. <div class="memproto">
  756. <table class="memname">
  757. <tr>
  758. <td class="memname">void GridWidget::RowMajorFill </td>
  759. <td>(</td>
  760. <td class="paramtype">int&#160;</td>
  761. <td class="paramname"><em>x</em>, </td>
  762. </tr>
  763. <tr>
  764. <td class="paramkey"></td>
  765. <td></td>
  766. <td class="paramtype">int&#160;</td>
  767. <td class="paramname"><em>y</em>, </td>
  768. </tr>
  769. <tr>
  770. <td class="paramkey"></td>
  771. <td></td>
  772. <td class="paramtype">QColor&#160;</td>
  773. <td class="paramname"><em>colorClicked</em>, </td>
  774. </tr>
  775. <tr>
  776. <td class="paramkey"></td>
  777. <td></td>
  778. <td class="paramtype">QColor&#160;</td>
  779. <td class="paramname"><em>toolColor</em>&#160;</td>
  780. </tr>
  781. <tr>
  782. <td></td>
  783. <td>)</td>
  784. <td></td><td></td>
  785. </tr>
  786. </table>
  787. </div><div class="memdoc">
  788. <p>Receives the coordinates of the grid where the user clicked and paints (from that point left and right) the longest row of the same color of the cell that was clicked with the color of the tool. </p>
  789. <dl class="params"><dt>Parameters</dt><dd>
  790. <table class="params">
  791. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid </td></tr>
  792. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid </td></tr>
  793. <tr><td class="paramname">colorClicked</td><td>current color of the clicked cell </td></tr>
  794. <tr><td class="paramname">toolColor</td><td>color of the cells painted by the tool </td></tr>
  795. </table>
  796. </dd>
  797. </dl>
  798. </div>
  799. </div>
  800. <a class="anchor" id="a64cd0418127923278bd7dd3ddd3bd459"></a>
  801. <div class="memitem">
  802. <div class="memproto">
  803. <table class="memname">
  804. <tr>
  805. <td class="memname">void GridWidget::setBack </td>
  806. <td>(</td>
  807. <td class="paramtype">QString&#160;</td>
  808. <td class="paramname"><em>back</em></td><td>)</td>
  809. <td></td>
  810. </tr>
  811. </table>
  812. </div><div class="memdoc">
  813. <p>Sets the color of the background. </p>
  814. <dl class="params"><dt>Parameters</dt><dd>
  815. <table class="params">
  816. <tr><td class="paramname">back</td><td>background color </td></tr>
  817. </table>
  818. </dd>
  819. </dl>
  820. </div>
  821. </div>
  822. <a class="anchor" id="a8a128f08a3471f751442dfe1306250f4"></a>
  823. <div class="memitem">
  824. <div class="memproto">
  825. <table class="memname">
  826. <tr>
  827. <td class="memname">void GridWidget::setCellSize </td>
  828. <td>(</td>
  829. <td class="paramtype">int&#160;</td>
  830. <td class="paramname"><em>size</em></td><td>)</td>
  831. <td></td>
  832. </tr>
  833. </table>
  834. </div><div class="memdoc">
  835. <p>Sets the size of the cells in the grid. </p>
  836. <dl class="params"><dt>Parameters</dt><dd>
  837. <table class="params">
  838. <tr><td class="paramname">size</td><td>cell size </td></tr>
  839. </table>
  840. </dd>
  841. </dl>
  842. </div>
  843. </div>
  844. <a class="anchor" id="abe71249d6d54e84698dcb831c9df4c17"></a>
  845. <div class="memitem">
  846. <div class="memproto">
  847. <table class="memname">
  848. <tr>
  849. <td class="memname">void GridWidget::setFront </td>
  850. <td>(</td>
  851. <td class="paramtype">QString&#160;</td>
  852. <td class="paramname"><em>front</em></td><td>)</td>
  853. <td></td>
  854. </tr>
  855. </table>
  856. </div><div class="memdoc">
  857. <p>Sets the color of the brush. </p>
  858. <dl class="params"><dt>Parameters</dt><dd>
  859. <table class="params">
  860. <tr><td class="paramname">front</td><td>brush color </td></tr>
  861. </table>
  862. </dd>
  863. </dl>
  864. </div>
  865. </div>
  866. <a class="anchor" id="a87a46b6a3e5522e851732093b757baae"></a>
  867. <div class="memitem">
  868. <div class="memproto">
  869. <table class="memname">
  870. <tr>
  871. <td class="memname">void GridWidget::setGridSize </td>
  872. <td>(</td>
  873. <td class="paramtype">int&#160;</td>
  874. <td class="paramname"><em>rowCount</em>, </td>
  875. </tr>
  876. <tr>
  877. <td class="paramkey"></td>
  878. <td></td>
  879. <td class="paramtype">int&#160;</td>
  880. <td class="paramname"><em>columnCount</em>&#160;</td>
  881. </tr>
  882. <tr>
  883. <td></td>
  884. <td>)</td>
  885. <td></td><td></td>
  886. </tr>
  887. </table>
  888. </div><div class="memdoc">
  889. <p>Sets the number of columns and rows of the grid. </p>
  890. <dl class="params"><dt>Parameters</dt><dd>
  891. <table class="params">
  892. <tr><td class="paramname">rowCount</td><td>number of rows </td></tr>
  893. <tr><td class="paramname">columnCount</td><td>number of columns </td></tr>
  894. </table>
  895. </dd>
  896. </dl>
  897. </div>
  898. </div>
  899. <a class="anchor" id="a242812c406b269657eb6092af4a0ae7e"></a>
  900. <div class="memitem">
  901. <div class="memproto">
  902. <table class="memname">
  903. <tr>
  904. <td class="memname">void GridWidget::setTool </td>
  905. <td>(</td>
  906. <td class="paramtype">QString&#160;</td>
  907. <td class="paramname"><em>tool</em></td><td>)</td>
  908. <td></td>
  909. </tr>
  910. </table>
  911. </div><div class="memdoc">
  912. <p>Sets the tool. </p>
  913. <dl class="params"><dt>Parameters</dt><dd>
  914. <table class="params">
  915. <tr><td class="paramname">tool</td><td>choosen tool </td></tr>
  916. <tr><td class="paramname">tool</td><td>herramienta escogida </td></tr>
  917. </table>
  918. </dd>
  919. </dl>
  920. </div>
  921. </div>
  922. <a class="anchor" id="aca5c4e4edab002da08a7d76b7acf8ce7"></a>
  923. <div class="memitem">
  924. <div class="memproto">
  925. <table class="memname">
  926. <tr>
  927. <td class="memname">void GridWidget::setToolSize </td>
  928. <td>(</td>
  929. <td class="paramtype">int&#160;</td>
  930. <td class="paramname"><em>size</em></td><td>)</td>
  931. <td></td>
  932. </tr>
  933. </table>
  934. </div><div class="memdoc">
  935. <p>Sets the size of the tool. </p>
  936. <dl class="params"><dt>Parameters</dt><dd>
  937. <table class="params">
  938. <tr><td class="paramname">size</td><td>tool size </td></tr>
  939. </table>
  940. </dd>
  941. </dl>
  942. </div>
  943. </div>
  944. <a class="anchor" id="a3d25401530305223417a0a0313e7105b"></a>
  945. <div class="memitem">
  946. <div class="memproto">
  947. <table class="memname">
  948. <tr>
  949. <td class="memname">void GridWidget::square </td>
  950. <td>(</td>
  951. <td class="paramtype">int&#160;</td>
  952. <td class="paramname"><em>x</em>, </td>
  953. </tr>
  954. <tr>
  955. <td class="paramkey"></td>
  956. <td></td>
  957. <td class="paramtype">int&#160;</td>
  958. <td class="paramname"><em>y</em>, </td>
  959. </tr>
  960. <tr>
  961. <td class="paramkey"></td>
  962. <td></td>
  963. <td class="paramtype">QColor&#160;</td>
  964. <td class="paramname"><em>toolColor</em>, </td>
  965. </tr>
  966. <tr>
  967. <td class="paramkey"></td>
  968. <td></td>
  969. <td class="paramtype">int&#160;</td>
  970. <td class="paramname"><em>toolSize</em>&#160;</td>
  971. </tr>
  972. <tr>
  973. <td></td>
  974. <td>)</td>
  975. <td></td><td></td>
  976. </tr>
  977. </table>
  978. </div><div class="memdoc">
  979. <p>Receives the coordinates of the grid where the user clicked and paints a square of the size and with the color of the tool. </p>
  980. <dl class="params"><dt>Parameters</dt><dd>
  981. <table class="params">
  982. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid </td></tr>
  983. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid </td></tr>
  984. <tr><td class="paramname">toolColor</td><td>color of the cells painted by the tool </td></tr>
  985. <tr><td class="paramname">toolSize</td><td>size of the tool to be painted </td></tr>
  986. </table>
  987. </dd>
  988. </dl>
  989. </div>
  990. </div>
  991. <a class="anchor" id="aca84a4a79a25f1adebaeb69f32022882"></a>
  992. <div class="memitem">
  993. <div class="memproto">
  994. <table class="memname">
  995. <tr>
  996. <td class="memname">void GridWidget::switchOff </td>
  997. <td>(</td>
  998. <td class="paramtype">int&#160;</td>
  999. <td class="paramname"><em>x</em>, </td>
  1000. </tr>
  1001. <tr>
  1002. <td class="paramkey"></td>
  1003. <td></td>
  1004. <td class="paramtype">int&#160;</td>
  1005. <td class="paramname"><em>y</em>&#160;</td>
  1006. </tr>
  1007. <tr>
  1008. <td></td>
  1009. <td>)</td>
  1010. <td></td><td></td>
  1011. </tr>
  1012. </table>
  1013. </div><div class="memdoc">
  1014. <p>Removes the given position from the vector that represents the painted cells of the grid. </p>
  1015. <dl class="params"><dt>Parameters</dt><dd>
  1016. <table class="params">
  1017. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid </td></tr>
  1018. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid </td></tr>
  1019. </table>
  1020. </dd>
  1021. </dl>
  1022. </div>
  1023. </div>
  1024. <a class="anchor" id="ace3447d5fc329c47b55395a52a9eaf13"></a>
  1025. <div class="memitem">
  1026. <div class="memproto">
  1027. <table class="memname">
  1028. <tr>
  1029. <td class="memname">void GridWidget::switchOn </td>
  1030. <td>(</td>
  1031. <td class="paramtype">int&#160;</td>
  1032. <td class="paramname"><em>x</em>, </td>
  1033. </tr>
  1034. <tr>
  1035. <td class="paramkey"></td>
  1036. <td></td>
  1037. <td class="paramtype">int&#160;</td>
  1038. <td class="paramname"><em>y</em>, </td>
  1039. </tr>
  1040. <tr>
  1041. <td class="paramkey"></td>
  1042. <td></td>
  1043. <td class="paramtype">const QColor &amp;&#160;</td>
  1044. <td class="paramname"><em>color</em>&#160;</td>
  1045. </tr>
  1046. <tr>
  1047. <td></td>
  1048. <td>)</td>
  1049. <td></td><td></td>
  1050. </tr>
  1051. </table>
  1052. </div><div class="memdoc">
  1053. <p>Saves the given color and position in the vector that represents the painted cells of the grid. </p>
  1054. <dl class="params"><dt>Parameters</dt><dd>
  1055. <table class="params">
  1056. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid </td></tr>
  1057. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid </td></tr>
  1058. <tr><td class="paramname">color</td><td>color to paint cell </td></tr>
  1059. </table>
  1060. </dd>
  1061. </dl>
  1062. </div>
  1063. </div>
  1064. <a class="anchor" id="abee64aeb022f670f15870500e9127cda"></a>
  1065. <div class="memitem">
  1066. <div class="memproto">
  1067. <table class="memname">
  1068. <tr>
  1069. <td class="memname">void GridWidget::triangle </td>
  1070. <td>(</td>
  1071. <td class="paramtype">int&#160;</td>
  1072. <td class="paramname"><em>x</em>, </td>
  1073. </tr>
  1074. <tr>
  1075. <td class="paramkey"></td>
  1076. <td></td>
  1077. <td class="paramtype">int&#160;</td>
  1078. <td class="paramname"><em>y</em>, </td>
  1079. </tr>
  1080. <tr>
  1081. <td class="paramkey"></td>
  1082. <td></td>
  1083. <td class="paramtype">QColor&#160;</td>
  1084. <td class="paramname"><em>toolColor</em>, </td>
  1085. </tr>
  1086. <tr>
  1087. <td class="paramkey"></td>
  1088. <td></td>
  1089. <td class="paramtype">int&#160;</td>
  1090. <td class="paramname"><em>toolSize</em>&#160;</td>
  1091. </tr>
  1092. <tr>
  1093. <td></td>
  1094. <td>)</td>
  1095. <td></td><td></td>
  1096. </tr>
  1097. </table>
  1098. </div><div class="memdoc">
  1099. <p>Receives the coordinates of the grid where the user clicked and paints a triangle of the size and with the color of the tool. </p>
  1100. <dl class="params"><dt>Parameters</dt><dd>
  1101. <table class="params">
  1102. <tr><td class="paramname">x</td><td>coordinate x of the cell in the grid </td></tr>
  1103. <tr><td class="paramname">y</td><td>coordinate y of the cell in the grid </td></tr>
  1104. <tr><td class="paramname">toolColor</td><td>color of the cells painted by the tool </td></tr>
  1105. <tr><td class="paramname">toolSize</td><td>size of the tool to be painted </td></tr>
  1106. </table>
  1107. </dd>
  1108. </dl>
  1109. </div>
  1110. </div>
  1111. <h2 class="groupheader">Member Data Documentation</h2>
  1112. <a class="anchor" id="aa36b97142702844f4888a9bbee37b670"></a>
  1113. <div class="memitem">
  1114. <div class="memproto">
  1115. <table class="mlabels">
  1116. <tr>
  1117. <td class="mlabels-left">
  1118. <table class="memname">
  1119. <tr>
  1120. <td class="memname">QColor GridWidget::backColor</td>
  1121. </tr>
  1122. </table>
  1123. </td>
  1124. <td class="mlabels-right">
  1125. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1126. </tr>
  1127. </table>
  1128. </div><div class="memdoc">
  1129. <p>background color of the cell / color del fondo de la celda </p>
  1130. </div>
  1131. </div>
  1132. <a class="anchor" id="a6afb043b34520019af1acb14fb4682d4"></a>
  1133. <div class="memitem">
  1134. <div class="memproto">
  1135. <table class="mlabels">
  1136. <tr>
  1137. <td class="mlabels-left">
  1138. <table class="memname">
  1139. <tr>
  1140. <td class="memname">QColor GridWidget::background</td>
  1141. </tr>
  1142. </table>
  1143. </td>
  1144. <td class="mlabels-right">
  1145. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1146. </tr>
  1147. </table>
  1148. </div><div class="memdoc">
  1149. <p>cell size / tamano del la celda </p>
  1150. </div>
  1151. </div>
  1152. <a class="anchor" id="a857bb9b33ae7f241a568f884f4e6f5bf"></a>
  1153. <div class="memitem">
  1154. <div class="memproto">
  1155. <table class="mlabels">
  1156. <tr>
  1157. <td class="mlabels-left">
  1158. <table class="memname">
  1159. <tr>
  1160. <td class="memname">QColor GridWidget::frontColor</td>
  1161. </tr>
  1162. </table>
  1163. </td>
  1164. <td class="mlabels-right">
  1165. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1166. </tr>
  1167. </table>
  1168. </div><div class="memdoc">
  1169. <p>color of the front cell / color de la celda de frente </p>
  1170. </div>
  1171. </div>
  1172. <a class="anchor" id="a2913542510201e3e0c7fffe81abf0253"></a>
  1173. <div class="memitem">
  1174. <div class="memproto">
  1175. <table class="mlabels">
  1176. <tr>
  1177. <td class="mlabels-left">
  1178. <table class="memname">
  1179. <tr>
  1180. <td class="memname">int GridWidget::mCellSize</td>
  1181. </tr>
  1182. </table>
  1183. </td>
  1184. <td class="mlabels-right">
  1185. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1186. </tr>
  1187. </table>
  1188. </div><div class="memdoc">
  1189. <p>cell size / tamano del la celda </p>
  1190. </div>
  1191. </div>
  1192. <a class="anchor" id="a65644f377d72a22e4925ad21fc9ccbf5"></a>
  1193. <div class="memitem">
  1194. <div class="memproto">
  1195. <table class="mlabels">
  1196. <tr>
  1197. <td class="mlabels-left">
  1198. <table class="memname">
  1199. <tr>
  1200. <td class="memname">QHash&lt;int, QColor &gt; GridWidget::mColors</td>
  1201. </tr>
  1202. </table>
  1203. </td>
  1204. <td class="mlabels-right">
  1205. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1206. </tr>
  1207. </table>
  1208. </div><div class="memdoc">
  1209. <p>Hash of colors with the painted cells and their colors / Hash de colores con las celdas pintadas y sus colores </p>
  1210. </div>
  1211. </div>
  1212. <a class="anchor" id="ab530d1fa7b44c05afe4e70c2e410e579"></a>
  1213. <div class="memitem">
  1214. <div class="memproto">
  1215. <table class="mlabels">
  1216. <tr>
  1217. <td class="mlabels-left">
  1218. <table class="memname">
  1219. <tr>
  1220. <td class="memname">int GridWidget::mColumnCount</td>
  1221. </tr>
  1222. </table>
  1223. </td>
  1224. <td class="mlabels-right">
  1225. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1226. </tr>
  1227. </table>
  1228. </div><div class="memdoc">
  1229. <p>column number / numero de columnas </p>
  1230. </div>
  1231. </div>
  1232. <a class="anchor" id="a1b67bb85e389d27e03ef34e4f0b90750"></a>
  1233. <div class="memitem">
  1234. <div class="memproto">
  1235. <table class="mlabels">
  1236. <tr>
  1237. <td class="mlabels-left">
  1238. <table class="memname">
  1239. <tr>
  1240. <td class="memname">QPixmap GridWidget::mGridPix</td>
  1241. </tr>
  1242. </table>
  1243. </td>
  1244. <td class="mlabels-right">
  1245. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1246. </tr>
  1247. </table>
  1248. </div><div class="memdoc">
  1249. <p>to paint the grid / para pintar la cuadricula </p>
  1250. </div>
  1251. </div>
  1252. <a class="anchor" id="a3d818ef6eb5868e53e26e1fd48f19057"></a>
  1253. <div class="memitem">
  1254. <div class="memproto">
  1255. <table class="mlabels">
  1256. <tr>
  1257. <td class="mlabels-left">
  1258. <table class="memname">
  1259. <tr>
  1260. <td class="memname">int GridWidget::mRowCount</td>
  1261. </tr>
  1262. </table>
  1263. </td>
  1264. <td class="mlabels-right">
  1265. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1266. </tr>
  1267. </table>
  1268. </div><div class="memdoc">
  1269. <p>row number / numero de filas </p>
  1270. </div>
  1271. </div>
  1272. <a class="anchor" id="a8c84952dfa2f11876ab8f1346667c565"></a>
  1273. <div class="memitem">
  1274. <div class="memproto">
  1275. <table class="mlabels">
  1276. <tr>
  1277. <td class="mlabels-left">
  1278. <table class="memname">
  1279. <tr>
  1280. <td class="memname">QVector&lt; QHash&lt;int, QColor &gt; &gt; GridWidget::newStates</td>
  1281. </tr>
  1282. </table>
  1283. </td>
  1284. <td class="mlabels-right">
  1285. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1286. </tr>
  1287. </table>
  1288. </div><div class="memdoc">
  1289. <p>vector to implement undo/redo </p>
  1290. </div>
  1291. </div>
  1292. <a class="anchor" id="aa41b383c851c5ef1c11871507aa1f28d"></a>
  1293. <div class="memitem">
  1294. <div class="memproto">
  1295. <table class="mlabels">
  1296. <tr>
  1297. <td class="mlabels-left">
  1298. <table class="memname">
  1299. <tr>
  1300. <td class="memname">QVector&lt; QHash&lt;int, QColor &gt; &gt; GridWidget::oldStates</td>
  1301. </tr>
  1302. </table>
  1303. </td>
  1304. <td class="mlabels-right">
  1305. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1306. </tr>
  1307. </table>
  1308. </div><div class="memdoc">
  1309. <p>vetor to implement undo/redo </p>
  1310. </div>
  1311. </div>
  1312. <a class="anchor" id="a53e89b667667aed308430da93a25b7a1"></a>
  1313. <div class="memitem">
  1314. <div class="memproto">
  1315. <table class="mlabels">
  1316. <tr>
  1317. <td class="mlabels-left">
  1318. <table class="memname">
  1319. <tr>
  1320. <td class="memname">QString GridWidget::Tool</td>
  1321. </tr>
  1322. </table>
  1323. </td>
  1324. <td class="mlabels-right">
  1325. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1326. </tr>
  1327. </table>
  1328. </div><div class="memdoc">
  1329. <p>name of the tool selected / nombre de la herramienta seleccionada </p>
  1330. </div>
  1331. </div>
  1332. <a class="anchor" id="a48b162752c6e7853b2ce3c6cb8db5661"></a>
  1333. <div class="memitem">
  1334. <div class="memproto">
  1335. <table class="mlabels">
  1336. <tr>
  1337. <td class="mlabels-left">
  1338. <table class="memname">
  1339. <tr>
  1340. <td class="memname">int GridWidget::ToolSize</td>
  1341. </tr>
  1342. </table>
  1343. </td>
  1344. <td class="mlabels-right">
  1345. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  1346. </tr>
  1347. </table>
  1348. </div><div class="memdoc">
  1349. <p>tool size / tamano del a herramienta </p>
  1350. </div>
  1351. </div>
  1352. <hr/>The documentation for this class was generated from the following files:<ul>
  1353. <li><a class="el" href="grid_8h_source.html">grid.h</a></li>
  1354. <li>grid.cpp</li>
  1355. <li>tools.cpp</li>
  1356. </ul>
  1357. </div><!-- contents -->
  1358. <!-- start footer part -->
  1359. <hr class="footer"/><address class="footer"><small>
  1360. Generated on Thu Jun 18 2015 16:01:03 for My Project by &#160;<a href="http://www.doxygen.org/index.html">
  1361. <img class="footer" src="doxygen.png" alt="doxygen"/>
  1362. </a> 1.8.9.1
  1363. </small></address>
  1364. </body>
  1365. </html>