Re: Bugs in signalplotter.cpp
2009/9/21 Aaron J. Seigo ase...@kde.org: On September 21, 2009, John Tapsell wrote: 2009/9/20 Albert Astals Cid aa...@kde.org: Hi, not sure who's the responsible on that, blame says 73% of lines are from leonhard but CIA says he left KDE time ago, copyright mentions John so i'm mailing for John and plasma-devel (as replacement of leonhard). In plasma/widgets/signalplotter.cpp there is code like this Bah, reason number 412 why code copying is evil. This is a copy of an old version. i can think of two approaches: a) make KSysGuard use QGraphicsView and share the widgets directly that way b) use a QGraphicsProxyWidget and encapsulate KSysGuard's classes that are used in libplasma Do you know the advantages/disadvantages of those two approaches? I do want to get these merged. Do I have to keep ABI/API compatibility now for plasma/widgets/signalplotter ? either way, it would be very nice to see KSysGuard using the plotter classes in libplasma (or libplasma using the same plotter classes as ksyguard, housed somewhere else) so we can get rid of this duplication altogether. Which do you prefer? I was thinking of moving the widget to kdebase/workspace/libs would this be sufficient? John ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Bugs in signalplotter.cpp
On 9/22/09, John Tapsell johnf...@gmail.com wrote: 2009/9/21 Aaron J. Seigo ase...@kde.org: On September 21, 2009, John Tapsell wrote: 2009/9/20 Albert Astals Cid aa...@kde.org: Hi, not sure who's the responsible on that, blame says 73% of lines are from leonhard but CIA says he left KDE time ago, copyright mentions John so i'm mailing for John and plasma-devel (as replacement of leonhard). In plasma/widgets/signalplotter.cpp there is code like this Bah, reason number 412 why code copying is evil. This is a copy of an old version. i can think of two approaches: a) make KSysGuard use QGraphicsView and share the widgets directly that way b) use a QGraphicsProxyWidget and encapsulate KSysGuard's classes that are used in libplasma Do you know the advantages/disadvantages of those two approaches? I do want to get these merged. a proxywidget is usuaually a slower to draw using a graphicswidget is ksysguard you would have to keep your view sinced to the proper place of the scene, usual qgraphicsview minor annoyance but no big deal s suppose Do I have to keep ABI/API compatibility now for plasma/widgets/signalplotter ? yes :/ you can't nchange signatures or remove stuff(this excludes also making it a qgrahpicsproxywidget?), but you can add functions either way, it would be very nice to see KSysGuard using the plotter classes in libplasma (or libplasma using the same plotter classes as ksyguard, housed somewhere else) so we can get rid of this duplication altogether. Which do you prefer? I was thinking of moving the widget to kdebase/workspace/libs would this be sufficient? not to be used in libplasma that is in kdelibs /me maybe is for the graphicswidget.. another thing you can do: a pure painting class that has the logic and a paint function that takes a painter argument and both widgets usee that (there is always the question where to put it btw) John ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Bugs in signalplotter.cpp
2009/9/20 Albert Astals Cid aa...@kde.org: Hi, not sure who's the responsible on that, blame says 73% of lines are from leonhard but CIA says he left KDE time ago, copyright mentions John so i'm mailing for John and plasma-devel (as replacement of leonhard). In plasma/widgets/signalplotter.cpp there is code like this Bah, reason number 412 why code copying is evil. This is a copy of an old version. I'll look into it. foreach (QListdouble data, d-plotData) { data.append(0); } foreach (QListdouble data, d-plotData) { if (newOrder.count() != data.count()) { kDebug() Serious problem in move sample. plotdata[i] has data.count() and neworder has newOrder.count(); } else { QListdouble newPlot; for (int i = 0; i newOrder.count(); i++) { int newIndex = newOrder[i]; newPlot.append(data.at(newIndex)); } data = newPlot; } } foreach (QListdouble data, d-plotData) { if ((uint)data.size() = pos) { data.removeAt(pos); } } This code does nothing, it is only working over temporary copies of the lists, the orginal ones are not modified, please read http://tsdgeos.blogspot.com/2008/04/qforeach-is-your-friend.html if you don't understand what i say. Albert ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Bugs in signalplotter.cpp
On September 21, 2009, John Tapsell wrote: 2009/9/20 Albert Astals Cid aa...@kde.org: Hi, not sure who's the responsible on that, blame says 73% of lines are from leonhard but CIA says he left KDE time ago, copyright mentions John so i'm mailing for John and plasma-devel (as replacement of leonhard). In plasma/widgets/signalplotter.cpp there is code like this Bah, reason number 412 why code copying is evil. This is a copy of an old version. i can think of two approaches: a) make KSysGuard use QGraphicsView and share the widgets directly that way b) use a QGraphicsProxyWidget and encapsulate KSysGuard's classes that are used in libplasma either way, it would be very nice to see KSysGuard using the plotter classes in libplasma (or libplasma using the same plotter classes as ksyguard, housed somewhere else) so we can get rid of this duplication altogether. what do you think, John? -- 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 Qt Development Frameworks signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Bugs in signalplotter.cpp
Hi, not sure who's the responsible on that, blame says 73% of lines are from leonhard but CIA says he left KDE time ago, copyright mentions John so i'm mailing for John and plasma-devel (as replacement of leonhard). In plasma/widgets/signalplotter.cpp there is code like this foreach (QListdouble data, d-plotData) { data.append(0); } foreach (QListdouble data, d-plotData) { if (newOrder.count() != data.count()) { kDebug() Serious problem in move sample. plotdata[i] has data.count() and neworder has newOrder.count(); } else { QListdouble newPlot; for (int i = 0; i newOrder.count(); i++) { int newIndex = newOrder[i]; newPlot.append(data.at(newIndex)); } data = newPlot; } } foreach (QListdouble data, d-plotData) { if ((uint)data.size() = pos) { data.removeAt(pos); } } This code does nothing, it is only working over temporary copies of the lists, the orginal ones are not modified, please read http://tsdgeos.blogspot.com/2008/04/qforeach-is-your-friend.html if you don't understand what i say. Albert ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel