<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://svn.reviewboard.kde.org/r/5238/">http://svn.reviewboard.kde.org/r/5238/</a>
     </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On September 6th, 2010, 3:02 a.m., <b>Parker Coates</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="/r/5238/diff/1/?file=35067#file35067line82" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdegames/knetwalk/src/cell.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">71</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">stateChanges</span> <span class="o">=</span> <span class="n">m_cellIsActivated</span> <span class="o">!=</span> <span class="n">activate</span><span class="p">;</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">72</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">m_cablesItem</span> <span class="o">=</span> <span class="k">new</span> <span class="n">KGameRenderedItem</span><span class="p">(</span><span class="n">renderer</span><span class="p">,</span> <span class="s">&quot;&quot;</span><span class="p">,</span> <span class="k">this</span><span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">You still get that tiny graphic artefact if add a &quot;m_cablesItem-&gt;setTransformationMode(Qt::SmoothTransformation);&quot; here although it does seem to be a bit less noticeable.

Speaking of which, enabling smooth transformations makes the rotation animations look *much* nicer, but I&#39;m not sure how much more computationally expensive it is. It would take some profiling (that I don&#39;t have time to do to ;)) to find out.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Wow that really does make a huge difference. I think I like this game even more now, if that&#39;s possible :)</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On September 6th, 2010, 3:02 a.m., <b>Parker Coates</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="/r/5238/diff/1/?file=35069#file35069line85" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdegames/knetwalk/src/fielditem.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">QRectF FieldItem::boundingRect() const</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">85</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">FieldItem</span><span class="o">::</span><span class="n">paint</span><span class="p">(</span><span class="n">QPainter</span><span class="o">*</span> <span class="n">painter</span><span class="p">,</span> <span class="k">const</span> <span class="n">QStyleOptionGraphicsItem</span><span class="o">*</span> <span class="n">opt</span><span class="p">,</span> <span class="n">QWidget</span><span class="o">*</span> <span class="n">w</span><span class="p">)</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">86</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="p">{</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">87</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">Q_UNUSED</span><span class="p">(</span><span class="n">painter</span><span class="p">);</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">88</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">Q_UNUSED</span><span class="p">(</span><span class="n">opt</span><span class="p">);</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">89</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">Q_UNUSED</span><span class="p">(</span><span class="n">w</span><span class="p">);</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">90</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="p">}</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Instead of implementing an empty paint() method, you should set the ItemHasNoContents flag as it&#39;s more efficient.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I wasn&#39;t aware of that flag, however isn&#39;t it still necessary to implement paint() as it is pure virtual in QGraphicsItem?</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On September 6th, 2010, 3:02 a.m., <b>Parker Coates</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="/r/5238/diff/1/?file=35077#file35077line217" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdegames/knetwalk/src/mainwindow.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void MainWindow::configureSettings()</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">200</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k"><span class="hl">if</span></span><span class="hl"> </span><span class="p"><span class="hl">(</span></span><span class="o"><span class="hl">!</span></span><span class="n"><span class="hl">R</span>enderer</span><span class="o"><span class="hl">::</span></span><span class="n"><span class="hl">self</span></span><span class="p"><span class="hl">()</span></span><span class="o"><span class="hl">-&gt;</span></span><span class="n"><span class="hl">load</span>Theme</span><span class="p">(</span><span class="n">Settings</span><span class="o">::</span><span class="n">theme</span><span class="p">())<span class="hl">)</span></span><span class="hl"> </span><span class="p"><span class="hl">{</span></span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">178</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n"><span class="hl">m_scene</span></span><span class="o"><span class="hl">-&gt;</span></span><span class="n"><span class="hl">r</span>enderer</span><span class="p"><span class="hl">().</span></span><span class="n"><span class="hl">set</span>Theme</span><span class="p">(</span><span class="n">Settings</span><span class="o">::</span><span class="n">theme</span><span class="p">())<span class="hl">;</span></span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Why get rid of the Renderer singleton? You now have a few classes holding and passing around pointers to a KGameRenderer object, which I don&#39;t really love. Getting rid of the singleton is fine if you can cleanly and conveniently keep everyone informed without it, but I&#39;m really not sure that this is an improvement.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Honestly, it&#39;s just because that&#39;s what I&#39;ve been doing for the other ports, and it seemed cool to be able to get rid of a source file. I agree that keeping it as a singleton makes good sense though.</pre>
<br />




<p>- Brian</p>


<br />
<p>On September 2nd, 2010, 10:36 p.m., Brian Croom wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for KDE Games and Stefan Majewsky.</div>
<div>By Brian Croom.</div>


<p style="color: grey;"><i>Updated 2010-09-02 22:36:16</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">As KNetWalk&#39;s use of QWidget as its graphics stack was marked in red on the porting status wiki page, and because I wanted to see if I had acquired a good enough working understanding of the QGraphicsView framework to be able to accomplish it, I decided to attempt a full port of this game. I referred to the KMines source while restructuring the code, as it has various conceptually similar elements (a grid with square cells that are activated by the user during gameplay, etc.)

Doing this required some rather invasive changes to the GUI code. In addition to switching to QGraphicsView, this patch also:
- Removes the distinction between mouse and keyboard input modes. They now work together nicely, as they should.
- Adds the ability to pause the game, and hide the puzzle while it is paused.
- Cleans up code in various places and removes a number of obsolete class members that I presume to have been vestiges from before the KDE port.

My only disappointment is that switching to QGraphicsView did not get rid of the rendering artifacts that often appear when the cables are being rotated. Particularly on the cells with T-shaped cable junctions, white pixels often appear at the edge of the pixmap during the rotation animation. I would greatly appreciate any suggestions for how to avoid that happening.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I have come to enjoy playing this game quite a lot, and have given it considerable testing. All the usual things seem to work well including resizing, theme changes, changing difficulty level, and pausing/resuming.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/KDE/kdegames/knetwalk/src/fielditem.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/fielditem.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/cell.cpp <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/CMakeLists.txt <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/abstractgrid.h <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/abstractgrid.cpp <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/cell.h <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/gamewidget.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/gamewidget.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/globals.h <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/knetwalk.kcfg <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/knetwalkui.rc <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/main.cpp <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/mainwindow.h <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/mainwindow.cpp <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/renderer.h <span style="color: grey">(1168585)</span></li>

 <li>/trunk/KDE/kdegames/knetwalk/src/renderer.cpp <span style="color: grey">(1168585)</span></li>

</ul>

<p><a href="http://svn.reviewboard.kde.org/r/5238/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>