[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    [kde-edu]: R: Re: Review Request: Titration calculator in Kalzium
From:       LucaTringali <TRINGALINVENT () libero ! it>
Date:       2010-08-09 21:49:35
Message-ID: 17232663.1121271281390575160.JavaMail.defaultUser () defaultHost
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Ok, as I said, now I'm trying to explain the changes I made.




----Messaggio originale----

Da: etienne.rebetez@oberwallis.ch

Data: 04/08/2010 17.56

A: "KDE-Edu"<kde-edu@mail.kde.org>, "Rebetez Etienne"<etienne.rebetez@oberwallis.ch>, \
"Luca Tringali"<tringalinvent@libero.it>

Ogg: Re: [kde-edu]: Review Request: Titration calculator in Kalzium







 
  
   
    
     
      This is an automatically generated e-mail. To reply, visit:
      http://reviewboard.kde.org/r/4667/
     
    
   
   






 Hi
Sorry that it took so long. 

Basicaly the idea of the program is nice. But IMHO the code needs quite some more \
work/love. I think this comes from porting the old program to c++/qt, so there is \
still old code in it. I hope i don't discourage you by that many positions. I didn't \
check everithing but i think you get the idea.

My english is pretty bad, so if something isn't clear ask.

Regards Eti

 












 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/calculator.h
    

     (Diff revision 2)

    
   
  
 

 
  

   private:

  
 




 
 



 

  
    
    
    60
        titrationCalculator * m_titrationCalculator;    // The nuclear calculator
  

 



Update the comment too.

DONE








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/calculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   void calculator :: slotItemSelection(QTreeWidgetItem *item)

  
 




 
 



 

  
    
    
    95
      
  

 



I once have been told to remove the not needed spaces. They are indicated with that \
red color.

DONE








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.h
    

     (Diff revision 2)

    
   
  
 

 
  

   

  
 




 
 



 

  
    
    
    37
    class titrationCalculator : public QFrame
  

 



Why QFrame? QWidget should be suficiant.

DONE








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.h
    

     (Diff revision 2)

    
   
  
 

 
  

   

  
 




 
 



 

  
    
    
    43
        ~titrationCalculator();
  

  
    
    
    44
        void resize();
  

  
    
    
    45
        int zoom;
  

  
    
    
    46
        int width;
  

  
    
    
    47
        int height;
  

  
    
    
    48
        int end;
  

  
    
    
    49
        int lettere;
  

  
    
    
    50
        int temponu;
  

  
    
    
    51
        double a;
  

  
    
    
    52
        void plot();
  

 



No variable should be public. Make them private.
If another class needs that value, make a function to get or set the value. That way \
you have a nice api. Also indicate with a prefix (m_) that those varaibles are \
members of that class.

DONE








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    72
    void titrationCalculator::plot()
  

 



the plot function does far more then plot. 
Trying to split it in i.e dataGathering, axis, calculation, formating output or so, \
might help reading and maintain the code. For instantce, it's hard to find out where \
the actual calculation takes place.

If you really need it i can do it, but it will make the code really confuse, because \
the plot drawing is done in different steps and they depend from the result of the \
previous step.








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    74
        QImage image(width, height, QImage::Format_Indexed8);
  

 



Why do you use the QImage class for the plot? QGraphicsView or kplot would imho have \
much more comfort. Check also the code from the other kdeedu plot programs to see how \
they do it. To generate an image (pixmap in this case) you can always do 
pix = QPixmap::grabWidget(m_myPlotWidget);


Well, the plot is not very interesting... I added it just because it seems ugly to me \
an analitic program that doesn't show the result in a graphical way. The only \
interesting informations came from the notes box. The plot gives just an idea of what \
you have found, but in a laboratory relation you don't need it. Anyway, I could use \
kplot, if you want.








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    76
        value = qRgb(240, 240, 240); // light gray..
  

 



QColor(Qt::lightGray) would do the same.

Seems that the setColor function works fine only with QRGB parameter.








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    88
        int wm = width/2;
  

  
    
    
    89
        int hm = height/2;
  

 



Can you give meanigfull names to the variables.
Some valiables seem also to be italian;)

Ok, I also decided that those variables weren't needed, so I deleted them.








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    110
           QTableWidgetItem *titemp = uid.tableWidget->item(0,0) ;
  

 



Would a 
if ( !uid.talbeWidget->item(0,0)->text().isEmpty() )
also do the trick?

