Diffstat (limited to 'inputmethods/handwriting/qimpeninput.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/handwriting/qimpeninput.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/inputmethods/handwriting/qimpeninput.h b/inputmethods/handwriting/qimpeninput.h new file mode 100644 index 0000000..b4e4006 --- a/dev/null +++ b/inputmethods/handwriting/qimpeninput.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #ifndef _QIMPENINPUT_H_ | ||
22 | #define _QIMPENINPUT_H_ | ||
23 | |||
24 | #include "qimpenprofile.h" | ||
25 | |||
26 | #include <qpe/qdawg.h> | ||
27 | |||
28 | #include <qframe.h> | ||
29 | #include <qlist.h> | ||
30 | #include <qguardedptr.h> | ||
31 | |||
32 | class QPushButton; | ||
33 | class QTimer; | ||
34 | class QIMPenWidget; | ||
35 | class QIMPenSetup; | ||
36 | class QIMPenWordPick; | ||
37 | class QIMPenMatch; | ||
38 | class HandwritingHelp; | ||
39 | |||
40 | class QIMPenInput : public QFrame | ||
41 | { | ||
42 | Q_OBJECT | ||
43 | public: | ||
44 | QIMPenInput( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | ||
45 | virtual ~QIMPenInput(); | ||
46 | |||
47 | void resetState(); | ||
48 | |||
49 | QSize sizeHint() const; | ||
50 | |||
51 | signals: | ||
52 | void key( ushort, ushort, ushort, bool, bool ); | ||
53 | |||
54 | private slots: | ||
55 | void wordPicked( const QString & ); | ||
56 | void selectCharSet( int ); | ||
57 | void beginStroke(); | ||
58 | void strokeEntered( QIMPenStroke *st ); | ||
59 | void matchedCharacters( const QIMPenCharMatchList &cl ); | ||
60 | void keypress( uint scan_uni ); | ||
61 | void erase(); | ||
62 | void help(); | ||
63 | void setup(); | ||
64 | void backspace(); | ||
65 | void enter(); | ||
66 | |||
67 | private: | ||
68 | void loadProfiles(); | ||
69 | void selectProfile( const QString &name ); | ||
70 | void handleExtended( const QString & ); | ||
71 | void updateWordMatch( QIMPenCharMatchList &ml ); | ||
72 | void matchWords(); | ||
73 | void scanDict( const QDawg::Node* n, int ipos, const QString& str, int error ); | ||
74 | |||
75 | enum Mode { Normal, Switch, SwitchLock }; | ||
76 | |||
77 | private: | ||
78 | Mode mode; | ||
79 | QRect prefRect; | ||
80 | QIMPenWidget *pw; | ||
81 | QPushButton *helpBtn; | ||
82 | QPushButton *setupBtn; | ||
83 | QIMPenSetup *setupDlg; | ||
84 | QIMPenMatch *matcher; | ||
85 | QGuardedPtr<HandwritingHelp> helpDlg; | ||
86 | QIMPenProfile *profile; | ||
87 | QList<QIMPenProfile> profileList; | ||
88 | QIMPenCharSet *shortcutCharSet; | ||
89 | QIMPenCharSetList baseSets; | ||
90 | int currCharSet; | ||
91 | QIMPenWordPick *wordPicker; | ||
92 | }; | ||
93 | |||
94 | #endif // _QIMPENINPUT_H_ | ||