No Description

_image_scrambler_8h_source.html 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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: ImageScrambler.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">ImageScrambler.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="preprocessor">#ifndef IMAGESCRAMBLER_H</span></div>
  85. <div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define IMAGESCRAMBLER_H</span></div>
  86. <div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div>
  87. <div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#include &lt;QMainWindow&gt;</span></div>
  88. <div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &lt;QFileDialog&gt;</span></div>
  89. <div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#include &lt;QDir&gt;</span></div>
  90. <div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &lt;QMessageBox&gt;</span></div>
  91. <div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#include &lt;QShortcut&gt;</span></div>
  92. <div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="preprocessor">#include &lt;QImage&gt;</span></div>
  93. <div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;</div>
  94. <div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_ui.html">Ui</a> {</div>
  95. <div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160; <span class="keyword">class </span><a class="code" href="class_image_scrambler.html">ImageScrambler</a>;</div>
  96. <div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;}</div>
  97. <div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;</div>
  98. <div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="class_image_scrambler.html"> 15</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_image_scrambler.html">ImageScrambler</a> : <span class="keyword">public</span> QMainWindow</div>
  99. <div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;{</div>
  100. <div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160; Q_OBJECT</div>
  101. <div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div>
  102. <div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="keyword">public</span>:</div>
  103. <div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;</div>
  104. <div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; <span class="keyword">explicit</span> <a class="code" href="class_image_scrambler.html#add8fe476a0557f10a1fdae5b2b8e576a">ImageScrambler</a>(QWidget *parent = 0);</div>
  105. <div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div>
  106. <div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; <a class="code" href="class_image_scrambler.html#aa0ad5b405d49d1769d7e794f391f8657">~ImageScrambler</a>();</div>
  107. <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div>
  108. <div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_image_scrambler.html#afe4e275f55ee362ea7ce13fcec6f0b26">cropSwap</a>(QImage &amp;, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>);</div>
  109. <div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div>
  110. <div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; QImage <a class="code" href="class_image_scrambler.html#a7eb90242d1779b98f48f9abe5ed7d698">ScrambleFilter</a>(QImage image, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>);</div>
  111. <div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div>
  112. <div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;<span class="keyword">private</span> slots:</div>
  113. <div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div>
  114. <div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_image_scrambler.html#afa24bbf9d4f71fd0853478a66d74d5f4">on_btnLoadNewImage_clicked</a>();</div>
  115. <div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;</div>
  116. <div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_image_scrambler.html#aba8b3a0f8d406c9e48e1d0e9e429a60e">on_btnSave_clicked</a>();</div>
  117. <div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;</div>
  118. <div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_image_scrambler.html#a2a548be139a62d30dea82e2797d51ec7">on_btnScrambleImage_clicked</a>();</div>
  119. <div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div>
  120. <div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_image_scrambler.html#a7c3ef8d29bfc424d296e95c6acdb427e">on_btnDescrambleImage_clicked</a>();</div>
  121. <div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div>
  122. <div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_image_scrambler.html#a7199f376e7dc4fc4b61145be2dcaaad3">on_actionLoad_Image_triggered</a>();</div>
  123. <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div>
  124. <div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_image_scrambler.html#aef30dcfeee03fa8aee60fd7ba89815b3">on_actionSave_Image_triggered</a>();</div>
  125. <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;</div>
  126. <div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_image_scrambler.html#ac7514d09c9ee2b021d803375eba95f74">on_actionScramble_Image_triggered</a>();</div>
  127. <div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;</div>
  128. <div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_image_scrambler.html#a80b3b6e575f0b24290d71d202d910fed">on_actionDescramble_Image_triggered</a>();</div>
  129. <div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;</div>
  130. <div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;<span class="keyword">private</span>:</div>
  131. <div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; Ui::ImageScrambler *ui;</div>
  132. <div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="class_image_scrambler.html#a90f0c2de88b3d790ab25460dc2222a60"> 152</a></span>&#160; QImage <a class="code" href="class_image_scrambler.html#a90f0c2de88b3d790ab25460dc2222a60">originalImage</a>; </div>
  133. <div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="class_image_scrambler.html#a691bd6839008b2ec5dc3bc2933328cc2"> 153</a></span>&#160; QImage <a class="code" href="class_image_scrambler.html#a691bd6839008b2ec5dc3bc2933328cc2">scrambledImage</a>; </div>
  134. <div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="class_image_scrambler.html#a4d5951c83206c8cf7bad2c6a9f7387d8"> 154</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="class_image_scrambler.html#a4d5951c83206c8cf7bad2c6a9f7387d8">scrambleDepth</a> ; </div>
  135. <div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;};</div>
  136. <div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div>
  137. <div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="preprocessor">#endif // MAINWINDOW_H</span></div>
  138. <div class="ttc" id="class_image_scrambler_html_aa0ad5b405d49d1769d7e794f391f8657"><div class="ttname"><a href="class_image_scrambler.html#aa0ad5b405d49d1769d7e794f391f8657">ImageScrambler::~ImageScrambler</a></div><div class="ttdeci">~ImageScrambler()</div><div class="ttdoc">Destructor. </div><div class="ttdef"><b>Definition:</b> ImageScrambler.cpp:45</div></div>
  139. <div class="ttc" id="namespace_ui_html"><div class="ttname"><a href="namespace_ui.html">Ui</a></div><div class="ttdef"><b>Definition:</b> ImageScrambler.h:11</div></div>
  140. <div class="ttc" id="class_image_scrambler_html_a2a548be139a62d30dea82e2797d51ec7"><div class="ttname"><a href="class_image_scrambler.html#a2a548be139a62d30dea82e2797d51ec7">ImageScrambler::on_btnScrambleImage_clicked</a></div><div class="ttdeci">void on_btnScrambleImage_clicked()</div><div class="ttdoc">Function invokes the ScrambleFilter function to scramble the image and load it in the GUI...</div><div class="ttdef"><b>Definition:</b> ImageScrambler.cpp:89</div></div>
  141. <div class="ttc" id="class_image_scrambler_html_aba8b3a0f8d406c9e48e1d0e9e429a60e"><div class="ttname"><a href="class_image_scrambler.html#aba8b3a0f8d406c9e48e1d0e9e429a60e">ImageScrambler::on_btnSave_clicked</a></div><div class="ttdeci">void on_btnSave_clicked()</div><div class="ttdoc">Function that saves the scrambled image in the computer. </div><div class="ttdef"><b>Definition:</b> ImageScrambler.cpp:75</div></div>
  142. <div class="ttc" id="class_image_scrambler_html"><div class="ttname"><a href="class_image_scrambler.html">ImageScrambler</a></div><div class="ttdef"><b>Definition:</b> ImageScrambler.h:15</div></div>
  143. <div class="ttc" id="class_image_scrambler_html_a691bd6839008b2ec5dc3bc2933328cc2"><div class="ttname"><a href="class_image_scrambler.html#a691bd6839008b2ec5dc3bc2933328cc2">ImageScrambler::scrambledImage</a></div><div class="ttdeci">QImage scrambledImage</div><div class="ttdef"><b>Definition:</b> ImageScrambler.h:153</div></div>
  144. <div class="ttc" id="class_image_scrambler_html_a7eb90242d1779b98f48f9abe5ed7d698"><div class="ttname"><a href="class_image_scrambler.html#a7eb90242d1779b98f48f9abe5ed7d698">ImageScrambler::ScrambleFilter</a></div><div class="ttdeci">QImage ScrambleFilter(QImage image, int, int, int, int, int)</div><div class="ttdoc">Funtion that recursively scrambles an images by dividing the image in squares (sub images) and then s...</div><div class="ttdef"><b>Definition:</b> Filter.cpp:72</div></div>
  145. <div class="ttc" id="class_image_scrambler_html_a7c3ef8d29bfc424d296e95c6acdb427e"><div class="ttname"><a href="class_image_scrambler.html#a7c3ef8d29bfc424d296e95c6acdb427e">ImageScrambler::on_btnDescrambleImage_clicked</a></div><div class="ttdeci">void on_btnDescrambleImage_clicked()</div><div class="ttdoc">Function that restore the scrambled image to the original image. </div><div class="ttdef"><b>Definition:</b> ImageScrambler.cpp:104</div></div>
  146. <div class="ttc" id="class_image_scrambler_html_aef30dcfeee03fa8aee60fd7ba89815b3"><div class="ttname"><a href="class_image_scrambler.html#aef30dcfeee03fa8aee60fd7ba89815b3">ImageScrambler::on_actionSave_Image_triggered</a></div><div class="ttdeci">void on_actionSave_Image_triggered()</div><div class="ttdoc">Function that invokes the on_btnSave_clicked() function. </div><div class="ttdef"><b>Definition:</b> ImageScrambler.cpp:123</div></div>
  147. <div class="ttc" id="class_image_scrambler_html_afa24bbf9d4f71fd0853478a66d74d5f4"><div class="ttname"><a href="class_image_scrambler.html#afa24bbf9d4f71fd0853478a66d74d5f4">ImageScrambler::on_btnLoadNewImage_clicked</a></div><div class="ttdeci">void on_btnLoadNewImage_clicked()</div><div class="ttdoc">Function display a file browsing window to load an image into the GUI. </div><div class="ttdef"><b>Definition:</b> ImageScrambler.cpp:56</div></div>
  148. <div class="ttc" id="class_image_scrambler_html_a80b3b6e575f0b24290d71d202d910fed"><div class="ttname"><a href="class_image_scrambler.html#a80b3b6e575f0b24290d71d202d910fed">ImageScrambler::on_actionDescramble_Image_triggered</a></div><div class="ttdeci">void on_actionDescramble_Image_triggered()</div><div class="ttdoc">Function that invokes the on_btnDescrambleImage_clicked() function. </div><div class="ttdef"><b>Definition:</b> ImageScrambler.cpp:141</div></div>
  149. <div class="ttc" id="class_image_scrambler_html_a90f0c2de88b3d790ab25460dc2222a60"><div class="ttname"><a href="class_image_scrambler.html#a90f0c2de88b3d790ab25460dc2222a60">ImageScrambler::originalImage</a></div><div class="ttdeci">QImage originalImage</div><div class="ttdef"><b>Definition:</b> ImageScrambler.h:152</div></div>
  150. <div class="ttc" id="class_image_scrambler_html_add8fe476a0557f10a1fdae5b2b8e576a"><div class="ttname"><a href="class_image_scrambler.html#add8fe476a0557f10a1fdae5b2b8e576a">ImageScrambler::ImageScrambler</a></div><div class="ttdeci">ImageScrambler(QWidget *parent=0)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> ImageScrambler.cpp:10</div></div>
  151. <div class="ttc" id="class_image_scrambler_html_a7199f376e7dc4fc4b61145be2dcaaad3"><div class="ttname"><a href="class_image_scrambler.html#a7199f376e7dc4fc4b61145be2dcaaad3">ImageScrambler::on_actionLoad_Image_triggered</a></div><div class="ttdeci">void on_actionLoad_Image_triggered()</div><div class="ttdoc">Function that invokes the on_btnLoadNewImage_clicked() function. </div><div class="ttdef"><b>Definition:</b> ImageScrambler.cpp:114</div></div>
  152. <div class="ttc" id="class_image_scrambler_html_afe4e275f55ee362ea7ce13fcec6f0b26"><div class="ttname"><a href="class_image_scrambler.html#afe4e275f55ee362ea7ce13fcec6f0b26">ImageScrambler::cropSwap</a></div><div class="ttdeci">void cropSwap(QImage &amp;, int, int, int, int, int, int)</div><div class="ttdoc">Funtion that crop two squares of equal size of an image or sub image and swaps them. The funtion receives two coords (x0, y0) and (x1, y1) and a width and a height. Then swaps pixel by pixel the square formed from the top left coordinate (x0, y0) to the bottom right coordinate (x0+width, y0+height) with the square formed from the top left coordinate (x1, y1) to the bottom right (x1+width, y1+height). </div><div class="ttdef"><b>Definition:</b> Filter.cpp:29</div></div>
  153. <div class="ttc" id="class_image_scrambler_html_ac7514d09c9ee2b021d803375eba95f74"><div class="ttname"><a href="class_image_scrambler.html#ac7514d09c9ee2b021d803375eba95f74">ImageScrambler::on_actionScramble_Image_triggered</a></div><div class="ttdeci">void on_actionScramble_Image_triggered()</div><div class="ttdoc">Function that invokes the on_btnScrambleImage_clicked() function. </div><div class="ttdef"><b>Definition:</b> ImageScrambler.cpp:132</div></div>
  154. <div class="ttc" id="class_image_scrambler_html_a4d5951c83206c8cf7bad2c6a9f7387d8"><div class="ttname"><a href="class_image_scrambler.html#a4d5951c83206c8cf7bad2c6a9f7387d8">ImageScrambler::scrambleDepth</a></div><div class="ttdeci">int scrambleDepth</div><div class="ttdef"><b>Definition:</b> ImageScrambler.h:154</div></div>
  155. </div><!-- fragment --></div><!-- contents -->
  156. <!-- start footer part -->
  157. <hr class="footer"/><address class="footer"><small>
  158. Generated on Tue Jun 16 2015 20:51:15 for My Project by &#160;<a href="http://www.doxygen.org/index.html">
  159. <img class="footer" src="doxygen.png" alt="doxygen"/>
  160. </a> 1.8.9.1
  161. </small></address>
  162. </body>
  163. </html>