author | ar <ar> | 2004-06-12 09:24:00 (UTC) |
---|---|---|
committer | ar <ar> | 2004-06-12 09:24:00 (UTC) |
commit | 7a62e8e3601ee98f5f06261c361fe8132334cd56 (patch) (side-by-side diff) | |
tree | 72e1e68878e32c70140fe1de478bced96670e348 | |
parent | 3fbf3cb264200c5ac11dbef43a51f3ab2a969587 (diff) | |
download | opie-7a62e8e3601ee98f5f06261c361fe8132334cd56.zip opie-7a62e8e3601ee98f5f06261c361fe8132334cd56.tar.gz opie-7a62e8e3601ee98f5f06261c361fe8132334cd56.tar.bz2 |
- rename sheet-qt -> opie-sheet
- format source code for a better readability
-rw-r--r-- | noncore/apps/opie-sheet/Excel.cpp | 83 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/Excel.h | 47 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/cellformat.cpp | 42 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/cellformat.h | 42 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/finddlg.cpp | 42 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/finddlg.h | 39 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/main.cpp | 35 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.cpp | 43 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.h | 43 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/numberdlg.cpp | 38 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/numberdlg.h | 36 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/opie-sheet.pro | 19 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/sheet.cpp | 122 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/sheet.h | 36 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/sortdlg.cpp | 42 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/sortdlg.h | 39 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/textdlg.cpp | 38 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/textdlg.h | 36 |
18 files changed, 618 insertions, 204 deletions
diff --git a/noncore/apps/opie-sheet/Excel.cpp b/noncore/apps/opie-sheet/Excel.cpp index fc49d56..57aef20 100644 --- a/noncore/apps/opie-sheet/Excel.cpp +++ b/noncore/apps/opie-sheet/Excel.cpp @@ -1,12 +1,40 @@ +/* + =. 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. + +*/ +#include "Excel.h" +/* STD */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <sys/types.h> #include <strings.h> -#include "Excel.h" static xfrecord formatter[] = { { 0xe , DATEFORMAT, "%m/%d/%y"}, @@ -63,7 +91,8 @@ int ExcelBook::Integer4Byte(int b1,int b2,int b3,int b4) return val; }; -int ExcelBook::Integer2ByteFile(FILE *f) { +int ExcelBook::Integer2ByteFile(FILE *f) +{ int i1, i2; i1 = fgetc(f); i2 = fgetc(f); @@ -102,7 +131,8 @@ double ExcelBook::Double4Byte(int b1, int b2, int b3, int b4) value /= 100.0; }; return value; - }else + } + else { union { double d; unsigned long int b[2]; } dbl_byte; @@ -132,10 +162,13 @@ void ExcelBook::DetectEndian(void) long i = 0x44332211; unsigned char* a = (unsigned char*) &i; end = (*a != 0x11); - if (end == 1) { + if (end == 1) + { endian = BIG_ENDIAN; printf("BIGENDIAN!\r\n"); - } else { + } + else + { endian = LITTLE_ENDIAN; printf("LITTLEENDIAN!\r\n"); } @@ -148,12 +181,15 @@ double ExcelBook::Double8Byte(int b1, int b2, int b3, int b4, int b5, int b6, in unsigned char *ieee; ieee = (unsigned char *)&d; for (i = 0; i < 8; i++) ieee[i] = 0; - if (endian == BIG_ENDIAN) { + if (endian == BIG_ENDIAN) + { ieee[0] = ((int)b8) & 0xff;ieee[1] = ((int)b7) & 0xff; ieee[2] = ((int)b6) & 0xff;ieee[3] = ((int)b5) & 0xff; ieee[4] = ((int)b4) & 0xff;ieee[5] = ((int)b3) & 0xff; ieee[6] = ((int)b2) & 0xff;ieee[7] = ((int)b1) & 0xff; - } else { + } + else + { ieee[0] = ((int)b1) & 0xff;ieee[1] = ((int)b2) & 0xff; ieee[2] = ((int)b3) & 0xff;ieee[3] = ((int)b4) & 0xff; ieee[4] = ((int)b5) & 0xff;ieee[5] = ((int)b6) & 0xff; @@ -393,7 +429,8 @@ int ExcelBook::SheetHandleRecord(ExcelSheet* sheet, ExcelBREC* record) { sheet->rows = Integer2Byte(data[2], data[3]); sheet->cols = Integer2Byte(data[6], data[7]); - } else + } + else { sheet->rows = Integer4Byte(data[4], data[5], data[6], data[7]); sheet->cols = Integer2Byte(data[10], data[11]); @@ -602,7 +639,8 @@ void ExcelBook::HandleBoundSheet(ExcelBREC* rec) { //ascii name=GetASCII(data,pos,length); - }else + } + else { name=GetUnicode(data,pos,length); }; @@ -808,11 +846,13 @@ QString* ExcelBook::CellDataString(ExcelSheet* sh, int row, int col) if (dateformat) { strftime(str,1024,dateformat.ascii(),tmptr); - } else + } + else { strftime(str,1024,format.ascii(),tmptr); }; - } else + } + else if (XFRecords[c->xfindex]->type == NUMBERFORMAT) { format = XFRecords[c->xfindex]->format; @@ -821,7 +861,8 @@ QString* ExcelBook::CellDataString(ExcelSheet* sh, int row, int col) // because there is more work to be done in the field precision = CellGetPrecision(c->valued); sprintf(str,"%.*f",precision,c->valued); - }else + } + else { precision = CellGetPrecision(c->valued); sprintf(str,"%.*f",precision,c->valued); @@ -1002,11 +1043,13 @@ void ExcelBook::HandleFormula(ExcelSheet* sheet, ExcelBREC* record) if (data[6] == 0 && data[12] == -1 && data[13] == -1) { // string - } else + } + else if (data[6] == 1 && data[12] == -1 && data[13] == -1) { // boolean - } else + } + else if ( data[6] == 2 && data[12] == -1 && data[13] == -1) { // error @@ -1123,7 +1166,8 @@ QString ExcelBook::GetFormula(int row, int col, ExcelSheet* sheet, char* data, i }; s1=QString("""")+s1+QString(""""); operands.prepend(new QString(s1)); - }else + } + else { w1=data[idx];idx++; s1=GetASCII(data,idx,w1); @@ -1142,7 +1186,8 @@ QString ExcelBook::GetFormula(int row, int col, ExcelSheet* sheet, char* data, i w2=Integer2Byte(data[idx],data[idx+1]);idx=idx+2;//row2 w3=Integer2Byte(data[idx],data[idx+1]) & 0x00FF;idx=idx+2;//col1 w4=Integer2Byte(data[idx],data[idx+1]) & 0x00FF;idx=idx+2;//col2 - }else + } + else { w1=Integer2Byte(data[idx],data[idx+1]) & 0x3FFF;idx=idx+2;//row1 w2=Integer2Byte(data[idx],data[idx+1]) & 0x3FFF;idx=idx+2;//row2 @@ -1161,7 +1206,8 @@ QString ExcelBook::GetFormula(int row, int col, ExcelSheet* sheet, char* data, i { w1=Integer2Byte(data[idx],data[idx+1]);idx=idx+2;//row w2=Integer2Byte(data[idx],data[idx+1]) & 0x00FF;idx=idx+2;//col - }else + } + else { w1=Integer2Byte(data[idx],data[idx+1]) & 0x3FFF;idx=idx+2;//row w2=Integer2Byte(data[idx],data[idx+1]);idx=idx+2;//col @@ -1332,7 +1378,8 @@ QString ExcelBook::GetFormula(int row, int col, ExcelSheet* sheet, char* data, i { w2=(int)data[idx];idx++; w1=Integer2Byte(data[idx],data[idx+1]);idx=idx+2; - }else + } + else { w1=Integer2Byte(data[idx],data[idx+1]);idx=idx+2; }; diff --git a/noncore/apps/opie-sheet/Excel.h b/noncore/apps/opie-sheet/Excel.h index 0a581cf..51ccf5c 100644 --- a/noncore/apps/opie-sheet/Excel.h +++ b/noncore/apps/opie-sheet/Excel.h @@ -1,13 +1,43 @@ +/* + =. 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. + +*/ + +/* QT */ +#include <qstring.h> +#include <qarray.h> +#include <qlist.h> +/* STD */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <sys/types.h> #include <strings.h> -#include <qstring.h> -#include <qarray.h> -#include <qlist.h> #define DATEFORMAT 0x1 #define NUMBERFORMAT 0x2 @@ -114,7 +144,8 @@ public: }; -struct mulrk { +struct mulrk +{ int row; int first; int last; @@ -124,9 +155,6 @@ struct mulrk { QArray<int> xfindices; }; - - - class ExcelBook { public: @@ -196,10 +224,5 @@ void HandleRK(ExcelSheet* sheet, ExcelBREC* record); void HandleFormula(ExcelSheet* sheet, ExcelBREC* record); QString GetFormula(int row, int col, ExcelSheet* sheet, char* data, int sz); QString FindCellName(int row, int col); - - - - - }; diff --git a/noncore/apps/opie-sheet/cellformat.cpp b/noncore/apps/opie-sheet/cellformat.cpp index 342ebe9..602d20d 100644 --- a/noncore/apps/opie-sheet/cellformat.cpp +++ b/noncore/apps/opie-sheet/cellformat.cpp @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -14,6 +33,7 @@ #include "cellformat.h" +/* QT */ #include <qlistbox.h> #include <qlabel.h> @@ -149,8 +169,7 @@ CellFormat::CellFormat(QWidget *parent) } CellFormat::~CellFormat() -{ -} +{} int CellFormat::findColorIndex(const QColor &color) { @@ -529,8 +548,7 @@ BorderEditor::BorderEditor(QWidget *parent) } BorderEditor::~BorderEditor() -{ -} +{} void BorderEditor::drawContents(QPainter *p) { diff --git a/noncore/apps/opie-sheet/cellformat.h b/noncore/apps/opie-sheet/cellformat.h index b569b7f..e07af9c 100644 --- a/noncore/apps/opie-sheet/cellformat.h +++ b/noncore/apps/opie-sheet/cellformat.h @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -15,7 +34,12 @@ #ifndef CELLFORMAT_H #define CELLFORMAT_H +#include "sheet.h" + +/* OPIE */ #include <qpe/fontdatabase.h> + +/* QT */ #include <qdialog.h> #include <qtabwidget.h> #include <qlayout.h> @@ -23,8 +47,6 @@ #include <qcheckbox.h> #include <qpushbutton.h> -#include "sheet.h" - class BorderEditor: public QFrame { Q_OBJECT diff --git a/noncore/apps/opie-sheet/finddlg.cpp b/noncore/apps/opie-sheet/finddlg.cpp index e4c6ec8..c724159 100644 --- a/noncore/apps/opie-sheet/finddlg.cpp +++ b/noncore/apps/opie-sheet/finddlg.cpp @@ -1,20 +1,41 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) * by Serdar Ozler <sozler@sitebest.com> */ +#include "finddlg.h" + +/* QT */ #include <qlabel.h> #include <qradiobutton.h> -#include "finddlg.h" FindDialog::FindDialog(QWidget *parent) :QDialog(parent, 0, TRUE) @@ -64,8 +85,7 @@ FindDialog::FindDialog(QWidget *parent) } FindDialog::~FindDialog() -{ -} +{} void FindDialog::typeChanged(int id) { diff --git a/noncore/apps/opie-sheet/finddlg.h b/noncore/apps/opie-sheet/finddlg.h index 1af2da5..b456f21 100644 --- a/noncore/apps/opie-sheet/finddlg.h +++ b/noncore/apps/opie-sheet/finddlg.h @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -15,6 +34,9 @@ #ifndef FINDDLG_H #define FINDDLG_H +#include "sheet.h" + +/* QT */ #include <qdialog.h> #include <qtabwidget.h> #include <qlayout.h> @@ -22,7 +44,6 @@ #include <qcheckbox.h> #include <qpushbutton.h> #include <qvbuttongroup.h> -#include "sheet.h" class FindDialog: public QDialog { diff --git a/noncore/apps/opie-sheet/main.cpp b/noncore/apps/opie-sheet/main.cpp index 861473e..bf35908 100644 --- a/noncore/apps/opie-sheet/main.cpp +++ b/noncore/apps/opie-sheet/main.cpp @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp index 061748e..bb85a24 100644 --- a/noncore/apps/opie-sheet/mainwindow.cpp +++ b/noncore/apps/opie-sheet/mainwindow.cpp @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -14,12 +33,15 @@ #include "mainwindow.h" +/* OPIE */ #include <qpe/resource.h> #include <qpe/qpeapplication.h> +/* QT */ #include <qmessagebox.h> #include <qradiobutton.h> +/* STD */ #include "cellformat.h" #include "numberdlg.h" #include "textdlg.h" @@ -38,7 +60,7 @@ MainWindow::MainWindow(QWidget *parent, const char* n, WFlags fl) // construct objects currentDoc=0; - fileSelector=new FileSelector("application/sheet-qt", this, QString::null); + fileSelector=new FileSelector("application/opie-sheet", this, QString::null); ExcelSelector=new FileSelector("application/excel",this,QString::null,FALSE); connect(fileSelector, SIGNAL(closeMe()), this, SLOT(selectorHide())); connect(fileSelector, SIGNAL(newSelected(const DocLnk&)), this, SLOT(selectorFileNew(const DocLnk&))); @@ -46,7 +68,6 @@ MainWindow::MainWindow(QWidget *parent, const char* n, WFlags fl) connect(ExcelSelector,SIGNAL(fileSelected(const DocLnk&)),this,SLOT(slotImportExcel(const DocLnk&))); connect(ExcelSelector,SIGNAL(closeMe()), this, SLOT(ExcelSelectorHide())); - listSheets.setAutoDelete(TRUE); initActions(); @@ -90,7 +111,7 @@ void MainWindow::documentSave(DocLnk *lnkDoc) stream << (Q_UINT32)tempCell->col << (Q_UINT32)tempCell->row << tempCell->borders.right << tempCell->borders.bottom << tempCell->background << (Q_UINT32)tempCell->alignment << tempCell->fontColor << tempCell->font << tempCell->data; } - lnkDoc->setType("application/sheet-qt"); + lnkDoc->setType("application/opie-sheet"); if (!fm.saveFile(*lnkDoc, streamBuffer)) { QMessageBox::critical(this, tr("Error"), tr("File cannot be saved!")); diff --git a/noncore/apps/opie-sheet/mainwindow.h b/noncore/apps/opie-sheet/mainwindow.h index eacbe36..642b7ae 100644 --- a/noncore/apps/opie-sheet/mainwindow.h +++ b/noncore/apps/opie-sheet/mainwindow.h @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -15,8 +34,14 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H +#include "Excel.h" +#include "sheet.h" + +/* OPIE */ #include <qpe/applnk.h> #include <qpe/fileselector.h> + +/* QT */ #include <qmenubar.h> #include <qtoolbar.h> #include <qmainwindow.h> @@ -25,8 +50,6 @@ #include <qbutton.h> #include <qcombobox.h> #include <qtoolbutton.h> -#include "Excel.h" -#include "sheet.h" typedef struct typeSheet { diff --git a/noncore/apps/opie-sheet/numberdlg.cpp b/noncore/apps/opie-sheet/numberdlg.cpp index 90fbaa2..43574e9 100644 --- a/noncore/apps/opie-sheet/numberdlg.cpp +++ b/noncore/apps/opie-sheet/numberdlg.cpp @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -28,8 +47,7 @@ NumberDialog::NumberDialog(QWidget *parent) } NumberDialog::~NumberDialog() -{ -} +{} int NumberDialog::exec(const QString &caption, const QString &text, int value, int min, int max, int step) diff --git a/noncore/apps/opie-sheet/numberdlg.h b/noncore/apps/opie-sheet/numberdlg.h index 81e3326..497c076 100644 --- a/noncore/apps/opie-sheet/numberdlg.h +++ b/noncore/apps/opie-sheet/numberdlg.h @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -15,6 +34,7 @@ #ifndef NUMBERDLG_H #define NUMBERDLG_H +/* QT */ #include <qdialog.h> #include <qlabel.h> #include <qspinbox.h> diff --git a/noncore/apps/opie-sheet/opie-sheet.pro b/noncore/apps/opie-sheet/opie-sheet.pro index ced4daf..d0beb93 100644 --- a/noncore/apps/opie-sheet/opie-sheet.pro +++ b/noncore/apps/opie-sheet/opie-sheet.pro @@ -1,6 +1,21 @@ CONFIG = qt warn_on quick-app -HEADERS = mainwindow.h sheet.h cellformat.h finddlg.h numberdlg.h sortdlg.h textdlg.h Excel.h -SOURCES = main.cpp mainwindow.cpp sheet.cpp cellformat.cpp finddlg.cpp numberdlg.cpp sortdlg.cpp textdlg.cpp Excel.cpp +HEADERS = mainwindow.h \ + sheet.h \ + cellformat.h \ + finddlg.h \ + numberdlg.h \ + sortdlg.h \ + textdlg.h \ + Excel.h +SOURCES = main.cpp \ + mainwindow.cpp \ + sheet.cpp \ + cellformat.cpp \ + finddlg.cpp \ + numberdlg.cpp \ + sortdlg.cpp \ + textdlg.cpp \ + Excel.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopiecore2 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,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -14,7 +33,10 @@ #include "sheet.h" +/* QT */ #include <qmessagebox.h> + +/* STD */ #include <math.h> #include <stdlib.h> #include <stdio.h> @@ -48,8 +70,7 @@ Sheet::Sheet(int numRows, int numCols, QWidget *parent) } Sheet::~Sheet() -{ -} +{} typeCellData *Sheet::findCellData(int row, int col) { @@ -67,7 +88,8 @@ void Sheet::slotCellSelected(int row, int col) if (cellData) { emit currentDataChanged(cellData->data); - }else + } + else emit currentDataChanged(""); } @@ -228,7 +250,8 @@ double Sheet::BesselI0(double x) y=x/3.75; y*=y; 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 { y=3.75/ax; ans=(exp(ax)/sqrt(ax))*(0.39894228+y*(0.1328592e-1 +y*(0.225319e-2+y*(-0.157565e-2+y*(0.916281e-2 +y*(-0.2057706e-1+y*(0.2635537e-1+y*(-0.1647633e-1 +y*0.392377e-2)))))))); @@ -245,7 +268,8 @@ double Sheet::BesselI1(double x) y=x/3.75; y*=y; 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 { y=3.75/ax; ans=0.2282967e-1+y*(-0.2895312e-1+y*(0.1787654e-1 -y*0.420059e-2)); ans=0.39894228+y*(-0.3988024e-1+y*(-0.362018e-2 +y*(0.163801e-2+y*(-0.1031555e-1+y*ans)))); @@ -292,7 +316,8 @@ double Sheet::BesselK0(double x) { y=x*x/4.0; 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 { y=2.0/x; ans=(exp(-x)/sqrt(x))*(1.25331414+y*(-0.7832358e-1 +y*(0.2189568e-1+y*(-0.1062446e-1+y*(0.587872e-2 +y*(-0.251540e-2+y*0.53208e-3)))))); @@ -307,7 +332,8 @@ double Sheet::BesselK1(double x) { y=x*x/4.0; 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 { y=2.0/x; ans=(exp(-x)/sqrt(x))*(1.25331414+y*(0.23498619 +y*(-0.3655620e-1+y*(0.1504268e-1+y*(-0.780353e-2 +y*(0.325614e-2+y*(-0.68245e-3))))))); @@ -342,7 +368,8 @@ double Sheet::BesselJ0(double x) ans1=57568490574.0+y*(-13362590354.0+y*(651619640.7 +y*(-11214424.18+y*(77392.33017+y*(-184.9052456))))); ans2=57568490411.0+y*(1029532985.0+y*(9494680.718 +y*(59272.64853+y*(267.8532712+y*1.0)))); ans=ans1/ans2; - } else + } + else { z=8.0/ax; y=z*z; @@ -364,7 +391,8 @@ double Sheet::BesselY0(double x) ans1 = -2957821389.0+y*(7062834065.0+y*(-512359803.6 +y*(10879881.29+y*(-86327.92757+y*228.4622733)))); ans2=40076544269.0+y*(745249964.8+y*(7189466.438 +y*(47447.26470+y*(226.1030244+y*1.0)))); ans=(ans1/ans2)+0.636619772*BesselJ0(x)*log(x); - } else + } + else { z=8.0/x; y=z*z; @@ -386,7 +414,8 @@ double Sheet::BesselJ1(double x) ans1=x*(72362614232.0+y*(-7895059235.0+y*(242396853.1 +y*(-2972611.439+y*(15704.48260+y*(-30.16036606)))))); ans2=144725228442.0+y*(2300535178.0+y*(18583304.74 +y*(99447.43394+y*(376.9991397+y*1.0)))); ans=ans1/ans2; - } else + } + else { z=8.0/ax; y=z*z; xx=ax-2.356194491; ans1=1.0+y*(0.183105e-2+y*(-0.3516396496e-4 +y*(0.2457520174e-5+y*(-0.240337019e-6)))); @@ -407,7 +436,8 @@ double Sheet::BesselY1(double x) ans1=x*(-0.4900604943e13+y*(0.1275274390e13 +y*(-0.5153438139e11+y*(0.7349264551e9 +y*(-0.4237922726e7+y*0.8511937935e4))))); ans2=0.2499580570e14+y*(0.4244419664e12 +y*(0.3733650367e10+y*(0.2245904002e8 +y*(0.1020426050e6+y*(0.3549632885e3+y))))); ans=(ans1/ans2)+0.636619772*(BesselJ1(x)*log(x)-1.0/x); - } else + } + else { z=8.0/x; y=z*z; @@ -458,7 +488,8 @@ double Sheet::BesselJ(int n, double x) bj=bjp; } ans=bj; - } else + } + else { tox=2.0/ax; m=2*((n+(int) sqrt(ACC*n))/2); @@ -518,7 +549,8 @@ double Sheet::GammaP(double a, double x) { GammaSeries(&gamser,a,x,&gln); return gamser; - }else + } + else { GammaContinuedFraction(&gammcf,a,x,&gln); return 1.0-gammcf; @@ -544,7 +576,8 @@ void Sheet::GammaSeries(double *gamser, double a, double x, double *gln) if (x < 0.0) return;//error *gamser=0.0; return; - } else + } + else { ap=a; del=sum=1.0/a; @@ -558,7 +591,8 @@ void Sheet::GammaSeries(double *gamser, double a, double x, double *gln) *gamser=sum*exp(-x+a*log(x)-(*gln)); return; } - } return; + } + return; return; } }; @@ -662,7 +696,8 @@ double Sheet::functionSum(const QString ¶m1, const QString ¶m2) if (ok) result+=tempResult; } return result; - }else + } + else { double d1=0,d2=0; d1=calculateVariable(param1).toDouble(&ok); @@ -789,7 +824,8 @@ double Sheet::functionSumSQ(const QString ¶m1, const QString ¶m2) if (ok) result+=tempResult*tempResult; } return result; - }else + } + else { double d1=0,d2=0; d1=calculateVariable(param1).toDouble(&ok); @@ -819,7 +855,8 @@ double Sheet::functionMin(const QString ¶m1, const QString ¶m2) } } return min; - }else + } + else { double d1=0,d2=0; d1=calculateVariable(param1).toDouble(&ok); @@ -847,7 +884,8 @@ double Sheet::functionMax(const QString ¶m1, const QString ¶m2) } }; return max; - }else + } + else { double d1=0,d2=0; d1=calculateVariable(param1).toDouble(&ok); @@ -877,7 +915,8 @@ double Sheet::functionCount(const QString ¶m1, const QString ¶m2) if (ok) ++divider; }; return divider; - }else + } + else { double d1=0,d2=0;int ii=0; d1=calculateVariable(param1).toDouble(&ok); @@ -992,12 +1031,14 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, if(findRowColumn(getParameter(parameters, 0), &row, &col, FALSE)) { if(text(row,col).length()==0) val1=1; else val1=0; - }else + } + else { if(findRowColumn(calculateVariable(getParameter(parameters, 0)), &row,&col, FALSE)) { if(text(row,col).length()==0) val1=1; else val1=0; - }else + } + else { val1=0; }; @@ -1012,13 +1053,15 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, { val1=text(row,col).toDouble(&ok); if(ok) val1=1; else val1=0; - }else + } + else { if(findRowColumn(calculateVariable(getParameter(parameters, 0, TRUE, function)), &row,&col, FALSE)) { val1=text(row,col).toDouble(&ok); if(ok) val1=1; else val1=0; - }else + } + else { val1=0; }; @@ -1389,7 +1432,8 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, { s1=calculateVariable(getParameter(parameters, 1, TRUE, function)); return QString(s1); - }else + } + else { s1=calculateVariable(getParameter(parameters, 2, TRUE, function)); return QString(s1); @@ -1552,7 +1596,8 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, if(vali==1) { return QString::number(GammaQ(floor(val1)+1, val2)); - }else + } + else { return QString::number(exp(-val2)*pow(val2,val1)/exp(GammaLn(val1+1.0))); }; @@ -1566,7 +1611,8 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, if(vali==1) { return QString::number(GammaP(val2/2.0,val1*val1/2.0)); - } else + } + else { return QString::number( pow(val1,val2-1.0)*exp(-val1*val1/2)/ ( pow(2,val2/2.0-1.0)*exp(GammaLn(val2/2.0))) @@ -1582,7 +1628,8 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, if(vali==1) { return QString::number(GammaP(val2/2.0,val1/2.0)); - } else + } + else { return QString::number( pow(val1,val2/2.0-1.0)/(exp(val1/2.0)*pow(sqrt(2.0),val2)*exp(GammaLn(val2/2.0))) @@ -2385,7 +2432,8 @@ void Expression::GetNext() } }//while }//else if -};//end function +} +;//end function void Expression::First() diff --git a/noncore/apps/opie-sheet/sheet.h b/noncore/apps/opie-sheet/sheet.h index f705cd0..92c8061 100644 --- a/noncore/apps/opie-sheet/sheet.h +++ b/noncore/apps/opie-sheet/sheet.h @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -15,6 +34,7 @@ #ifndef SHEET_H #define SHEET_H +/* QT */ #include <qtable.h> #include <qstack.h> diff --git a/noncore/apps/opie-sheet/sortdlg.cpp b/noncore/apps/opie-sheet/sortdlg.cpp index c2cdec8..47d666f 100644 --- a/noncore/apps/opie-sheet/sortdlg.cpp +++ b/noncore/apps/opie-sheet/sortdlg.cpp @@ -1,21 +1,42 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) * by Serdar Ozler <sozler@sitebest.com> */ +#include "sortdlg.h" + +/* QT */ #include <qlabel.h> #include <qradiobutton.h> #include <qmessagebox.h> -#include "sortdlg.h" SortDialog::SortDialog(QWidget *parent) :QDialog(parent, 0, TRUE) @@ -55,8 +76,7 @@ SortDialog::SortDialog(QWidget *parent) } SortDialog::~SortDialog() -{ -} +{} QComboBox *SortDialog::createFieldCombo(const QString &caption, int y) { diff --git a/noncore/apps/opie-sheet/sortdlg.h b/noncore/apps/opie-sheet/sortdlg.h index b3699a9..5a1025e 100644 --- a/noncore/apps/opie-sheet/sortdlg.h +++ b/noncore/apps/opie-sheet/sortdlg.h @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -15,6 +34,9 @@ #ifndef SORTDLG_H #define SORTDLG_H +#include "sheet.h" + +/* QT */ #include <qdialog.h> #include <qtabwidget.h> #include <qlayout.h> @@ -22,7 +44,6 @@ #include <qcheckbox.h> #include <qpushbutton.h> #include <qvbuttongroup.h> -#include "sheet.h" class SortDialog: public QDialog { diff --git a/noncore/apps/opie-sheet/textdlg.cpp b/noncore/apps/opie-sheet/textdlg.cpp index 34cec29..020b9ae 100644 --- a/noncore/apps/opie-sheet/textdlg.cpp +++ b/noncore/apps/opie-sheet/textdlg.cpp @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -28,8 +47,7 @@ TextDialog::TextDialog(QWidget *parent) } TextDialog::~TextDialog() -{ -} +{} int TextDialog::exec(const QString &caption, const QString &text, const QString &value) diff --git a/noncore/apps/opie-sheet/textdlg.h b/noncore/apps/opie-sheet/textdlg.h index 78ef580..d54da16 100644 --- a/noncore/apps/opie-sheet/textdlg.h +++ b/noncore/apps/opie-sheet/textdlg.h @@ -1,11 +1,30 @@ -/*************************************************************************** - * * - * 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. + +*/ /* * Opie Sheet (formerly Sheet/Qt) @@ -15,6 +34,7 @@ #ifndef TEXTDLG_H #define TEXTDLG_H +/* QT */ #include <qdialog.h> #include <qlabel.h> #include <qlineedit.h> |