summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/infowin.h2
-rw-r--r--noncore/apps/opie-sheet/sheet.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-reader/infowin.h b/noncore/apps/opie-reader/infowin.h
index 6f0fb99..c003998 100644
--- a/noncore/apps/opie-reader/infowin.h
+++ b/noncore/apps/opie-reader/infowin.h
@@ -1,39 +1,39 @@
1#ifndef __INFOWIN_H 1#ifndef __INFOWIN_H
2#define __INFOWIN_H 2#define __INFOWIN_H
3 3
4#include <qlabel.h> 4#include <qlabel.h>
5class QString; 5class QString;
6class QMultiLineEdit; 6class QMultiLineEdit;
7 7
8class infowin : public QWidget 8class infowin : public QWidget
9{ 9{
10Q_OBJECT 10Q_OBJECT
11 QLabel* fileSize; 11 QLabel* fileSize;
12 QLabel* textSize; 12 QLabel* textSize;
13 QLabel* ratio; 13 QLabel* ratio;
14 QLabel* location; 14 QLabel* location;
15 QLabel* read; 15 QLabel* read;
16 QLabel* docread; 16 QLabel* docread;
17 QLabel* docSize; 17 QLabel* docSize;
18 QLabel* docLocation; 18 QLabel* docLocation;
19 QLabel* zoom; 19 QLabel* zoom;
20 QMultiLineEdit* aboutbox; 20 QMultiLineEdit* aboutbox;
21public: 21public:
22 infowin::infowin( QWidget *parent=0, const char *name=0, WFlags f = 0); 22 infowin( QWidget *parent=0, const char *name=0, WFlags f = 0);
23 void setFileSize(int sz) { fileSize->setNum(sz); } 23 void setFileSize(int sz) { fileSize->setNum(sz); }
24 void setTextSize(int sz) { textSize->setNum(sz); } 24 void setTextSize(int sz) { textSize->setNum(sz); }
25 void setRatio(int sz) { ratio->setText(QString().setNum(sz)+"%"); } 25 void setRatio(int sz) { ratio->setText(QString().setNum(sz)+"%"); }
26 void setLocation(int sz) { location->setNum(sz); } 26 void setLocation(int sz) { location->setNum(sz); }
27 void setRead(int sz) { read->setText(QString().setNum(sz)+"%"); } 27 void setRead(int sz) { read->setText(QString().setNum(sz)+"%"); }
28 void setDocRead(int sz) { docread->setText(QString().setNum(sz)+"%"); } 28 void setDocRead(int sz) { docread->setText(QString().setNum(sz)+"%"); }
29 void setZoom(int sz) { zoom->setText(QString().setNum(sz)+"%"); } 29 void setZoom(int sz) { zoom->setText(QString().setNum(sz)+"%"); }
30 void setDocSize(int sz) { docSize->setNum(sz); } 30 void setDocSize(int sz) { docSize->setNum(sz); }
31 void setDocLocation(int sz) { docLocation->setNum(sz); } 31 void setDocLocation(int sz) { docLocation->setNum(sz); }
32 void setAbout(const QString& s); 32 void setAbout(const QString& s);
33private slots: 33private slots:
34 void infoClose() { emit Close(); } 34 void infoClose() { emit Close(); }
35 signals: 35 signals:
36 void Close(); 36 void Close();
37}; 37};
38 38
39#endif 39#endif
diff --git a/noncore/apps/opie-sheet/sheet.h b/noncore/apps/opie-sheet/sheet.h
index 92c8061..8938511 100644
--- a/noncore/apps/opie-sheet/sheet.h
+++ b/noncore/apps/opie-sheet/sheet.h
@@ -49,97 +49,97 @@ typedef struct typeCellData
49 typeCellBorders borders; 49 typeCellBorders borders;
50 QBrush background; 50 QBrush background;
51 Qt::AlignmentFlags alignment; 51 Qt::AlignmentFlags alignment;
52 QColor fontColor; 52 QColor fontColor;
53 QFont font; 53 QFont font;
54 QString data; 54 QString data;
55}; 55};
56 56
57 57
58#define NONE_TOKEN 0 58#define NONE_TOKEN 0
59#define NUMBER_TOKEN 1 59#define NUMBER_TOKEN 1
60#define VARIABLE_TOKEN 2 60#define VARIABLE_TOKEN 2
61#define FUNCTION_TOKEN 3 61#define FUNCTION_TOKEN 3
62#define SYMBOL_TOKEN 4 62#define SYMBOL_TOKEN 4
63#define STRING_TOKEN 5 63#define STRING_TOKEN 5
64 64
65class Expression 65class Expression
66{ 66{
67public: 67public:
68 QString Body; 68 QString Body;
69 QList<QString> CompiledBody; 69 QList<QString> CompiledBody;
70 QList<int> CompiledBodyType; 70 QList<int> CompiledBodyType;
71 QString SYMBOL; 71 QString SYMBOL;
72 QString MATHSYMBOL; 72 QString MATHSYMBOL;
73 QArray<int> ArgsOfFunc; 73 QArray<int> ArgsOfFunc;
74 int FuncDepth; 74 int FuncDepth;
75 bool ErrorFound; 75 bool ErrorFound;
76 int n; // holds the current parser position 76 int n; // holds the current parser position
77 QString chunk; // the piece in the parser we are on 77 QString chunk; // the piece in the parser we are on
78 int SymbGroup; // the current type 78 int SymbGroup; // the current type
79 79
80 QString InExpr; 80 QString InExpr;
81 81
82 QChar chunk0(void); // retunrs the first char of expression; 82 QChar chunk0(void); // retunrs the first char of expression;
83 Expression(QString expr1);// constructor 83 Expression(QString expr1);// constructor
84 84
85 bool isSymbol(QChar ch); 85 bool isSymbol(QChar ch);
86 bool isMathSymbol(QChar ch); 86 bool isMathSymbol(QChar ch);
87 void GetNext(); 87 void GetNext();
88 void First(); 88 void First();
89 void Third(); 89 void Third();
90 void Fourth(); 90 void Fourth();
91 void Fifth(); 91 void Fifth();
92 void Sixth(); 92 void Sixth();
93 void Seventh(); 93 void Seventh();
94 void Eighth(); 94 void Eighth();
95 void Ninth(); 95 void Ninth();
96 96
97 bool Expression::Parse(); //parses the expression in RPN format; 97 bool Parse(); //parses the expression in RPN format;
98 98
99}; 99};
100 100
101 101
102 102
103class Sheet: public QTable 103class Sheet: public QTable
104{ 104{
105 Q_OBJECT 105 Q_OBJECT
106 106
107 // Variables 107 // Variables
108 bool clicksLocked; 108 bool clicksLocked;
109 int selectionNo; 109 int selectionNo;
110 typeCellBorders defaultBorders; 110 typeCellBorders defaultBorders;
111 typeCellData defaultCellData; 111 typeCellData defaultCellData;
112 112
113 // QT objects 113 // QT objects
114 QList<typeCellData> sheetData, clipboardData; 114 QList<typeCellData> sheetData, clipboardData;
115 QString pressedCell, releasedCell, sheetName; 115 QString pressedCell, releasedCell, sheetName;
116 QStringList listDataParser; 116 QStringList listDataParser;
117 117
118 // Private functions 118 // Private functions
119 bool findRowColumn(const QString &variable, int *row, int *col, bool giveError=FALSE); 119 bool findRowColumn(const QString &variable, int *row, int *col, bool giveError=FALSE);
120 QString findCellName(int row, int col); 120 QString findCellName(int row, int col);
121 bool findRange(const QString &variable1, const QString &variable2, int *row1, int *col1, int *row2, int *col2); 121 bool findRange(const QString &variable1, const QString &variable2, int *row1, int *col1, int *row2, int *col2);
122 QString calculateVariable(const QString &variable); 122 QString calculateVariable(const QString &variable);
123 QString calculateFunction(const QString &func, const QString &parameters, int NumOfParams); 123 QString calculateFunction(const QString &func, const QString &parameters, int NumOfParams);
124 QString getParameter(const QString &parameters, int paramNo, bool giveError=FALSE, const QString funcName=""); 124 QString getParameter(const QString &parameters, int paramNo, bool giveError=FALSE, const QString funcName="");
125 QString dataParser(const QString &cell, const QString &data); 125 QString dataParser(const QString &cell, const QString &data);
126 QString dataParserHelper(const QString &data); 126 QString dataParserHelper(const QString &data);
127 typeCellData *createCellData(int row, int col); 127 typeCellData *createCellData(int row, int col);
128 typeCellData *findCellData(int row, int col); 128 typeCellData *findCellData(int row, int col);
129 129
130 130
131 //LOGICAL / INFO 131 //LOGICAL / INFO
132 double functionCountIf(const QString &param1, const QString &param2, const QString &param3); 132 double functionCountIf(const QString &param1, const QString &param2, const QString &param3);
133 double functionSumSQ(const QString &param1, const QString &param2); //sum of squares 133 double functionSumSQ(const QString &param1, const QString &param2); //sum of squares
134 QString functionIndex(const QString &param1, const QString &param2, int indx); 134 QString functionIndex(const QString &param1, const QString &param2, int indx);
135 //math functions computations 135 //math functions computations
136 double BesselI0(double x); 136 double BesselI0(double x);
137 double BesselI(int n, double x); 137 double BesselI(int n, double x);
138 double BesselK0(double x); 138 double BesselK0(double x);
139 double BesselI1(double x); 139 double BesselI1(double x);
140 double BesselK1(double x); 140 double BesselK1(double x);
141 double BesselK(int n, double x); 141 double BesselK(int n, double x);
142 double BesselJ0(double x); 142 double BesselJ0(double x);
143 double BesselY0(double x); 143 double BesselY0(double x);
144 double BesselJ1(double x); 144 double BesselJ1(double x);
145 double BesselY1(double x); 145 double BesselY1(double x);