Diffstat (limited to 'noncore/apps/opie-write/mainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-write/mainwindow.h | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/noncore/apps/opie-write/mainwindow.h b/noncore/apps/opie-write/mainwindow.h new file mode 100644 index 0000000..565ad05 --- a/dev/null +++ b/noncore/apps/opie-write/mainwindow.h | |||
@@ -0,0 +1,113 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of the Qtopia Environment. | ||
5 | ** | ||
6 | ** Licensees holding valid Qtopia Developer license may use this | ||
7 | ** file in accordance with the Qtopia Developer License Agreement | ||
8 | ** provided with the Software. | ||
9 | ** | ||
10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING | ||
11 | ** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
12 | ** PURPOSE. | ||
13 | ** | ||
14 | ** email sales@trolltech.com for information about Qtopia License | ||
15 | ** Agreements. | ||
16 | ** | ||
17 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
18 | ** not clear to you. | ||
19 | ** | ||
20 | **********************************************************************/ | ||
21 | |||
22 | #ifndef MAINWINDOW_H | ||
23 | #define MAINWINDOW_H | ||
24 | |||
25 | #include <qmainwindow.h> | ||
26 | #include <qwidgetstack.h> | ||
27 | #include <qmap.h> | ||
28 | #include <qpe/filemanager.h> | ||
29 | |||
30 | class QAction; | ||
31 | class QComboBox; | ||
32 | class FileSelectorView; | ||
33 | class FileSelector; | ||
34 | class QToolBar; | ||
35 | class ButtonMenu; | ||
36 | |||
37 | namespace Qt3 { | ||
38 | |||
39 | class QTextEdit; | ||
40 | |||
41 | } | ||
42 | |||
43 | class MainWindow : public QMainWindow | ||
44 | { | ||
45 | Q_OBJECT | ||
46 | |||
47 | public: | ||
48 | MainWindow( QWidget *parent = 0, const char *name = 0 ); | ||
49 | ~MainWindow(); | ||
50 | |||
51 | protected: | ||
52 | void closeEvent( QCloseEvent *e ); | ||
53 | |||
54 | private slots: | ||
55 | // new file functions | ||
56 | void fileOpen(); | ||
57 | void fileRevert(); | ||
58 | void fileNew(); | ||
59 | |||
60 | void editUndo(); | ||
61 | void editRedo(); | ||
62 | void editCut(); | ||
63 | void editCopy(); | ||
64 | void editPaste(); | ||
65 | |||
66 | void textBold(); | ||
67 | void textUnderline(); | ||
68 | void textItalic(); | ||
69 | void textFamily( const QString &f ); | ||
70 | void textSize( const QString &p ); | ||
71 | void textStyle( int s ); | ||
72 | void textAlign( int ); | ||
73 | |||
74 | void fontChanged( const QFont &f ); | ||
75 | void colorChanged( const QColor &c ); | ||
76 | void alignmentChanged( int a ); | ||
77 | void editorChanged( QWidget * ); | ||
78 | |||
79 | // these are from textedit, we may need them | ||
80 | void insertTable(); | ||
81 | void newFile( const DocLnk & ); | ||
82 | void openFile( const DocLnk & ); | ||
83 | void showEditTools(); | ||
84 | void hideEditTools(); | ||
85 | |||
86 | private: | ||
87 | void updateFontSizeCombo( const QFont &f ); | ||
88 | void setupActions(); | ||
89 | Qt3::QTextEdit *currentEditor() const; | ||
90 | void doConnections( Qt3::QTextEdit *e ); | ||
91 | void updateCaption(); | ||
92 | void save(); | ||
93 | void clear(); | ||
94 | |||
95 | // added these from the textedit | ||
96 | QWidgetStack *editorStack; | ||
97 | FileSelector *fileSelector; | ||
98 | QToolBar *tbMenu; | ||
99 | QToolBar *tbEdit; | ||
100 | QToolBar *tbFont; | ||
101 | QToolBar *tbStyle; | ||
102 | QAction *actionTextBold, | ||
103 | *actionTextUnderline, | ||
104 | *actionTextItalic; | ||
105 | QComboBox *comboFont, | ||
106 | *comboSize; | ||
107 | ButtonMenu *alignMenu; | ||
108 | DocLnk *doc; | ||
109 | Qt3::QTextEdit* editor; | ||
110 | }; | ||
111 | |||
112 | |||
113 | #endif | ||