summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-sheet/mainwindow.h
authorhayzel <hayzel>2004-01-07 08:08:29 (UTC)
committer hayzel <hayzel>2004-01-07 08:08:29 (UTC)
commit08bc72c34cae85e5cc6541c9daaeba121597c961 (patch) (unidiff)
treedf5b263a84099ffdf8e0b86fda9a9fe61b90d30e /noncore/apps/opie-sheet/mainwindow.h
parent656e80e7b35c4aefd49ffe7756d895f4e7370de1 (diff)
downloadopie-08bc72c34cae85e5cc6541c9daaeba121597c961.zip
opie-08bc72c34cae85e5cc6541c9daaeba121597c961.tar.gz
opie-08bc72c34cae85e5cc6541c9daaeba121597c961.tar.bz2
January 7, 2004
* Release by hayzel (koppermind@panafonet.gr) This version has many valuable changes, though It may have some annoying bugs. Please if you are interested in opie-sheet try it hard, so I can fix some of them. Also If you want some other functions that must be here and are missing feel free to ask them. (no financial functions please. :) I really hate them ) -Fixed a bug with non closed parenthesis editing&recalculation infinite loop. -Added support for functions that can parse parameters not ONLY as numbers but also as strings. -Added many functions that cover many computational topics rendering opie-sheet a computational tool-spreadsheet at last. (total 90 functions!) -Maintained compatibility with the opie-fileformat. -New icons. -Found that the DataParser was not a real RPN compiler of the expressions. In fact it was returning faulty results in calculations, in both binary or unary operations. A1-A2-A3 was parsed as A1-(A2-A3). A1 was parsed as A1. -Added new class "Expression" a general Parser for spreadsheet-expression. Imported from an old C# project of mine. -Now can also parse <>=!%&^|"" in expressions. -Added experimental Excel File format import!. The opie-sheet can import any excel file in BIFF7/BIFF8 format. These formats are used in Excel XP,2000,95. The Excel Importer class is in a good coding level.. BUT it is not complete. Only strings,numbers,formulas are imported. Not formatting rules. Not all the functions are converted in the functions of opie-sheet. Infact FEW functions are converted. -Fixed a bug with Sheet Recalculation. Added ReCalc() function. Opie-sheet was calculating wrong the values of expression in opening/importing. if a value needed was not loaded yet in the time of calculation. Solved with ReCalc() each time the active sheet is changing. *known issues: -if someone enters directly text as parameter to a string function the text renders as uppercase due to the calculation engine that uppercases all the parsing sentence. -randbetween return only integer part random... if both limit numbers are integers. -skew and kurt function give different results compared to kspread-oofice equivalents. -unstable parser Excel Class -string vars and string functions are not correctly handled by excel importer. -unicode strings are converted FINE in QString unicode format, but cannot be rendered fine if a suitable unicode font is not setuped as the default string. So the string is junked in the opie-sheet and may crash the parser. *TODOs: -surelly a much full-stable excel importer. -Cell Manipulation of many Data is really slow.... must change the QList data type. To a structure more efficient. -maybe some more functions. -maybe some kind of charts drawing? -maybe kspread or ooffice files import/export.
Diffstat (limited to 'noncore/apps/opie-sheet/mainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/mainwindow.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/noncore/apps/opie-sheet/mainwindow.h b/noncore/apps/opie-sheet/mainwindow.h
index bd99c36..eacbe36 100644
--- a/noncore/apps/opie-sheet/mainwindow.h
+++ b/noncore/apps/opie-sheet/mainwindow.h
@@ -16,48 +16,51 @@
16#define MAINWINDOW_H 16#define MAINWINDOW_H
17 17
18#include <qpe/applnk.h> 18#include <qpe/applnk.h>
19#include <qpe/fileselector.h> 19#include <qpe/fileselector.h>
20#include <qmenubar.h> 20#include <qmenubar.h>
21#include <qtoolbar.h> 21#include <qtoolbar.h>
22#include <qmainwindow.h> 22#include <qmainwindow.h>
23#include <qaction.h> 23#include <qaction.h>
24#include <qlineedit.h> 24#include <qlineedit.h>
25#include <qbutton.h> 25#include <qbutton.h>
26#include <qcombobox.h> 26#include <qcombobox.h>
27#include <qtoolbutton.h> 27#include <qtoolbutton.h>
28 28#include "Excel.h"
29#include "sheet.h" 29#include "sheet.h"
30 30
31typedef struct typeSheet 31typedef struct typeSheet
32{ 32{
33 QString name; 33 QString name;
34 QList<typeCellData> data; 34 QList<typeCellData> data;
35}; 35};
36 36
37class MainWindow: public QMainWindow 37class MainWindow: public QMainWindow
38{ 38{
39 Q_OBJECT 39 Q_OBJECT
40 40
41 // QPE objects 41 // QPE objects
42 DocLnk* currentDoc; 42 DocLnk* currentDoc;
43 QMenuBar *menu; 43 QMenuBar *menu;
44 QToolBar *toolbarFunctions, *toolbarEdit, *toolbarStandard; 44 QToolBar *toolbarFunctions, *toolbarEdit, *toolbarStandard;
45 FileSelector *fileSelector; 45 FileSelector *fileSelector;
46 FileSelector *ExcelSelector;
46 47
47 // QT objects 48 // QT objects
48 QPopupMenu *menuFile, *menuEdit, *menuInsert, *menuFormat, *menuData, *menuHelp, 49 QPopupMenu *menuFile, *menuEdit, *menuInsert, *menuFormat, *menuData, *menuHelp,
49 *submenuFunc, *submenuFuncStd, *submenuFuncMath, *submenuFuncStat, 50 *submenuFunc, *submenuFuncStd, *submenuFuncStandard, *submenuFuncLogic,
51 *submenuFuncTrig, *submenuFuncString, *submenuFuncScientific, *submenuFuncDistr,
52 *submenuFuncStat,
50 *submenuRow, *submenuCol, *submenuSheet; 53 *submenuRow, *submenuCol, *submenuSheet;
51 QAction *fileNew, *fileOpen, *fileSave, *fileSaveAs, *fileQuit, *helpAbout, *editAccept, *editCancel, *formatCells, 54 QAction *fileNew, *fileOpen, *fileSave, *fileSaveAs, *fileExcelImport, *fileQuit, *helpAbout, *editAccept, *editCancel, *formatCells,
52 *funcPlus, *funcMinus, *funcCross, *funcDivide, *funcParanOpen, *funcParanClose, *funcComma, *funcEqual, 55 *funcPlus, *funcMinus, *funcCross, *funcDivide, *funcParanOpen, *funcParanClose, *funcComma, *funcEqual,
53 *editCut, *editCopy, *editPaste, *editPasteContents, *editClear, *insertCols, *insertRows, *insertSheets, *insertCells, 56 *editCut, *editCopy, *editPaste, *editPasteContents, *editClear, *insertCols, *insertRows, *insertSheets, *insertCells,
54 *rowHeight, *rowShow, *rowHide, *rowAdjust, *colWidth, *colShow, *colHide, *colAdjust, *sheetRename, *sheetRemove, 57 *rowHeight, *rowShow, *rowHide, *rowAdjust, *colWidth, *colShow, *colHide, *colAdjust, *sheetRename, *sheetRemove,
55 *dataSort, *dataFindReplace, *editCellSelect, *helpGeneral; 58 *dataSort, *dataFindReplace, *editCellSelect, *helpGeneral;
56 QLineEdit *editData; 59 QLineEdit *editData;
57 QButton *buttonUp, *buttonDown, *buttonLeft, *buttonRight; 60 QButton *buttonUp, *buttonDown, *buttonLeft, *buttonRight;
58 QComboBox *comboSheets; 61 QComboBox *comboSheets;
59 QToolButton *toolFunction; 62 QToolButton *toolFunction;
60 QList<typeSheet> listSheets; 63 QList<typeSheet> listSheets;
61 QString helpFile; 64 QString helpFile;
62 65
63 // Other objects 66 // Other objects
@@ -78,24 +81,29 @@ class MainWindow: public QMainWindow
78 void documentOpen(const DocLnk &lnkDoc); 81 void documentOpen(const DocLnk &lnkDoc);
79 void documentSave(DocLnk *lnkDoc); 82 void documentSave(DocLnk *lnkDoc);
80 void closeEvent(QCloseEvent *e); 83 void closeEvent(QCloseEvent *e);
81 void addFlyAction(const QString &text, const QString &menuText, const QString &tip, QWidget *w); 84 void addFlyAction(const QString &text, const QString &menuText, const QString &tip, QWidget *w);
82 typeSheet *createNewSheet(); 85 typeSheet *createNewSheet();
83 typeSheet *findSheet(const QString &name); 86 typeSheet *findSheet(const QString &name);
84 87
85 private slots: 88 private slots:
86 void slotFileNew(); 89 void slotFileNew();
87 void slotFileOpen(); 90 void slotFileOpen();
88 void slotFileSave(); 91 void slotFileSave();
89 void slotFileSaveAs(); 92 void slotFileSaveAs();
93
94 void slotImportExcel(const DocLnk &lnkDoc);
95 void slotImportExcelOpen();
96 void ExcelSelectorHide();
97
90 void slotHelpAbout(); 98 void slotHelpAbout();
91 void slotEditAccept(); 99 void slotEditAccept();
92 void slotEditCancel(); 100 void slotEditCancel();
93 void slotEditPaste(); 101 void slotEditPaste();
94 void slotEditPasteContents(); 102 void slotEditPasteContents();
95 void slotFormatCells(); 103 void slotFormatCells();
96 void slotInsertCells(); 104 void slotInsertCells();
97 void slotInsertRows(); 105 void slotInsertRows();
98 void slotInsertCols(); 106 void slotInsertCols();
99 void slotInsertSheets(); 107 void slotInsertSheets();
100 void slotDataSort(); 108 void slotDataSort();
101 void slotDataFindReplace(); 109 void slotDataFindReplace();