[kde-edu]: Re: R: Re: Kartesio
tcanabrava at kde.org
Sun Mar 27 16:26:42 CEST 2011
I took a look at the code, and I think it could be better designed, ie, all
code is on mainwindow.cpp, but inside the mainwindow you have a parser, a
plotter, you are also using non-english names for variables (texto, for
the names of the member variables are wrong, if you follow the kde-coding
for instance, you have
xmin = 0;
xmax = 50;
ymin = 0;
ymax = 50;
if you follow the kde-coding guidelines, they should be
m_xmin = 0;
m_xmax = 50;
m_ymin = 0;
m_ymax = 50;
the m_ on front indicates that they are member-variables instead of method
also, you are doing a *lot* of string operations on your code, you should
consider using QByteArray for that instead of QString list as QByteArray is
much faster on those.
1 - fix ObjectOriented Programming in your app. doing everything inside the
main class is bad.
2 - fix your code-standards to meet kde's (
as for a new program for that, I don't know if it's good. for instance, it
looks like it could be done on KmPlot instead of a new app just for that.
you should also not use on_variable_signal() auto-connections, for a simple
change in the ui can break your program.
On Sun, Mar 27, 2011 at 12:12 PM, LucaTringali <TRINGALINVENT at libero.it>wrote:
> Well, it's just a little more complex: maxima does only the part of solving
> function, but the algorithm for best fit is implemented into Kartesio, and
> can't be done with maxima commands. Plus, the interface of Kartesio has
> designed for this particular use, while Cantor is fundamentally a paper for
> mathematical calculations. It could be a good idea to write a plugin for
> that works with Kartesio as a backend, but I should think about how this
> be done.
> Luca Tringali
> >>----Messaggio originale----
> >>Da: aspotashev at gmail.com
> >>Data: 27/03/2011 13.24
> >>A: <kde-edu at kde.org>, "LucaTringali"<TRINGALINVENT at libero.it>
> >>Ogg: Re: [kde-edu]: Kartesio
> >>2011/3/27 LucaTringali <TRINGALINVENT at libero.it>:
> >>> Hello everybody,
> >>> I wrote a program that takes a series of points, a generic curve, and
> >>> to give a best fit. I called it Kartesio, it works using maxima to
> >>> functions and KDE libraries for the UI.
> >>> For example, if you give it (1;0) (2;3) (3;7) (4;8) (5;11) and the
> >>> y=a*x+b, it will return y=3*x -3, and plot it to show differences
> >>> the best fit curve and the original points. It can also export the
> >>> into an svg image, a latex document (using pstricks).
> >>> Give it a look, and tell me what do you think:
> >>> Here's a screenshot:
> >>> https://docs.google.com/leaf?
> >>> Could it be included into kde-edu collection? What does it miss?
> >>As your application uses Maxima, the same thing can probably be done
> >>as a plugin for Cantor (http://edu.kde.org/applications/all/cantor/).
> >>Alexander Potashev
> kde-edu mailing list
> kde-edu at mail.kde.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kde-edu