Diffstat (limited to 'inputmethods/handwriting/qimpensetup.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/handwriting/qimpensetup.h | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/inputmethods/handwriting/qimpensetup.h b/inputmethods/handwriting/qimpensetup.h new file mode 100644 index 0000000..5d3064b --- a/dev/null +++ b/inputmethods/handwriting/qimpensetup.h | |||
@@ -0,0 +1,124 @@ | |||
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 | #include <qdialog.h> | ||
22 | #include <qlist.h> | ||
23 | #include "qimpenprofile.h" | ||
24 | |||
25 | class QListBox; | ||
26 | class QPushButton; | ||
27 | class QComboBox; | ||
28 | class QIMPenWidget; | ||
29 | class QIMPenEdit; | ||
30 | class QIMPenPrefBase; | ||
31 | |||
32 | class QIMPenSetup : public QDialog | ||
33 | { | ||
34 | Q_OBJECT | ||
35 | public: | ||
36 | QIMPenSetup( QIMPenProfile *p, QWidget *parent=0, | ||
37 | const char *name=0, bool modal=FALSE, int WFlags=0 ); | ||
38 | |||
39 | QIMPenEdit *editor() { return edit; } | ||
40 | |||
41 | protected: | ||
42 | void loadProfiles(); | ||
43 | virtual void accept(); | ||
44 | |||
45 | private slots: | ||
46 | void styleClicked( int ); | ||
47 | void multiTimeoutChanged( int ); | ||
48 | void selectProfile( const QString &p ); | ||
49 | |||
50 | private: | ||
51 | QComboBox *profileCombo; | ||
52 | QIMPenEdit *edit; | ||
53 | QIMPenPrefBase *pref; | ||
54 | int style; | ||
55 | int multiTimeout; | ||
56 | QIMPenProfile *profile; | ||
57 | QList<QIMPenProfile> profileList; | ||
58 | }; | ||
59 | |||
60 | class QIMPenInputCharDlg : public QDialog | ||
61 | { | ||
62 | Q_OBJECT | ||
63 | public: | ||
64 | QIMPenInputCharDlg( QWidget *parent = 0, const char *name = 0, | ||
65 | bool modal = FALSE, int WFlags = 0 ); | ||
66 | |||
67 | unsigned int unicode() const { return uni; } | ||
68 | |||
69 | protected: | ||
70 | void addSpecial( QComboBox *cb ); | ||
71 | |||
72 | protected slots: | ||
73 | void setSpecial( int sp ); | ||
74 | void setCharacter( const QString &string ); | ||
75 | |||
76 | protected: | ||
77 | uint uni; | ||
78 | }; | ||
79 | |||
80 | class QIMPenEdit : public QWidget | ||
81 | { | ||
82 | Q_OBJECT | ||
83 | public: | ||
84 | QIMPenEdit( QIMPenProfile *p, QWidget *parent=0, | ||
85 | const char *name=0 ); | ||
86 | |||
87 | void setProfile( QIMPenProfile *p ); | ||
88 | void selectCharSet( QIMPenCharSet *c ); | ||
89 | |||
90 | protected: | ||
91 | void fillCharList(); | ||
92 | void enableButtons(); | ||
93 | QIMPenChar *findPrev(); | ||
94 | QIMPenChar *findNext(); | ||
95 | void setCurrentChar( QIMPenChar * ); | ||
96 | |||
97 | protected slots: | ||
98 | void prevChar(); | ||
99 | void nextChar(); | ||
100 | void clearChar(); | ||
101 | void selectChar( int ); | ||
102 | void selectCharSet( int ); | ||
103 | void addChar(); | ||
104 | void addNewChar(); | ||
105 | void removeChar(); | ||
106 | void defaultChars(); | ||
107 | void newStroke( QIMPenStroke * ); | ||
108 | |||
109 | protected: | ||
110 | QIMPenWidget *pw; | ||
111 | QComboBox *charSetCombo; | ||
112 | QListBox *charList; | ||
113 | QPushButton *newBtn; | ||
114 | QPushButton *addBtn; | ||
115 | QPushButton *removeBtn; | ||
116 | QPushButton *prevBtn; | ||
117 | QPushButton *nextBtn; | ||
118 | uint currentCode; | ||
119 | QIMPenChar *currentChar; | ||
120 | QIMPenChar *inputChar; | ||
121 | QIMPenCharSet *currentSet; | ||
122 | QIMPenProfile *profile; | ||
123 | }; | ||
124 | |||