[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Review Request: Port Kwin::TimeLine to QTimeLine
From:       "Thomas Richard" <thomas.richard () proan ! be>
Date:       2011-01-06 17:05:19
Message-ID: 20110106170519.30967.94000 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On 2011-01-06 06:31:23, Martin Gr=C3=A4=C3=9Flin wrote:
> > What is your reasoning to subclass instead of wrapping? I just at the m=
oment do not see any advantage in it. In any case please include sebas to t=
he review as he is the author of the original TimeLine class.

We can choose to keep the current wrapping class and add support for the QE=
asingCurves or instead we can do it the proper way. I understand that there=
 was the need to implement our own curves, that's why it was wrapped in the=
 first place. By subclassing we'll benefit from everything Qt improves on t=
his class.


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6283/#review9542
-----------------------------------------------------------


On 2011-01-05 21:49:39, Thomas Richard wrote:
> =

> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6283/
> -----------------------------------------------------------
> =

> (Updated 2011-01-05 21:49:39)
> =

> =

> Review request for kwin.
> =

> =

> Summary
> -------
> =

> This patch ports the custom Kwin::TimeLine to QTimeLine. I think the main=
 reason why it wasn't sub classed in the first place was to able to provide=
 custom curves. Since Qt 4.6 this is possible within QTimeLine itself using=
 a QEasingCurve (and they have quite a few standardized now).
> =

> I made sure the custom functions like addTime and removeTime still work p=
roperly.
> =

> The only problem I see is that the copy constructor just copies the Curve=
Shape instead of both the CurveShape and the EasingCurve. This is inevitabl=
e I think because there is no way to know which one is really active. I pos=
sible solution would to keep a flag inside the class ourselfs to check whic=
h one is active. I don't think this is needed though as for getting the val=
ue we shouldn't actually copy the TimeLine. It might even be better to work=
 with pointers instead. No real need to copy these objects.
> =

> =

> Diffs
> -----
> =

>   trunk/KDE/kdebase/workspace/kwin/lib/kwineffects.h 1212016 =

>   trunk/KDE/kdebase/workspace/kwin/lib/kwineffects.cpp 1212016 =

> =

> Diff: http://svn.reviewboard.kde.org/r/6283/diff
> =

> =

> Testing
> -------
> =

> Tested the following effects that use a timeline:
> *Minimize
> *Slide
> *Coverswitch
> *Translucency
> *...
> =

> =

> Thanks,
> =

> Thomas
> =

>


[Attachment #5 (text/html)]

<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/6283/">http://svn.reviewboard.kde.org/r/6283/</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 6th, 2011, 6:31 a.m., <b>Martin \
Gräßlin</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;">What is your reasoning to subclass instead of wrapping? I just at the \
moment do not see any advantage in it. In any case please include sebas to the review \
as he is the author of the original TimeLine class.</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;">We can choose to keep \
the current wrapping class and add support for the QEasingCurves or instead we can do \
it the proper way. I understand that there was the need to implement our own curves, \
that&#39;s why it was wrapped in the first place. By subclassing we&#39;ll benefit \
from everything Qt improves on this class.</pre> <br />








<p>- Thomas</p>


<br />
<p>On January 5th, 2011, 9:49 p.m., Thomas Richard 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 kwin.</div>
<div>By Thomas Richard.</div>


<p style="color: grey;"><i>Updated 2011-01-05 21:49:39</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 ports the custom Kwin::TimeLine to QTimeLine. I think the \
main reason why it wasn&#39;t sub classed in the first place was to able to provide \
custom curves. Since Qt 4.6 this is possible within QTimeLine itself using a \
QEasingCurve (and they have quite a few standardized now).

I made sure the custom functions like addTime and removeTime still work properly.

The only problem I see is that the copy constructor just copies the CurveShape \
instead of both the CurveShape and the EasingCurve. This is inevitable I think \
because there is no way to know which one is really active. I possible solution would \
to keep a flag inside the class ourselfs to check which one is active. I don&#39;t \
think this is needed though as for getting the value we shouldn&#39;t actually copy \
the TimeLine. It might even be better to work with pointers instead. No real need to \
copy these objects.</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;">Tested the following effects that use a timeline:
*Minimize
*Slide
*Coverswitch
*Translucency
*...</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/kdebase/workspace/kwin/lib/kwineffects.h <span style="color: \
grey">(1212016)</span></li>

 <li>trunk/KDE/kdebase/workspace/kwin/lib/kwineffects.cpp <span style="color: \
grey">(1212016)</span></li>

</ul>

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




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








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



_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic