summaryrefslogtreecommitdiff
path: root/inputmethods/handwriting/qimpensetup.h
authorkergoth <kergoth>2002-01-25 22:14:26 (UTC)
committer kergoth <kergoth>2002-01-25 22:14:26 (UTC)
commit15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff)
treec2fa0399a2c47fda8e2cd0092c73a809d17f68eb /inputmethods/handwriting/qimpensetup.h
downloadopie-15318cad33835e4e2dc620d033e43cd930676cdd.zip
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2
Initial revision
Diffstat (limited to 'inputmethods/handwriting/qimpensetup.h') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpensetup.h124
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
25class QListBox;
26class QPushButton;
27class QComboBox;
28class QIMPenWidget;
29class QIMPenEdit;
30class QIMPenPrefBase;
31
32class QIMPenSetup : public QDialog
33{
34 Q_OBJECT
35public:
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
41protected:
42 void loadProfiles();
43 virtual void accept();
44
45private slots:
46 void styleClicked( int );
47 void multiTimeoutChanged( int );
48 void selectProfile( const QString &p );
49
50private:
51 QComboBox *profileCombo;
52 QIMPenEdit *edit;
53 QIMPenPrefBase *pref;
54 int style;
55 int multiTimeout;
56 QIMPenProfile *profile;
57 QList<QIMPenProfile> profileList;
58};
59
60class QIMPenInputCharDlg : public QDialog
61{
62 Q_OBJECT
63public:
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
69protected:
70 void addSpecial( QComboBox *cb );
71
72protected slots:
73 void setSpecial( int sp );
74 void setCharacter( const QString &string );
75
76protected:
77 uint uni;
78};
79
80class QIMPenEdit : public QWidget
81{
82 Q_OBJECT
83public:
84 QIMPenEdit( QIMPenProfile *p, QWidget *parent=0,
85 const char *name=0 );
86
87 void setProfile( QIMPenProfile *p );
88 void selectCharSet( QIMPenCharSet *c );
89
90protected:
91 void fillCharList();
92 void enableButtons();
93 QIMPenChar *findPrev();
94 QIMPenChar *findNext();
95 void setCurrentChar( QIMPenChar * );
96
97protected 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
109protected:
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