Review Request: Circular countdown widget

Martin Klapetek martin.klapetek at gmail.com
Thu Nov 10 09:49:19 UTC 2011



> On Nov. 9, 2011, 9:47 p.m., Daniele Elmo Domenichelli wrote:
> > circular-countdown.h, line 35
> > <http://git.reviewboard.kde.org/r/103094/diff/1/?file=40723#file40723line35>
> >
> >     Perhaps you might add also "int duration() const"

I saw no need for it, so I left it out. But it's added now.


> On Nov. 9, 2011, 9:47 p.m., Daniele Elmo Domenichelli wrote:
> > circular-countdown.h, line 44
> > <http://git.reviewboard.kde.org/r/103094/diff/1/?file=40723#file40723line44>
> >
> >     I'd use for this signal "timeout()" (same name used by QTimer) or "finished()" (same name used by QTimeLine)

Makes sense.


> On Nov. 9, 2011, 9:47 p.m., Daniele Elmo Domenichelli wrote:
> > circular-countdown.h, line 51
> > <http://git.reviewboard.kde.org/r/103094/diff/1/?file=40723#file40723line51>
> >
> >     Being a very good candidate to be in a library, private members should be in a private class

Right.


> On Nov. 9, 2011, 9:47 p.m., Daniele Elmo Domenichelli wrote:
> > circular-countdown.cpp, line 30
> > <http://git.reviewboard.kde.org/r/103094/diff/1/?file=40724#file40724line30>
> >
> >     Instead of setMaximumSize you should reimplement sizeHint and call setSizePolicy (see QWidget documentation[1])
> >     
> >     [1]http://doc.qt.nokia.com/stable/qwidget.html

Good point, implemented.


> On Nov. 9, 2011, 9:47 p.m., Daniele Elmo Domenichelli wrote:
> > circular-countdown.cpp, line 33
> > <http://git.reviewboard.kde.org/r/103094/diff/1/?file=40724#file40724line33>
> >
> >     It took some time to understand this, found the meaning here [1], perhaps use 360*16 and add a comment...
> >     Anyway 5760 frames in 5000 msecs looks a little unreasonable, do you know if QTimeLine+QPainter can handle this automatically? Otherwise you should limit the framerate somehow...
> >     
> >     [1]http://doc.qt.nokia.com/stable/qpainter.html#drawPie
> 
> David Edmundson wrote:
>     I don't think that's how QTimeLine works, I think it calls you at a reasonable interval and tells you what frame you should be drawing. i.e if you set the animation to last 1 msecs, you will only be asked to draw frame 0, and then frame 5760.
>     
>     I may be wrong though.

Then the other question is how much repaints does it actually really do? I imagine there is some throttling, but I'll investigate further.


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103094/#review8064
-----------------------------------------------------------


On Nov. 9, 2011, 5:02 p.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103094/
> -----------------------------------------------------------
> 
> (Updated Nov. 9, 2011, 5:02 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Description
> -------
> 
> Little circular countdown widget that can be used throughout components (currently accounts-kcm, planned for contact list). See screenshot - the black frame (KMessageWidget) top right corner. 
> 
> 
> Diffs
> -----
> 
>   circular-countdown.h PRE-CREATION 
>   circular-countdown.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/103094/diff/diff
> 
> 
> Testing
> -------
> 
> It's ok.
> 
> 
> Screenshots
> -----------
> 
> Circular countdown
>   http://git.reviewboard.kde.org/r/103094/s/332/
> 
> 
> Thanks,
> 
> Martin Klapetek
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20111110/db364aba/attachment-0001.html>


More information about the KDE-Telepathy mailing list