author | thufir <thufir> | 2002-07-04 16:58:16 (UTC) |
---|---|---|
committer | thufir <thufir> | 2002-07-04 16:58:16 (UTC) |
commit | d2b982a38091cbc7cd4eba0994ab6c5e3c7f7189 (patch) (side-by-side diff) | |
tree | d1e0a5fa80a12717b46257936ee3f8bb1b3ef89e /noncore/apps/opie-sheet/mainwindow.h | |
parent | a53847b7d27938551bb4f1c8891e7bacc93143ee (diff) | |
download | opie-d2b982a38091cbc7cd4eba0994ab6c5e3c7f7189.zip opie-d2b982a38091cbc7cd4eba0994ab6c5e3c7f7189.tar.gz opie-d2b982a38091cbc7cd4eba0994ab6c5e3c7f7189.tar.bz2 |
added opie-sheet
Diffstat (limited to 'noncore/apps/opie-sheet/mainwindow.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.h | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/noncore/apps/opie-sheet/mainwindow.h b/noncore/apps/opie-sheet/mainwindow.h new file mode 100644 index 0000000..ac90504 --- a/dev/null +++ b/noncore/apps/opie-sheet/mainwindow.h @@ -0,0 +1,120 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include <qpe/applnk.h> +#include <qpe/fileselector.h> +#include <qpe/qpemenubar.h> +#include <qpe/qpetoolbar.h> +#include <qmainwindow.h> +#include <qaction.h> +#include <qlineedit.h> +#include <qbutton.h> +#include <qcombobox.h> +#include <qtoolbutton.h> + +#include "sheet.h" + +typedef struct typeSheet +{ + QString name; + QList<typeCellData> data; +}; + +class MainWindow: public QMainWindow +{ + Q_OBJECT + + // QPE objects + DocLnk currentDoc; + QPEMenuBar *menu; + QPEToolBar *toolbarFunctions, *toolbarEdit, *toolbarStandard; + FileSelector *fileSelector; + + // QT objects + QPopupMenu *menuFile, *menuEdit, *menuInsert, *menuFormat, *menuData, *menuHelp, + *submenuFunc, *submenuFuncStd, *submenuFuncMath, *submenuFuncStat, + *submenuRow, *submenuCol, *submenuSheet; + QAction *fileNew, *fileOpen, *fileSave, *fileSaveAs, *fileQuit, *helpAbout, *editAccept, *editCancel, *formatCells, + *funcPlus, *funcMinus, *funcCross, *funcDivide, *funcParanOpen, *funcParanClose, *funcComma, *funcEqual, + *editCut, *editCopy, *editPaste, *editPasteContents, *editClear, *insertCols, *insertRows, *insertSheets, *insertCells, + *rowHeight, *rowShow, *rowHide, *rowAdjust, *colWidth, *colShow, *colHide, *colAdjust, *sheetRename, *sheetRemove, + *dataSort, *dataFindReplace, *editCellSelect, *helpGeneral; + QLineEdit *editData; + QButton *buttonUp, *buttonDown, *buttonLeft, *buttonRight; + QComboBox *comboSheets; + QToolButton *toolFunction; + QList<typeSheet> listSheets; + QString helpFile; + + // Other objects + Sheet *sheet; + + // Variables + bool documentModified; + + // Private functions + void initMenu(); + void initActions(); + void initFunctionsToolbar(); + void initEditToolbar(); + void initStandardToolbar(); + void initSheet(); + void addToData(const QString &data); + int saveCurrentFile(bool ask=TRUE); + void documentOpen(const DocLnk &lnkDoc); + void copyDocLnk(const DocLnk &source, DocLnk &target); + void documentSave(DocLnk &lnkDoc); + void closeEvent(QCloseEvent *e); + void addFlyAction(const QString &text, const QString &menuText, const QString &tip, QWidget *w); + typeSheet *createNewSheet(); + typeSheet *findSheet(const QString &name); + + private slots: + void slotFileNew(); + void slotFileOpen(); + void slotFileSave(); + void slotFileSaveAs(); + void slotHelpAbout(); + void slotHelpGeneral(); + void slotEditAccept(); + void slotEditCancel(); + void slotEditPaste(); + void slotEditPasteContents(); + void slotFormatCells(); + void slotInsertCells(); + void slotInsertRows(); + void slotInsertCols(); + void slotInsertSheets(); + void slotDataSort(); + void slotDataFindReplace(); + void slotRowHeight(); + void slotRowAdjust(); + void slotRowShow(); + void slotRowHide(); + void slotColumnWidth(); + void slotColumnAdjust(); + void slotColumnShow(); + void slotColumnHide(); + void slotSheetRename(); + void slotSheetRemove(); + void slotFuncOutput(); + void slotCellSelect(bool lock); + void slotCellClicked(const QString &cell); + void slotSheetChanged(const QString &name); + void slotDocModified(); + void selectorShow(); + void selectorHide(); + void selectorFileNew(const DocLnk &lnkDoc); + void selectorFileOpen(const DocLnk &lnkDoc); + + public: + MainWindow(); + ~MainWindow(); + + void setHelpFile(const QString &help_filename) { helpFile=help_filename; } + + public slots: + void setDocument(const QString &applnk_filename); +}; + +#endif |