-rw-r--r-- | noncore/apps/opie-sheet/main.cpp | 10 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.h | 3 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/opie-sheet.pro | 4 |
4 files changed, 7 insertions, 14 deletions
diff --git a/noncore/apps/opie-sheet/main.cpp b/noncore/apps/opie-sheet/main.cpp index e42b4a5..d0a2995 100644 --- a/noncore/apps/opie-sheet/main.cpp +++ b/noncore/apps/opie-sheet/main.cpp @@ -1,28 +1,22 @@ /*************************************************************************** * * * 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. * * * ***************************************************************************/ /* * Opie Sheet (formerly Sheet/Qt) * by Serdar Ozler <sozler@sitebest.com> */ #include <qpe/qpeapplication.h> #include "mainwindow.h" -int main(int argc, char **argv) -{ - QPEApplication application(argc, argv); +#include <opie/oapplicationfactory.h> - MainWindow windowMain; - windowMain.setHelpFile(application.qpeDir()+"/help/html/"+QString(argv[0])+".html"); - application.showMainDocumentWidget(&windowMain); +OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) - return application.exec(); -} diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp index 43e5131..3915e52 100644 --- a/noncore/apps/opie-sheet/mainwindow.cpp +++ b/noncore/apps/opie-sheet/mainwindow.cpp @@ -22,50 +22,50 @@ #include <qtranslator.h> #include <qradiobutton.h> #include "cellformat.h" #include "numberdlg.h" #include "textdlg.h" #include "sortdlg.h" #include "finddlg.h" #include "func-plus.xpm" #include "func-minus.xpm" #include "func-cross.xpm" #include "func-divide.xpm" #include "func-paran-open.xpm" #include "func-paran-close.xpm" #include "func-comma.xpm" #include "func-func.xpm" #include "func-equal.xpm" #include "cell-select.xpm" #define DEFAULT_NUM_ROWS 199 #define DEFAULT_NUM_COLS (26*3) #define DEFAULT_NUM_SHEETS 3 -MainWindow::MainWindow() - :QMainWindow() +MainWindow::MainWindow(QWidget *parent, const char* n, WFlags fl) + :QMainWindow(parent, n, fl) { // initialize variables documentModified=FALSE; // construct objects currentDoc=0; fileSelector=new FileSelector("application/sheet-qt", this, QString::null); connect(fileSelector, SIGNAL(closeMe()), this, SLOT(selectorHide())); connect(fileSelector, SIGNAL(newSelected(const DocLnk &)), this, SLOT(selectorFileNew(const DocLnk &))); connect(fileSelector, SIGNAL(fileSelected(const DocLnk &)), this, SLOT(selectorFileOpen(const DocLnk &))); listSheets.setAutoDelete(TRUE); initActions(); initMenu(); initEditToolbar(); initFunctionsToolbar(); initStandardToolbar(); initSheet(); // set window title setCaption(tr("Opie Sheet")); // create sheets diff --git a/noncore/apps/opie-sheet/mainwindow.h b/noncore/apps/opie-sheet/mainwindow.h index 10d6650..370d82e 100644 --- a/noncore/apps/opie-sheet/mainwindow.h +++ b/noncore/apps/opie-sheet/mainwindow.h @@ -99,34 +99,35 @@ class MainWindow: public QMainWindow 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(); + 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: void setDocument(const QString &applnk_filename); }; #endif diff --git a/noncore/apps/opie-sheet/opie-sheet.pro b/noncore/apps/opie-sheet/opie-sheet.pro index 1435af6..acd5fa0 100644 --- a/noncore/apps/opie-sheet/opie-sheet.pro +++ b/noncore/apps/opie-sheet/opie-sheet.pro @@ -1,27 +1,25 @@ -TEMPLATE = app -CONFIG = qt warn_on release -DESTDIR = $(OPIEDIR)/bin +CONFIG = qt warn_on release quick-app HEADERS = mainwindow.h sheet.h cellformat.h finddlg.h numberdlg.h sortdlg.h textdlg.h SOURCES = main.cpp mainwindow.cpp sheet.cpp cellformat.cpp finddlg.cpp numberdlg.cpp sortdlg.cpp textdlg.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe TARGET = sheetqt TRANSLATIONS = ../../../i18n/de/sheetqt.ts \ ../../../i18n/nl/sheetqt.ts \ ../../../i18n/da/sheetqt.ts \ ../../../i18n/xx/sheetqt.ts \ ../../../i18n/en/sheetqt.ts \ ../../../i18n/es/sheetqt.ts \ ../../../i18n/fr/sheetqt.ts \ ../../../i18n/hu/sheetqt.ts \ ../../../i18n/ja/sheetqt.ts \ ../../../i18n/ko/sheetqt.ts \ ../../../i18n/no/sheetqt.ts \ ../../../i18n/pl/sheetqt.ts \ ../../../i18n/pt/sheetqt.ts \ ../../../i18n/pt_BR/sheetqt.ts \ ../../../i18n/sl/sheetqt.ts \ ../../../i18n/zh_CN/sheetqt.ts \ ../../../i18n/zh_TW/sheetqt.ts \ |