summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-sheet
Unidiff
Diffstat (limited to 'noncore/apps/opie-sheet') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/main.cpp10
-rw-r--r--noncore/apps/opie-sheet/mainwindow.cpp4
-rw-r--r--noncore/apps/opie-sheet/mainwindow.h3
-rw-r--r--noncore/apps/opie-sheet/opie-sheet.pro4
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
@@ -7,22 +7,16 @@
7 * * 7 * *
8 ***************************************************************************/ 8 ***************************************************************************/
9 9
10/* 10/*
11 * Opie Sheet (formerly Sheet/Qt) 11 * Opie Sheet (formerly Sheet/Qt)
12 * by Serdar Ozler <sozler@sitebest.com> 12 * by Serdar Ozler <sozler@sitebest.com>
13 */ 13 */
14 14
15#include <qpe/qpeapplication.h> 15#include <qpe/qpeapplication.h>
16 16
17#include "mainwindow.h" 17#include "mainwindow.h"
18 18
19int main(int argc, char **argv) 19#include <opie/oapplicationfactory.h>
20{
21 QPEApplication application(argc, argv);
22 20
23 MainWindow windowMain; 21OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
24 windowMain.setHelpFile(application.qpeDir()+"/help/html/"+QString(argv[0])+".html");
25 application.showMainDocumentWidget(&windowMain);
26 22
27 return application.exec();
28}
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
@@ -34,26 +34,26 @@
34#include "func-divide.xpm" 34#include "func-divide.xpm"
35#include "func-paran-open.xpm" 35#include "func-paran-open.xpm"
36#include "func-paran-close.xpm" 36#include "func-paran-close.xpm"
37#include "func-comma.xpm" 37#include "func-comma.xpm"
38#include "func-func.xpm" 38#include "func-func.xpm"
39#include "func-equal.xpm" 39#include "func-equal.xpm"
40#include "cell-select.xpm" 40#include "cell-select.xpm"
41 41
42#define DEFAULT_NUM_ROWS 199 42#define DEFAULT_NUM_ROWS 199
43#define DEFAULT_NUM_COLS (26*3) 43#define DEFAULT_NUM_COLS (26*3)
44#define DEFAULT_NUM_SHEETS 3 44#define DEFAULT_NUM_SHEETS 3
45 45
46MainWindow::MainWindow() 46MainWindow::MainWindow(QWidget *parent, const char* n, WFlags fl)
47 :QMainWindow() 47 :QMainWindow(parent, n, fl)
48{ 48{
49 // initialize variables 49 // initialize variables
50 documentModified=FALSE; 50 documentModified=FALSE;
51 51
52 // construct objects 52 // construct objects
53 currentDoc=0; 53 currentDoc=0;
54 fileSelector=new FileSelector("application/sheet-qt", this, QString::null); 54 fileSelector=new FileSelector("application/sheet-qt", this, QString::null);
55 connect(fileSelector, SIGNAL(closeMe()), this, SLOT(selectorHide())); 55 connect(fileSelector, SIGNAL(closeMe()), this, SLOT(selectorHide()));
56 connect(fileSelector, SIGNAL(newSelected(const DocLnk &)), this, SLOT(selectorFileNew(const DocLnk &))); 56 connect(fileSelector, SIGNAL(newSelected(const DocLnk &)), this, SLOT(selectorFileNew(const DocLnk &)));
57 connect(fileSelector, SIGNAL(fileSelected(const DocLnk &)), this, SLOT(selectorFileOpen(const DocLnk &))); 57 connect(fileSelector, SIGNAL(fileSelected(const DocLnk &)), this, SLOT(selectorFileOpen(const DocLnk &)));
58 58
59 listSheets.setAutoDelete(TRUE); 59 listSheets.setAutoDelete(TRUE);
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
@@ -111,22 +111,23 @@ class MainWindow: public QMainWindow
111 void slotSheetRemove(); 111 void slotSheetRemove();
112 void slotFuncOutput(); 112 void slotFuncOutput();
113 void slotCellSelect(bool lock); 113 void slotCellSelect(bool lock);
114 void slotCellClicked(const QString &cell); 114 void slotCellClicked(const QString &cell);
115 void slotSheetChanged(const QString &name); 115 void slotSheetChanged(const QString &name);
116 void slotDocModified(); 116 void slotDocModified();
117 void selectorShow(); 117 void selectorShow();
118 void selectorHide(); 118 void selectorHide();
119 void selectorFileNew(const DocLnk &lnkDoc); 119 void selectorFileNew(const DocLnk &lnkDoc);
120 void selectorFileOpen(const DocLnk &lnkDoc); 120 void selectorFileOpen(const DocLnk &lnkDoc);
121 121
122 public: 122 public:
123 MainWindow(); 123 static QString appName() { return QString::fromLatin1("sheetqt"); }
124 MainWindow(QWidget *p, const char*, WFlags);
124 ~MainWindow(); 125 ~MainWindow();
125 126
126 void setHelpFile(const QString &help_filename) { helpFile=help_filename; } 127 void setHelpFile(const QString &help_filename) { helpFile=help_filename; }
127 128
128 public slots: 129 public slots:
129 void setDocument(const QString &applnk_filename); 130 void setDocument(const QString &applnk_filename);
130}; 131};
131 132
132#endif 133#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,15 +1,13 @@
1 TEMPLATE= app 1 CONFIG = qt warn_on release quick-app
2 CONFIG = qt warn_on release
3 DESTDIR = $(OPIEDIR)/bin
4 HEADERS = mainwindow.h sheet.h cellformat.h finddlg.h numberdlg.h sortdlg.h textdlg.h 2 HEADERS = mainwindow.h sheet.h cellformat.h finddlg.h numberdlg.h sortdlg.h textdlg.h
5 SOURCES = main.cpp mainwindow.cpp sheet.cpp cellformat.cpp finddlg.cpp numberdlg.cpp sortdlg.cpp textdlg.cpp 3 SOURCES = main.cpp mainwindow.cpp sheet.cpp cellformat.cpp finddlg.cpp numberdlg.cpp sortdlg.cpp textdlg.cpp
6 INCLUDEPATH+= $(OPIEDIR)/include 4 INCLUDEPATH+= $(OPIEDIR)/include
7 DEPENDPATH+= $(OPIEDIR)/include 5 DEPENDPATH+= $(OPIEDIR)/include
8LIBS += -lqpe 6LIBS += -lqpe
9 TARGET = sheetqt 7 TARGET = sheetqt
10 8
11TRANSLATIONS = ../../../i18n/de/sheetqt.ts \ 9TRANSLATIONS = ../../../i18n/de/sheetqt.ts \
12 ../../../i18n/nl/sheetqt.ts \ 10 ../../../i18n/nl/sheetqt.ts \
13 ../../../i18n/da/sheetqt.ts \ 11 ../../../i18n/da/sheetqt.ts \
14 ../../../i18n/xx/sheetqt.ts \ 12 ../../../i18n/xx/sheetqt.ts \
15 ../../../i18n/en/sheetqt.ts \ 13 ../../../i18n/en/sheetqt.ts \