DONE








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    111
           if (!titemp || titemp->text().isEmpty())
  

  
    
    
    112
           {
  

  
    
    
    113
               //go on
  

  
    
    
    114
           }else {
  

 



Try to fromat the code cleaner and try to make smarter if/else's. This else is way to \
long. It's not obvius where it ends. (KDevelop has a nice code format function that \
does the boring work.)

DONE








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    117
            for (int i=0; i<uid.tableWidget->rowCount() ; i++)
  

  
    
    
    118
           {
  

  
    
    
    119
                QTableWidgetItem *titem = uid.tableWidget->item(i,0) ;
  

  
    
    
    120
                QTableWidgetItem *titemo = uid.tableWidget->item(i,1) ;
  

  
    
    
    121
                if (!titem || titem->text().isEmpty())
  

  
    
    
    122
                {
  

 



I am not sure if that method eats unnessery RAM. Acessing the tableWidget directly \
might be a better approach.


You were right, i solved it.








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    127
                        QByteArray ba = yvalueq.toLatin1();
  

  
    
    
    128
                        char *yvaluen = ba.data();
  

  
    
    
    129
                        strcpy(yvalue,yvaluen);
  

  
    
    
    130
                        tmpy = 1;
  

 



do you realy need to convert the QString to char? (QList?)

Yes because I need to read one character at a time, QList make things more complex.








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    154
        if (mreporto!="") uid.note->setText("Theorical Curve: "+mreporto);
  

  
    
    
    155
        if (mreporto!="") {
  

  
    
    
    156
            for (int i=0;i<width;i++) {
  

  
    
    
    157
            double id = i;
  

 



Use QString() insteat of "".
Put visible Strings always in a i18n() function for translation.
There is twice the same "if" statement.

DONE








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    188
               int totaldata=0;
  

  
    
    
    189
               for (int i=0; i<uid.tableWidget_2->rowCount() ; i++){
  

  
    
    
    190
                   QTableWidgetItem *titem = uid.tableWidget_2->item(i,0) ;
  

  
    
    
    191
                   QTableWidgetItem *titemo = uid.tableWidget_2->item(i,1) ;
  

  
    
    
    192
                   if (!titem || titem->text().isEmpty()) {
  

  
    
    
    193
                       break;
  

 



Thats the second thime you do this. 
Makeing a function that gets the data from tableWidget and put it in a QList of some \
sort would make the code cleaner. It's another table. Anyway I settled it up.








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    230
               sprintf( s_cp, "%.2f", equval );
  

 



QString::number(a) would do the same.
DONE








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    248
    
  

  
    
    
    249
            QGraphicsScene *scene = new QGraphicsScene (this);
  

  
    
    
    250
            QPixmap mpixmap = QPixmap::fromImage(image).scaled(zoom,zoom) ;
  

  
    
    
    251
            scene->addPixmap(mpixmap);
  

  
    
    
    252
    
  

  
    
    
    253
            uid.graphicsView->setScene(scene);
  

 



Ah, there is a qgraphicsScene/view. I can do more than that;) qt documentation is \
your frend.

I thought this was the best way to use it, but if you know something better, please \
tell it to me.








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    278
                            if (!(yvalue[i]=='q' or yvalue[i]=='w' or yvalue[i]=='e' \
or yvalue[i]=='r' or yvalue[i]=='t' or yvalue[i]=='y' or yvalue[i]=='u' or \
yvalue[i]=='i' or yvalue[i]=='o' or yvalue[i]=='p' or yvalue[i]=='a' or \
yvalue[i]=='s' or yvalue[i]=='d' or yvalue[i]=='f' or yvalue[i]=='g' or \
yvalue[i]=='h' or yvalue[i]=='j' or yvalue[i]=='k' or yvalue[i]=='l' or \
yvalue[i]=='z' or yvalue[i]=='x' or yvalue[i]=='c' or yvalue[i]=='v' or \
yvalue[i]=='b' or yvalue[i]=='n' or yvalue[i]=='m' or yvalue[i]=='+' or \
yvalue[i]=='-' or yvalue[i]=='^' or yvalue[i]=='*' or yvalue[i]=='/' or \
yvalue[i]=='(' or yvalue[i]==')' or yvalue[i]=='Q' or yvalue[i]=='W' or \
yvalue[i]=='E' or yvalue[i]=='R' or yvalue[i]=='T' or yvalue[i]=='Y' or \
yvalue[i]=='U' or yvalue[i]=='I' or yvalue[i]=='O' or yvalue[i]=='P' or \
yvalue[i]=='A' or yvalue[i]=='S' or yvalue[i]=='D' or yvalue[i]=='F' or \
yvalue[i]=='G' or yvalue[i]=='H' or yvalue[i]=='J' or yvalue[i]=='K' or \
yvalue[i]=='L' or yvalue[i]=='Z' or yvalue[i]=='X' or yvalue[i]=='C' or \
yvalue[i]=='V' or yvalue[i]=='B' or yvalue[i]=='N' or yvalue[i]=='M' or \
yvalue[i]=='1' or yvalue[i]=='2' or yvalue[i]=='3' or yvalue[i]=='4' or \
yvalue[i]=='5' or yvalue[i]=='6' or yvalue[i]=='7' or yvalue[i]=='8' or \
yvalue[i]=='9' or yvalue[i]=='0' or yvalue[i]=='.' or yvalue[i]==',')) break; //if \
current value is not a permitted value, this means that something is wrong  

 



Regexp?


Well, it's not very nice, but it works fine and it's simple








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    422
        QMessageBox::information(this, "IceeQt Rapid Help", "There are two ways to \
use IceeQt:\n\nTheorical Equations\n Here you can fill the table with the equations \
you have previously obtained for the chemical equilibria. FOR EXAMPLE if you have \
this reaction A + B -> C + D then you will have the equation K=(C*D)/(A*B) so you \
must write 'K' in the Parameter column and '(C*D)/(A*B)' in the Value column. If you \
want to assign a known value to a parameter you can simply write the numeric value in \
the Value field. FOR EXAMPLE you can use the system \nA=(C*D)/(B*K) \nK=10^-3 \nC=OH \
\nOH=(10^-14)/H \nH=10^-4 \nB=6*(10^-2) \nThen you have to write D as X axis and A as \
Y axis: so you will find out how the concentration of A change in function of D \
concentration.\nPlease don't use parenthesis for exponents: 10^-3 is correct, while \
10^(-3) is wrong. \n\nExperimental Values\n You can use this program to draw the plot \
of your experimental data obtained during a titration and find out the volume of \
equivalence. It's strongly recommended to insert a even number of points, because of \
the best fit algorithm, sorted by volume (the X axis value).\n\nPlot\n The plot shows \
in red the curve that cames from theorical equations, in blue the experimental \
points, and in green the aproximated curve for experimental points.");  

 



Adding a html (or somthing else) file somewhere and loading it here would be nice. \
that way the help can be edited without changing the source code.

I decided to remove it... its' better to include this text into the kalzium guide.








 
  
   
    /trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp
    

     (Diff revision 2)

    
   
  
 

 
  

   
   titrationCalculator:: ~titrationCalculator()

  
 




 
 



 

  
    
    
    439
        for (int i=0; i<uid.tableWidget->rowCount() ; i++){
  

  
    
    
    440
            QTableWidgetItem *titem = new QTableWidgetItem ;
  

  
    
    
    441
            titem->setText("");
  

  
    
    
    442
            uid.tableWidget->setItem(i,0,titem);
  

  
    
    
    443
            QTableWidgetItem *titemo = new QTableWidgetItem ;
  

  
    
    
    444
            titemo->setText("");
  

  
    
    
    445
            uid.tableWidget->setItem(i,1,titemo);
  

 



some default values would help understand the programm. if everthing is empty it's \
not easy to "just" try the program out.

I included it into the "Example" button code so it fills the tables with the example \
values.





- Rebetez
Thank you for the interest you put into this.


Luca Tringali


[Attachment #5 (text/html)]

<p>Ok, as I said, now I'm trying to explain the changes I made.<br>
<br></p>
<blockquote>
----Messaggio originale----<br>
Da: etienne.rebetez@oberwallis.ch<br>
Data: 04/08/2010 17.56<br>
A: "KDE-Edu"&lt;kde-edu@mail.kde.org&gt;, "Rebetez \
Etienne"&lt;etienne.rebetez@oberwallis.ch&gt;, "Luca \
                Tringali"&lt;tringalinvent@libero.it&gt;<br>
Ogg: Re: [kde-edu]: Review Request: Titration calculator in Kalzium<br>
<br>




 
  <div style="font-family: Verdana,Arial,Helvetica,Sans-Serif;" \
mce_style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">  <table \
class="mceItemTable" style="border: 1px solid rgb(201, 195, 153);" mce_style="border: \
1px #c9c399 solid;" cellpadding="8" width="100%" bgcolor="#f9f3c9">  <tbody><tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://reviewboard.kde.org/r/4667/" \
mce_href="http://reviewboard.kde.org/r/4667/">http://reviewboard.kde.org/r/4667/</a>  \
</td>  </tr>
   </tbody></table>
   <br>





 <pre style="white-space: pre-wrap; word-wrap: break-word;" mce_style="white-space: \
pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;">Hi Sorry that it took so long. 

Basicaly the idea of the program is nice. But IMHO the code needs quite some more \
work/love. I think this comes from porting the old program to c++/qt, so there is \
still old code in it. I hope i don't discourage you by that many positions. I didn't \
check everithing but i think you get the idea.

My english is pretty bad, so if something isn't clear ask.

Regards Eti
</pre>
 <br>





<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31400#file31400line60" \
mce_href="../../../../r/4667/diff/2/?file=31400#file31400line60" style="color: black; \
font-weight: bold; text-decoration: underline;" mce_style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/calculator.h</a>  <span \
style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="4"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">private:</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">60</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">titrationCalculator</span> <span class="o">*</span> <span \
class="n">m_titrationCalculator</span><span class="p">;</span>    <span class="c1">// \
The nuclear calculator</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Update the \
comment too.</pre> </div>
DONE<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31401#file31401line95" \
mce_href="../../../../r/4667/diff/2/?file=31401#file31401line95" style="color: black; \
font-weight: bold; text-decoration: underline;" mce_style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/calculator.cpp</a>  <span \
style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="4"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">void calculator :: \
slotItemSelection(QTreeWidgetItem *item)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">95</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="ew">  \
</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I once have \
been told to remove the not needed spaces. They are indicated with that red \
color.</pre> </div>
DONE<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31403#file31403line37" \
mce_href="../../../../r/4667/diff/2/?file=31403#file31403line37" style="color: black; \
font-weight: bold; text-decoration: underline;" mce_style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.h</a>  <span \
style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="4"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">37</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="n">class</span> <span class="n">titrationCalculator</span> <span \
class="o">:</span> <span class="n">public</span> <span \
class="n">QFrame</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Why QFrame? \
QWidget should be suficiant.</pre> </div>
DONE<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31403#file31403line43" \
mce_href="../../../../r/4667/diff/2/?file=31403#file31403line43" style="color: black; \
font-weight: bold; text-decoration: underline;" mce_style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.h</a>  <span \
style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="4"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">43</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="o">~</span><span class="n">titrationCalculator</span><span \
class="p">();</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">44</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">void</span> <span class="n">resize</span><span \
class="p">();</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">45</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">int</span> <span class="n">zoom</span><span class="p">;</span></pre></td>  \
</tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">46</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">int</span> <span class="n">width</span><span class="p">;</span></pre></td> \
</tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">47</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">int</span> <span class="n">height</span><span \
class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">48</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">int</span> <span class="n">end</span><span class="p">;</span></pre></td>  \
</tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">49</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">int</span> <span class="n">lettere</span><span \
class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">50</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">int</span> <span class="n">temponu</span><span \
class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">51</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">double</span> <span class="n">a</span><span class="p">;</span></pre></td>  \
</tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">52</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">void</span> <span class="n">plot</span><span \
class="p">();</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">No variable \
should be public. Make them private. If another class needs that value, make a \
function to get or set the value. That way you have a nice api. Also indicate with a \
prefix (m_) that those varaibles are members of that class.</pre> </div>
DONE<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line72" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line72" style="color: black; \
font-weight: bold; text-decoration: underline;" mce_style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">72</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="kt">void</span> <span class="n">titrationCalculator</span><span \
class="o">::</span><span class="n">plot</span><span class="p">()</span></pre></td>  \
</tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">the plot \
function does far more then plot.  Trying to split it in i.e dataGathering, axis, \
calculation, formating output or so, might help reading and maintain the code. For \
instantce, it's hard to find out where the actual calculation takes place.</pre> \
</div> If you really need it i can do it, but it will make the code really confuse, \
because the plot drawing is done in different steps and they depend from the result \
of the previous step.<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line74" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line74" style="color: black; \
font-weight: bold; text-decoration: underline;" mce_style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">74</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QImage</span> <span class="n">image</span><span class="p">(</span><span \
class="n">width</span><span class="p">,</span> <span class="n">height</span><span \
class="p">,</span> <span class="n">QImage</span><span class="o">::</span><span \
class="n">Format_Indexed8</span><span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Why do you \
use the QImage class for the plot? QGraphicsView or kplot would imho have much more \
comfort. Check also the code from the other kdeedu plot programs to see how they do \
it. To generate an image (pixmap in this case) you can always do 
pix = QPixmap::grabWidget(m_myPlotWidget);
</pre>
</div>
Well, the plot is not very interesting... I added it just because it seems ugly to me \
an analitic program that doesn't show the result in a graphical way. The only \
interesting informations came from the notes box. The plot gives just an idea of what \
you have found, but in a laboratory relation you don't need it. Anyway, I could use \
kplot, if you want.<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line76" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line76" style="color: black; \
font-weight: bold; text-decoration: underline;" mce_style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">76</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">value</span> <span class="o">=</span> <span class="n">qRgb</span><span \
class="p">(</span><span class="mi">240</span><span class="p">,</span> <span \
class="mi">240</span><span class="p">,</span> <span class="mi">240</span><span \
class="p">);</span> <span class="c1">// light gray..</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">QColor(Qt::lightGray) would do the same.</pre> </div>
Seems that the setColor function works fine only with QRGB parameter.<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line88" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line88" style="color: black; \
font-weight: bold; text-decoration: underline;" mce_style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">88</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">int</span> <span class="n">wm</span> <span class="o">=</span> <span \
class="n">width</span><span class="o">/</span><span class="mi">2</span><span \
class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">89</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kt">int</span> <span class="n">hm</span> <span class="o">=</span> <span \
class="n">height</span><span class="o">/</span><span class="mi">2</span><span \
class="p">;</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Can you \
give meanigfull names to the variables. Some valiables seem also to be \
italian;)</pre> </div>
Ok, I also decided that those variables weren't needed, so I deleted them.<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line110" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line110" style="color: \
black; font-weight: bold; text-decoration: underline;" mce_style="color: black; \
font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">110</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">       <span \
class="n">QTableWidgetItem</span> <span class="o">*</span><span \
class="n">titemp</span> <span class="o">=</span> <span class="n">uid</span><span \
class="p">.</span><span class="n">tableWidget</span><span class="o">-&gt;</span><span \
class="n">item</span><span class="p">(</span><span class="mi">0</span><span \
class="p">,</span><span class="mi">0</span><span class="p">)</span> <span \
class="p">;</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Would a  if \
( !uid.talbeWidget-&gt;item(0,0)-&gt;text().isEmpty() ) also do the trick?</pre>
</div>
DONE<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line111" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line111" style="color: \
black; font-weight: bold; text-decoration: underline;" mce_style="color: black; \
font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">111</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">       <span \
class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="n">titemp</span> <span class="o">||</span> <span class="n">titemp</span><span \
class="o">-&gt;</span><span class="n">text</span><span class="p">().</span><span \
class="n">isEmpty</span><span class="p">())</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">112</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">       <span \
class="p">{</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">113</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">           <span \
class="c1">//go on</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">114</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">       <span \
class="p">}</span><span class="k">else</span> <span class="p">{</span></pre></td>  \
</tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Try to \
fromat the code cleaner and try to make smarter if/else's. This else is way to long. \
It's not obvius where it ends. (KDevelop has a nice code format function that does \
the boring work.)</pre> </div>
DONE<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line117" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line117" style="color: \
black; font-weight: bold; text-decoration: underline;" mce_style="color: black; \
font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">117</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span \
class="n">i</span><span class="o">=</span><span class="mi">0</span><span \
class="p">;</span> <span class="n">i</span><span class="o">&lt;</span><span \
class="n">uid</span><span class="p">.</span><span class="n">tableWidget</span><span \
class="o">-&gt;</span><span class="n">rowCount</span><span class="p">()</span> <span \
class="p">;</span> <span class="n">i</span><span class="o">++</span><span \
class="p">)</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">118</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">       <span \
class="p">{</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">119</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span \
class="n">QTableWidgetItem</span> <span class="o">*</span><span \
class="n">titem</span> <span class="o">=</span> <span class="n">uid</span><span \
class="p">.</span><span class="n">tableWidget</span><span class="o">-&gt;</span><span \
class="n">item</span><span class="p">(</span><span class="n">i</span><span \
class="p">,</span><span class="mi">0</span><span class="p">)</span> <span \
class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">120</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span \
class="n">QTableWidgetItem</span> <span class="o">*</span><span \
class="n">titemo</span> <span class="o">=</span> <span class="n">uid</span><span \
class="p">.</span><span class="n">tableWidget</span><span class="o">-&gt;</span><span \
class="n">item</span><span class="p">(</span><span class="n">i</span><span \
class="p">,</span><span class="mi">1</span><span class="p">)</span> <span \
class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">121</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span \
class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="n">titem</span> <span class="o">||</span> <span class="n">titem</span><span \
class="o">-&gt;</span><span class="n">text</span><span class="p">().</span><span \
class="n">isEmpty</span><span class="p">())</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">122</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span \
class="p">{</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I am not \
sure if that method eats unnessery RAM. Acessing the tableWidget directly might be a \
better approach. </pre>
</div>
You were right, i solved it.<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line127" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line127" style="color: \
black; font-weight: bold; text-decoration: underline;" mce_style="color: black; \
font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">127</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">                    \
<span class="n">QByteArray</span> <span class="n">ba</span> <span class="o">=</span> \
<span class="n">yvalueq</span><span class="p">.</span><span \
class="n">toLatin1</span><span class="p">();</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">128</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">                    \
<span class="kt">char</span> <span class="o">*</span><span class="n">yvaluen</span> \
<span class="o">=</span> <span class="n">ba</span><span class="p">.</span><span \
class="n">data</span><span class="p">();</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">129</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">                    \
<span class="n">strcpy</span><span class="p">(</span><span \
class="n">yvalue</span><span class="p">,</span><span class="n">yvaluen</span><span \
class="p">);</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">130</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">                    \
<span class="n">tmpy</span> <span class="o">=</span> <span class="mi">1</span><span \
class="p">;</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">do you \
realy need to convert the QString to char? (QList?)</pre> </div>
Yes because I need to read one character at a time, QList make things more \
complex.<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line154" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line154" style="color: \
black; font-weight: bold; text-decoration: underline;" mce_style="color: black; \
font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">154</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">if</span> <span class="p">(</span><span class="n">mreporto</span><span \
class="o">!=</span><span class="s">""</span><span class="p">)</span> <span \
class="n">uid</span><span class="p">.</span><span class="n">note</span><span \
class="o">-&gt;</span><span class="n">setText</span><span class="p">(</span><span \
class="s">"Theorical Curve: "</span><span class="o">+</span><span \
class="n">mreporto</span><span class="p">);</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">155</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">if</span> <span class="p">(</span><span class="n">mreporto</span><span \
class="o">!=</span><span class="s">""</span><span class="p">)</span> <span \
class="p">{</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">156</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span \
class="n">i</span><span class="o">=</span><span class="mi">0</span><span \
class="p">;</span><span class="n">i</span><span class="o">&lt;</span><span \
class="n">width</span><span class="p">;</span><span class="n">i</span><span \
class="o">++</span><span class="p">)</span> <span class="p">{</span></pre></td>  \
</tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">157</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="kt">double</span> <span class="n">id</span> <span class="o">=</span> <span \
class="n">i</span><span class="p">;</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Use \
QString() insteat of "". Put visible Strings always in a i18n() function for \
translation. There is twice the same "if" statement.</pre>
</div>
DONE<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line188" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line188" style="color: \
black; font-weight: bold; text-decoration: underline;" mce_style="color: black; \
font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">188</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">           <span \
class="kt">int</span> <span class="n">totaldata</span><span class="o">=</span><span \
class="mi">0</span><span class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">189</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">           <span \
class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span \
class="n">i</span><span class="o">=</span><span class="mi">0</span><span \
class="p">;</span> <span class="n">i</span><span class="o">&lt;</span><span \
class="n">uid</span><span class="p">.</span><span class="n">tableWidget_2</span><span \
class="o">-&gt;</span><span class="n">rowCount</span><span class="p">()</span> <span \
class="p">;</span> <span class="n">i</span><span class="o">++</span><span \
class="p">){</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">190</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">               \
<span class="n">QTableWidgetItem</span> <span class="o">*</span><span \
class="n">titem</span> <span class="o">=</span> <span class="n">uid</span><span \
class="p">.</span><span class="n">tableWidget_2</span><span \
class="o">-&gt;</span><span class="n">item</span><span class="p">(</span><span \
class="n">i</span><span class="p">,</span><span class="mi">0</span><span \
class="p">)</span> <span class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">191</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">               \
<span class="n">QTableWidgetItem</span> <span class="o">*</span><span \
class="n">titemo</span> <span class="o">=</span> <span class="n">uid</span><span \
class="p">.</span><span class="n">tableWidget_2</span><span \
class="o">-&gt;</span><span class="n">item</span><span class="p">(</span><span \
class="n">i</span><span class="p">,</span><span class="mi">1</span><span \
class="p">)</span> <span class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">192</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">               \
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="n">titem</span> <span class="o">||</span> <span class="n">titem</span><span \
class="o">-&gt;</span><span class="n">text</span><span class="p">().</span><span \
class="n">isEmpty</span><span class="p">())</span> <span \
class="p">{</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">193</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">                   \
<span class="k">break</span><span class="p">;</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Thats the \
second thime you do this.  Makeing a function that gets the data from tableWidget and \
put it in a QList of some sort would make the code cleaner.</pre> </div>It's another \
table. Anyway I settled it up.<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line230" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line230" style="color: \
black; font-weight: bold; text-decoration: underline;" mce_style="color: black; \
font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">230</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">           <span \
class="n">sprintf</span><span class="p">(</span> <span class="n">s_cp</span><span \
class="p">,</span> <span class="s">"%.2f"</span><span class="p">,</span> <span \
class="n">equval</span> <span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">QString::number(a) would do the same.</pre> </div>DONE<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line248" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line248" style="color: \
black; font-weight: bold; text-decoration: underline;" mce_style="color: black; \
font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">248</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">249</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">QGraphicsScene</span> <span class="o">*</span><span class="n">scene</span> \
<span class="o">=</span> <span class="k">new</span> <span \
class="n">QGraphicsScene</span> <span class="p">(</span><span \
class="k">this</span><span class="p">);</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">250</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">QPixmap</span> <span class="n">mpixmap</span> <span class="o">=</span> \
<span class="n">QPixmap</span><span class="o">::</span><span \
class="n">fromImage</span><span class="p">(</span><span class="n">image</span><span \
class="p">).</span><span class="n">scaled</span><span class="p">(</span><span \
class="n">zoom</span><span class="p">,</span><span class="n">zoom</span><span \
class="p">)</span> <span class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">251</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">scene</span><span class="o">-&gt;</span><span \
class="n">addPixmap</span><span class="p">(</span><span class="n">mpixmap</span><span \
class="p">);</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">252</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">253</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">uid</span><span class="p">.</span><span class="n">graphicsView</span><span \
class="o">-&gt;</span><span class="n">setScene</span><span class="p">(</span><span \
class="n">scene</span><span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ah, there \
is a qgraphicsScene/view. I can do more than that;) qt documentation is your \
frend.</pre> </div>
I thought this was the best way to use it, but if you know something better, please \
tell it to me.<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line278" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line278" style="color: \
black; font-weight: bold; text-decoration: underline;" mce_style="color: black; \
font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">278</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">                    \
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="p">(</span><span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'q'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'w'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'e'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'r'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'t'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'y'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'u'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'i'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'o'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'p'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'a'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'s'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'d'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'f'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'g'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'h'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'j'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'k'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'l'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'z'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'x'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'c'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'v'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'b'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'n'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'m'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'+'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'-'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'^'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'*'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'/'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'('</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">')'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'Q'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'W'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'E'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'R'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'T'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'Y'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'U'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'I'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'O'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'P'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'A'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'S'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'D'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'F'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'G'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'H'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'J'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'K'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'L'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'Z'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'X'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'C'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'V'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'B'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'N'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'M'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'1'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'2'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'3'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'4'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'5'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'6'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'7'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'8'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">'9'</span> <span class="n">or</span> <span \
class="n">yvalue</span><span class="p">[</span><span class="n">i</span><span \
class="p">]</span><span class="o">==</span><span class="sc">'0'</span> <span \
class="n">or</span> <span class="n">yvalue</span><span class="p">[</span><span \
class="n">i</span><span class="p">]</span><span class="o">==</span><span \
class="sc">'.'</span> <span class="n">or</span> <span class="n">yvalue</span><span \
class="p">[</span><span class="n">i</span><span class="p">]</span><span \
class="o">==</span><span class="sc">','</span><span class="p">))</span> <span \
class="k">break</span><span class="p">;</span> <span class="c1">//if current value is \
not a permitted value, this means that something is wrong</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Regexp? \
</pre> </div>
Well, it's not very nice, but it works fine and it's simple<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line422" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line422" style="color: \
black; font-weight: bold; text-decoration: underline;" mce_style="color: black; \
font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">422</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QMessageBox</span><span class="o">::</span><span \
class="n">information</span><span class="p">(</span><span class="k">this</span><span \
class="p">,</span> <span class="s">"IceeQt Rapid Help"</span><span class="p">,</span> \
<span class="s">"There are two ways to use IceeQt:</span><span \
class="se">\n\n</span><span class="s">Theorical Equations</span><span \
class="se">\n</span><span class="s"> Here you can fill the table with the equations \
you have previously obtained for the chemical equilibria. FOR EXAMPLE if you have \
this reaction A + B -&gt; C + D then you will have the equation K=(C*D)/(A*B) so you \
must write 'K' in the Parameter column and '(C*D)/(A*B)' in the Value column. If you \
want to assign a known value to a parameter you can simply write the numeric value in \
the Value field. FOR EXAMPLE you can use the system </span><span \
class="se">\n</span><span class="s">A=(C*D)/(B*K) </span><span \
class="se">\n</span><span class="s">K=10^-3 </span><span class="se">\n</span><span \
class="s">C=OH </span><span class="se">\n</span><span class="s">OH=(10^-14)/H \
</span><span class="se">\n</span><span class="s">H=10^-4 </span><span \
class="se">\n</span><span class="s">B=6*(10^-2) </span><span \
class="se">\n</span><span class="s">Then you have to write D as X axis and A as Y \
axis: so you will find out how the concentration of A change in function of D \
concentration.</span><span class="se">\n</span><span class="s">Please don't use \
parenthesis for exponents: 10^-3 is correct, while 10^(-3) is wrong. </span><span \
class="se">\n\n</span><span class="s">Experimental Values</span><span \
class="se">\n</span><span class="s"> You can use this program to draw the plot of \
your experimental data obtained during a titration and find out the volume of \
equivalence. It's strongly recommended to insert a even number of points, because of \
the best fit algorithm, sorted by volume (the X axis value).</span><span \
class="se">\n\n</span><span class="s">Plot</span><span class="se">\n</span><span \
class="s"> The plot shows in red the curve that cames from theorical equations, in \
blue the experimental points, and in green the aproximated curve for experimental \
points."</span><span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Adding a \
html (or somthing else) file somewhere and loading it here would be nice. that way \
the help can be edited without changing the source code.</pre> </div>
I decided to remove it... its' better to include this text into the kalzium \
guide.<br>

<div>




<table class="mceItemTable" style="border: 1px solid rgb(192, 192, 192); \
border-collapse: collapse;" mce_style="border: 1px solid #C0C0C0; border-collapse: \
collapse; margin: 2px padding: 2px;" width="100%" bgcolor="white" border="0">  \
<thead>  <tr>
   <th colspan="4" style="border-bottom: 1px solid rgb(192, 192, 192); padding: 4px \
8px; font-size: 9pt; text-align: left;" mce_style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;" bgcolor="#f0f0f0">  <a \
href="/r/4667/diff/2/?file=31404#file31404line439" \
mce_href="../../../../r/4667/diff/2/?file=31404#file31404line439" style="color: \
black; font-weight: bold; text-decoration: underline;" mce_style="color: black; \
font-weight: bold; text-decoration: \
underline;">/trunk/KDE/kdeedu/kalzium/src/calculator/titrationCalculator.cpp</a>  \
<span style="font-weight: normal;" mce_style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="padding: 4px 8px; background-color: rgb(228, 217, 203); text-align: \
center;" mce_style="background-color: #e4d9cb; padding: 4px 8px; text-align: \
center;">  <tr>

   <td colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <td \
colspan="2"><pre style="margin: 0pt; font-size: 8pt; line-height: 140%;" \
mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">titrationCalculator:: \
~titrationCalculator()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">439</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span \
class="n">i</span><span class="o">=</span><span class="mi">0</span><span \
class="p">;</span> <span class="n">i</span><span class="o">&lt;</span><span \
class="n">uid</span><span class="p">.</span><span class="n">tableWidget</span><span \
class="o">-&gt;</span><span class="n">rowCount</span><span class="p">()</span> <span \
class="p">;</span> <span class="n">i</span><span class="o">++</span><span \
class="p">){</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">440</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">QTableWidgetItem</span> <span class="o">*</span><span \
class="n">titem</span> <span class="o">=</span> <span class="k">new</span> <span \
class="n">QTableWidgetItem</span> <span class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">441</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">titem</span><span class="o">-&gt;</span><span class="n">setText</span><span \
class="p">(</span><span class="s">""</span><span class="p">);</span></pre></td>  \
</tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">442</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">uid</span><span class="p">.</span><span class="n">tableWidget</span><span \
class="o">-&gt;</span><span class="n">setItem</span><span class="p">(</span><span \
class="n">i</span><span class="p">,</span><span class="mi">0</span><span \
class="p">,</span><span class="n">titem</span><span class="p">);</span></pre></td>  \
</tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">443</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">QTableWidgetItem</span> <span class="o">*</span><span \
class="n">titemo</span> <span class="o">=</span> <span class="k">new</span> <span \
class="n">QTableWidgetItem</span> <span class="p">;</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">444</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">titemo</span><span class="o">-&gt;</span><span \
class="n">setText</span><span class="p">(</span><span class="s">""</span><span \
class="p">);</span></pre></td>  </tr>

  <tr>
    <th style="border-right: 1px solid rgb(192, 192, 192);" mce_style="border-right: \
1px solid #C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2"></font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
style="border-left: 1px solid rgb(192, 192, 192); border-right: 1px solid rgb(192, \
192, 192);" mce_style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right" bgcolor="#b1ebb0"><font size="2">445</font></th>  <td \
width="50%" bgcolor="#c5ffc4"><pre style="margin: 0pt; font-size: 8pt; line-height: \
140%;" mce_style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">uid</span><span class="p">.</span><span class="n">tableWidget</span><span \
class="o">-&gt;</span><span class="n">setItem</span><span class="p">(</span><span \
class="n">i</span><span class="p">,</span><span class="mi">1</span><span \
class="p">,</span><span class="n">titemo</span><span class="p">);</span></pre></td>  \
</tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; word-wrap: break-word;" \
mce_style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">some \
default values would help understand the programm. if everthing is empty it's not \
easy to "just" try the program out.</pre> </div>
I included it into the "Example" button code so it fills the tables with the example \
values.<br>



<p>- Rebetez</p></div></blockquote><p>Thank you for the interest you put into \
this.</p><p><br></p><p>Luca Tringali<br></p>



_______________________________________________
kde-edu mailing list
kde-edu@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-edu


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic