From 7a62e8e3601ee98f5f06261c361fe8132334cd56 Mon Sep 17 00:00:00 2001 From: ar Date: Sat, 12 Jun 2004 09:24:00 +0000 Subject: - rename sheet-qt -> opie-sheet - format source code for a better readability --- (limited to 'noncore/apps/opie-sheet/mainwindow.h') 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 + .>+-= + _;:, .> :=|. 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_,=:_. -`: 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 #include + +/* QT */ #include #include #include @@ -25,67 +50,65 @@ #include #include #include -#include "Excel.h" -#include "sheet.h" typedef struct typeSheet { - QString name; - QList data; + QString name; + QList data; }; class MainWindow: public QMainWindow { - Q_OBJECT - - // QPE objects - DocLnk* currentDoc; - QMenuBar *menu; - QToolBar *toolbarFunctions, *toolbarEdit, *toolbarStandard; - FileSelector *fileSelector; - FileSelector *ExcelSelector; - - // QT objects - QPopupMenu *menuFile, *menuEdit, *menuInsert, *menuFormat, *menuData, *menuHelp, - *submenuFunc, *submenuFuncStd, *submenuFuncStandard, *submenuFuncLogic, - *submenuFuncTrig, *submenuFuncString, *submenuFuncScientific, *submenuFuncDistr, - *submenuFuncStat, - *submenuRow, *submenuCol, *submenuSheet; - QAction *fileNew, *fileOpen, *fileSave, *fileSaveAs, *fileExcelImport, *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 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 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: + Q_OBJECT + + // QPE objects + DocLnk* currentDoc; + QMenuBar *menu; + QToolBar *toolbarFunctions, *toolbarEdit, *toolbarStandard; + FileSelector *fileSelector; + FileSelector *ExcelSelector; + + // QT objects + QPopupMenu *menuFile, *menuEdit, *menuInsert, *menuFormat, *menuData, *menuHelp, + *submenuFunc, *submenuFuncStd, *submenuFuncStandard, *submenuFuncLogic, + *submenuFuncTrig, *submenuFuncString, *submenuFuncScientific, *submenuFuncDistr, + *submenuFuncStat, + *submenuRow, *submenuCol, *submenuSheet; + QAction *fileNew, *fileOpen, *fileSave, *fileSaveAs, *fileExcelImport, *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 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 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(); @@ -127,14 +150,14 @@ class MainWindow: public QMainWindow void selectorFileNew(const DocLnk &lnkDoc); void selectorFileOpen(const DocLnk &lnkDoc); - public: - static QString appName() { return QString::fromLatin1("sheetqt"); } +public: +static QString appName() { return QString::fromLatin1("sheetqt"); } MainWindow(QWidget *p, const char*, WFlags); ~MainWindow(); void setHelpFile(const QString &help_filename) { helpFile=help_filename; } - public slots: +public slots: void setDocument(const QString &applnk_filename); }; -- cgit v0.9.0.2