[kde-edu]: Re: R: Re: Kartesio

Tomaz Canabrava 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 (
http://techbase.kde.org/Policies/Kdelibs_Coding_Style )

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
> the
> 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
> been
> 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
> Cantor
> that works with Kartesio as a backend, but I should think about how this
> could
> 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
> tries
> >>> to give a best fit. I called it Kartesio, it works using maxima to
> solve
> >>> 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
> function
> >>> y=a*x+b, it will return y=3*x -3, and plot it to show differences
> between
> >>> the best fit curve and the original points. It can also export the
> results
> >>> into an svg image, a latex document (using pstricks).
> >>> Give it a look, and tell me what do you think:
> >>>
> http://quickgit.kde.org/?p=scratch%2Flucatringali%2Fkartesio.git&a=summary
> >>> Here's a screenshot:
> >>> https://docs.google.com/leaf?
> >id=0B6K8rmHlVyTFZTliYzIwMmEtODZlOS00NjhkLThiYjItNWM1YTIzMzBmNDc2&hl=en
> >>> 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
> https://mail.kde.org/mailman/listinfo/kde-edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-edu/attachments/20110327/2d308612/attachment.htm 

More information about the kde-edu mailing list