[Panel-devel] Signalplotter for Plasma

Aaron J. Seigo aseigo at kde.org
Fri Aug 10 13:17:53 CEST 2007


On Monday 06 August 2007, Percy Leonhardt wrote:
> Could somebody/Aaron please review and commit.

things i need clarification on before committing:

- setTranslatedUnit's apidox says it is about the vertical axis; 
translatedUnit says it is about the horizontal axis. the code says it's the 
horizontal axis. so horizontal axis is indeed what it is supposed to be?

- seeing as there is no setUnit(const QString&) or unit(), there's no point 
for the word "Translated" in the API is there? =)

- why is backgroundImage a QImage and not a QPixmap?

with the above three things addressed, please commit it to plasma/widgets/.


things that i can (and will) fix after it is committed:

- in some places int is used for plot indexes (e.g. reorderPlots takes a 
QList<int>) and in others uint is (e.g. removePlot takes a uint). it should 
be one or the other for consistency

- instead of having 3 lists to iterate through and keep in sync with each 
other (2x QList<QColor> plus a QLinkedist<QList<double> >) it probably makes 
more sense to just have a QList<PlotData> where PlotData is a struct 
consisting of 2 colours and a QList<double>

- as a Plasma::Widget, it should not reimplement paint() itself, just 
drawWidget()

- the code is pretty inconsistently formatted (e.g. "if (" in some places 
and "if(" in others) and doesn't follow the plasma coding style guide. this 
is a matter of me spending 5 minutes going over the code and fixing that up 
=)


random other thoughts:

- i wonder if the ability to move one plot easily rather than all with 
reorderPlots is desirable? e.g. reorderPlot(uint currentIndex, uint newIdex). 

- are there any numbers of the speed improvement of keeping the graph drawn in 
a background image versus just drawing it all every time? obviously keeping 
it cached will be faster in an absolute sense, i'm curious how much faster it 
is relative to the brute force method...

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070810/3e456fe5/attachment.pgp 


More information about the Panel-devel mailing list