summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-sheet/sheet.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-sheet/sheet.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/sheet.cpp122
1 files changed, 85 insertions, 37 deletions
diff --git a/noncore/apps/opie-sheet/sheet.cpp b/noncore/apps/opie-sheet/sheet.cpp
index 88847da..477c982 100644
--- a/noncore/apps/opie-sheet/sheet.cpp
+++ b/noncore/apps/opie-sheet/sheet.cpp
@@ -1,9 +1,28 @@
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
+/*
+ =. This file is part of the Opie Project
+ .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org>
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
@@ -16,3 +35,6 @@
+/* QT */
#include <qmessagebox.h>
+
+/* STD */
#include <math.h>
@@ -50,4 +72,3 @@ Sheet::Sheet(int numRows, int numCols, QWidget *parent)
Sheet::~Sheet()
-{
-}
+{}
@@ -69,3 +90,4 @@ void Sheet::slotCellSelected(int row, int col)
emit currentDataChanged(cellData->data);
- }else
+ }
+ else
emit currentDataChanged("");
@@ -230,3 +252,4 @@ double Sheet::BesselI0(double x)
ans=1.0+y*(3.5156229+y*(3.0899424+y*(1.2067492 +y*(0.2659732+y*(0.360768e-1+y*0.45813e-2)))));
- }else
+ }
+ else
{
@@ -247,3 +270,4 @@ double Sheet::BesselI1(double x)
ans=ax*(0.5+y*(0.87890594+y*(0.51498869+y*(0.15084934 +y*(0.2658733e-1+y*(0.301532e-2+y*0.32411e-3))))));
- } else
+ }
+ else
{
@@ -294,3 +318,4 @@ double Sheet::BesselK0(double x)
ans=(-log(x/2.0)*BesselI0(x))+(-0.57721566+y*(0.42278420 +y*(0.23069756+y*(0.3488590e-1+y*(0.262698e-2 +y*(0.10750e-3+y*0.74e-5))))));
- } else
+ }
+ else
{
@@ -309,3 +334,4 @@ double Sheet::BesselK1(double x)
ans=(log(x/2.0)*BesselI1(x))+(1.0/x)*(1.0+y*(0.15443144 +y*(-0.67278579+y*(-0.18156897+y*(-0.1919402e-1 +y*(-0.110404e-2+y*(-0.4686e-4)))))));
- } else
+ }
+ else
{
@@ -344,3 +370,4 @@ double Sheet::BesselJ0(double x)
ans=ans1/ans2;
- } else
+ }
+ else
{
@@ -366,3 +393,4 @@ double Sheet::BesselY0(double x)
ans=(ans1/ans2)+0.636619772*BesselJ0(x)*log(x);
- } else
+ }
+ else
{
@@ -388,3 +416,4 @@ double Sheet::BesselJ1(double x)
ans=ans1/ans2;
- } else
+ }
+ else
{
@@ -409,3 +438,4 @@ double Sheet::BesselY1(double x)
ans=(ans1/ans2)+0.636619772*(BesselJ1(x)*log(x)-1.0/x);
- } else
+ }
+ else
{
@@ -460,3 +490,4 @@ double Sheet::BesselJ(int n, double x)
ans=bj;
- } else
+ }
+ else
{
@@ -520,3 +551,4 @@ double Sheet::GammaP(double a, double x)
return gamser;
- }else
+ }
+ else
{
@@ -546,3 +578,4 @@ void Sheet::GammaSeries(double *gamser, double a, double x, double *gln)
return;
- } else
+ }
+ else
{
@@ -560,3 +593,4 @@ void Sheet::GammaSeries(double *gamser, double a, double x, double *gln)
}
- } return;
+ }
+ return;
return;
@@ -664,3 +698,4 @@ double Sheet::functionSum(const QString &param1, const QString &param2)
return result;
- }else
+ }
+ else
{
@@ -791,3 +826,4 @@ double Sheet::functionSumSQ(const QString &param1, const QString &param2)
return result;
- }else
+ }
+ else
{
@@ -821,3 +857,4 @@ double Sheet::functionMin(const QString &param1, const QString &param2)
return min;
- }else
+ }
+ else
{
@@ -849,3 +886,4 @@ double Sheet::functionMax(const QString &param1, const QString &param2)
return max;
- }else
+ }
+ else
{
@@ -879,3 +917,4 @@ double Sheet::functionCount(const QString &param1, const QString &param2)
return divider;
- }else
+ }
+ else
{
@@ -994,3 +1033,4 @@ QString Sheet::calculateFunction(const QString &func, const QString &parameters,
if(text(row,col).length()==0) val1=1; else val1=0;
- }else
+ }
+ else
{
@@ -999,3 +1039,4 @@ QString Sheet::calculateFunction(const QString &func, const QString &parameters,
if(text(row,col).length()==0) val1=1; else val1=0;
- }else
+ }
+ else
{
@@ -1014,3 +1055,4 @@ QString Sheet::calculateFunction(const QString &func, const QString &parameters,
if(ok) val1=1; else val1=0;
- }else
+ }
+ else
{
@@ -1020,3 +1062,4 @@ QString Sheet::calculateFunction(const QString &func, const QString &parameters,
if(ok) val1=1; else val1=0;
- }else
+ }
+ else
{
@@ -1391,3 +1434,4 @@ QString Sheet::calculateFunction(const QString &func, const QString &parameters,
return QString(s1);
- }else
+ }
+ else
{
@@ -1554,3 +1598,4 @@ QString Sheet::calculateFunction(const QString &func, const QString &parameters,
return QString::number(GammaQ(floor(val1)+1, val2));
- }else
+ }
+ else
{
@@ -1568,3 +1613,4 @@ QString Sheet::calculateFunction(const QString &func, const QString &parameters,
return QString::number(GammaP(val2/2.0,val1*val1/2.0));
- } else
+ }
+ else
{
@@ -1584,3 +1630,4 @@ QString Sheet::calculateFunction(const QString &func, const QString &parameters,
return QString::number(GammaP(val2/2.0,val1/2.0));
- } else
+ }
+ else
{
@@ -2387,3 +2434,4 @@ void Expression::GetNext()
}//else if
-};//end function
+}
+;//end function