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 instance). <div>
<br></div><div>the names of the member variables are wrong, if you follow the kde-coding guidelines. </div><div>for instance, you have</div><div><br></div><div><div> xmin = 0;</div><div>    xmax = 50;</div><div>    ymin = 0;</div>
<div>    ymax = 50;</div><div><br></div><div>if you follow the kde-coding guidelines, they should be</div><div><br></div><div><div>    m_xmin = 0;</div><div>    m_xmax = 50;</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>
    m_ymin = 0;</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>    m_ymax = 50;</div><meta http-equiv="content-type" content="text/html; charset=utf-8"></div><div><br></div>the m_ on front indicates that they are member-variables instead of method variables.</div>
<div>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.</div><div><br></div><div>so,</div><div>1 - fix ObjectOriented Programming in your app. doing everything inside the main class is bad.</div>
<div>2 - fix your code-standards to meet kde&#39;s ( <a href="http://techbase.kde.org/Policies/Kdelibs_Coding_Style">http://techbase.kde.org/Policies/Kdelibs_Coding_Style</a> )</div><div><br></div><div>as for a new program for that, I don&#39;t know if it&#39;s good. for instance, it looks like it could be done on KmPlot instead of a new app just for that.</div>
<div><br></div><div>Tomaz</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>you should also not use on_variable_signal() auto-connections, for a simple change in the ui can break your program.<br>
<div class="gmail_quote">On Sun, Mar 27, 2011 at 12:12 PM, LucaTringali <span dir="ltr">&lt;<a href="mailto:TRINGALINVENT@libero.it">TRINGALINVENT@libero.it</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Well, it&#39;s just a little more complex: maxima does only the part of solving<br>
the<br>
function, but the algorithm for best fit is implemented into Kartesio, and<br>
can&#39;t be done with maxima commands. Plus, the interface of Kartesio has been<br>
designed for this particular use, while Cantor is fundamentally a paper for<br>
mathematical calculations. It could be a good idea to write a plugin for<br>
Cantor<br>
that works with Kartesio as a backend, but I should think about how this<br>
could<br>
be done.<br>
<br>
Luca Tringali<br>
<br>
&gt;&gt;----Messaggio originale----<br>
&gt;&gt;Da: <a href="mailto:aspotashev@gmail.com">aspotashev@gmail.com</a><br>
&gt;&gt;Data: 27/03/2011 13.24<br>
&gt;&gt;A: &lt;<a href="mailto:kde-edu@kde.org">kde-edu@kde.org</a>&gt;, &quot;LucaTringali&quot;&lt;<a href="mailto:TRINGALINVENT@libero.it">TRINGALINVENT@libero.it</a>&gt;<br>
&gt;&gt;Ogg: Re: [kde-edu]: Kartesio<br>
&gt;&gt;<br>
&gt;&gt;2011/3/27 LucaTringali &lt;<a href="mailto:TRINGALINVENT@libero.it">TRINGALINVENT@libero.it</a>&gt;:<br>
&gt;&gt;&gt; Hello everybody,<br>
&gt;&gt;&gt; I wrote a program that takes a series of points, a generic curve, and<br>
tries<br>
&gt;&gt;&gt; to give a best fit. I called it Kartesio, it works using maxima to solve<br>
&gt;&gt;&gt; functions and KDE libraries for the UI.<br>
&gt;&gt;&gt; For example, if you give it (1;0) (2;3) (3;7) (4;8) (5;11) and the<br>
function<br>
&gt;&gt;&gt; y=a*x+b, it will return y=3*x -3, and plot it to show differences between<br>
&gt;&gt;&gt; the best fit curve and the original points. It can also export the results<br>
&gt;&gt;&gt; into an svg image, a latex document (using pstricks).<br>
&gt;&gt;&gt; Give it a look, and tell me what do you think:<br>
&gt;&gt;&gt; <a href="http://quickgit.kde.org/?p=scratch%2Flucatringali%2Fkartesio.git&amp;a=summary" target="_blank">http://quickgit.kde.org/?p=scratch%2Flucatringali%2Fkartesio.git&amp;a=summary</a><br>
&gt;&gt;&gt; Here&#39;s a screenshot:<br>
&gt;&gt;&gt; <a href="https://docs.google.com/leaf" target="_blank">https://docs.google.com/leaf</a>?<br>
&gt;id=0B6K8rmHlVyTFZTliYzIwMmEtODZlOS00NjhkLThiYjItNWM1YTIzMzBmNDc2&amp;hl=en<br>
&gt;&gt;&gt; Could it be included into kde-edu collection? What does it miss?<br>
&gt;&gt;<br>
&gt;&gt;As your application uses Maxima, the same thing can probably be done<br>
&gt;&gt;as a plugin for Cantor (<a href="http://edu.kde.org/applications/all/cantor/" target="_blank">http://edu.kde.org/applications/all/cantor/</a>).<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;--<br>
&gt;&gt;Alexander Potashev<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
kde-edu mailing list<br>
<a href="mailto:kde-edu@mail.kde.org">kde-edu@mail.kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-edu" target="_blank">https://mail.kde.org/mailman/listinfo/kde-edu</a><br>
</blockquote></div><br></div>