<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://git.reviewboard.kde.org/r/112079/">http://git.reviewboard.kde.org/r/112079/</a>
     </td>
    </tr>
   </table>
   <br />



<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray solid;">
 <tr>
  <td>
   <h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been marked as submitted.</h1>
  </td>
 </tr>
</table>
<br />


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

<div>Review request for KDE Frameworks.</div>
<div>By Martin Klapetek.</div>


<p style="color: grey;"><i>Updated Aug. 26, 2013, 3:52 p.m.</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 this was rejected from QIcon, I decided to implement it in frameworks. The idea is new private icon engine (KOverlayIconEngine), which paints the overlays itself, and then an utility function in KIconUtils:: namespace, which takes the base icon and the overlay icons as parameters and constructs new QIcon using KOverlayIconEngine. As QPixmapIconEngine (QIcon default) is private in Qt and couldn't be simply extended, the KOverlayIconEngine simply forwards the calls to QIcon, which then forwards those calls internally to QPixmapIconEngine (QIcon is really mostly just a wrapper around an engine).

There are two functions

QIcon KIconUtils::kIconAddOverlay(const QIcon &icon, const QIcon &overlay, Qt::Corner position);

and

QIcon KIconUtils::kIconAddOverlay(const QIcon &icon, QHash<Qt::Corner, QIcon> overlays);

The first one serves for single overlay icon, the second one is then for multiple overlays, requires the QHash to be built up before passing though.</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 a small testing app with 3 QLabels, testing both ::paint() and ::pixmap() methods, all works \o/ I'm thinking about bundling the app with kguiaddons and/or additionally creating a unittest for it (I have one for Qt already), but I'll do that later as I'm off to vacation and I'd like to get comments for the code.</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>staging/kguiaddons/autotests/CMakeLists.txt <span style="color: grey">(d6b952c)</span></li>

 <li>staging/kguiaddons/autotests/kiconutilstest.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>staging/kguiaddons/autotests/kiconutilstest.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>staging/kguiaddons/src/lib/CMakeLists.txt <span style="color: grey">(e62087b)</span></li>

 <li>staging/kguiaddons/src/lib/util/kiconutils.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>staging/kguiaddons/src/lib/util/kiconutils.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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







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




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