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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On January 15th, 2012, 2:14 p.m., <b>David Edmundson</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'm not sure it needs a new lib, it could just be a "Widgets" folder inside the KTp lib.
I think models is separated purely because they're a bit sucky rather than something we should do for everything in KTp.

Could you check with Dario's opinion and go with whatever he says.</pre>
 </blockquote>




 <p>On January 15th, 2012, 3:45 p.m., <b>Daniele Elmo Domenichelli</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The problem with that is that the models library depends on the common library, so the common library cannot depend on the models library...</pre>
 </blockquote>





 <p>On January 15th, 2012, 4:36 p.m., <b>Dario Freddi</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Although the solution seems to be a little bit over engineered, and David definitely has a point, at the current state of things going for a separate library is the only way to go, so I +1 Daniele's solution. In the future, where Models' fate will be clear, we might decide to revise that.</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">+1 from me then :). Fix the potential crash and I'll be happy to say ship it.

Final related comment, can you be sure to update send-file once this is merged.</pre>
<br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On January 15th, 2012, 2:14 p.m., <b>David Edmundson</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="http://git.reviewboard.kde.org/r/103702/diff/1/?file=46612#file46612line67" style="color: black; font-weight: bold; text-decoration: underline;">KTp/Widgets/contact-grid-widget.h</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; ">public:</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">67</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">virtual</span> <span class="kt">void</span> <span class="n">setShowOfflineUsers</span><span class="p">(</span><span class="n">bool</span> <span class="n">showOfflineUsers</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;">I think in future we should expose our filter proxy model directly, that way we don't have to put everything in 3 places

(the proxy, here and the contacts listview)

Just brainstorming, this is fine for now.</pre>
 </blockquote>



 <p>On January 15th, 2012, 3:45 p.m., <b>Daniele Elmo Domenichelli</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Since this is a brainstorming... I think it is actually nice that you just have to add the widget and use the methods from that... But whatever you choose it's fine for me.</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;">Ok, there's a class in the contact-list which I think is destined to move here soon (ContactListWidget). I want flexibility and I don't want to have to maintain it in 3 different places.

Anyway let's normalise the two of these when that happens. </pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On January 15th, 2012, 2:14 p.m., <b>David Edmundson</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="http://git.reviewboard.kde.org/r/103702/diff/1/?file=46613#file46613line65" style="color: black; font-weight: bold; text-decoration: underline;">KTp/Widgets/contact-grid-widget.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; ">void KTp::ContactGridDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) 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">65</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span> <span class="p">(</span><span class="n">avatar</span><span class="p">.</span><span class="n">width</span><span class="p">()</span> <span class="o">></span> <span class="mi">80</span> <span class="o">||</span> <span class="n">avatar</span><span class="p">.</span><span class="n">height</span><span class="p">()</span><span class="o">></span> <span class="mi">80</span><span class="p">)</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;">Try and avoid a hardcoded 80. I think we should use the icon size specified by whoever is using this class (set by QAbstractItemView::iconSize).

Does it read clearer as this:

avatar = avatar.scaled(avatar.size().boundedTo(avatarRect));

</pre>
 </blockquote>



 <p>On January 15th, 2012, 3:45 p.m., <b>Daniele Elmo Domenichelli</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is actually copy&pasted code, but I will change it...</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;">Ah, that makes it my fault... Ah well, if you're going to use my code, you can fix it :-)</pre>
<br />




<p>- David</p>


<br />
<p>On January 15th, 2012, 10 a.m., Daniele Elmo Domenichelli wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/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 Telepathy and David Edmundson.</div>
<div>By Daniele Elmo Domenichelli.</div>


<p style="color: grey;"><i>Updated Jan. 15, 2012, 10 a.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;">This patch adds a class ContactGridWidget to the common module.
The class is basically the widget used in ktp-send-file for displaying the contacts (grid view + filter bar)

I had to add a new directory "Widgets" and a new library, because the class depends both on the "common" and the "models" modules.</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;">Succesfully used in the unreleased telepathy kipi plugin</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>KTp/CMakeLists.txt <span style="color: grey">(f17ff8c3bb54408d3bfaf7773bae0e736836b9b2)</span></li>

 <li>KTp/Widgets/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>KTp/Widgets/contact-grid-widget.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>KTp/Widgets/contact-grid-widget.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>KTp/Widgets/flat-model-proxy.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>KTp/Widgets/flat-model-proxy.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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




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








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