summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-write/mainwindow.h
authorleseb <leseb>2002-07-14 21:21:35 (UTC)
committer leseb <leseb>2002-07-14 21:21:35 (UTC)
commit4feeec8b5b41cfd3d13274411f515524f687da09 (patch) (unidiff)
tree002bbfb9997713e5d5975855d3cfbba7a71b9104 /noncore/apps/opie-write/mainwindow.h
parentbdef9cf23ced569a9bc80c1d4f25d85861273b4a (diff)
downloadopie-4feeec8b5b41cfd3d13274411f515524f687da09.zip
opie-4feeec8b5b41cfd3d13274411f515524f687da09.tar.gz
opie-4feeec8b5b41cfd3d13274411f515524f687da09.tar.bz2
opie-write first draft
Diffstat (limited to 'noncore/apps/opie-write/mainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-write/mainwindow.h113
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
30class QAction;
31class QComboBox;
32class FileSelectorView;
33class FileSelector;
34class QToolBar;
35class ButtonMenu;
36
37namespace Qt3 {
38
39class QTextEdit;
40
41}
42
43class MainWindow : public QMainWindow
44{
45 Q_OBJECT
46
47public:
48 MainWindow( QWidget *parent = 0, const char *name = 0 );
49 ~MainWindow();
50
51protected:
52 void closeEvent( QCloseEvent *e );
53
54private 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
86private:
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