summaryrefslogtreecommitdiff
path: root/inputmethods/unikeyboard/unikeyboard.h
Unidiff
Diffstat (limited to 'inputmethods/unikeyboard/unikeyboard.h') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/unikeyboard/unikeyboard.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/inputmethods/unikeyboard/unikeyboard.h b/inputmethods/unikeyboard/unikeyboard.h
new file mode 100644
index 0000000..1a716c0
--- a/dev/null
+++ b/inputmethods/unikeyboard/unikeyboard.h
@@ -0,0 +1,77 @@
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#include <qscrollview.h>
21
22class QComboBox;
23
24class UniScrollview : public QScrollView {
25 Q_OBJECT
26public:
27 UniScrollview(QWidget* parent=0, const char* name=0, int f=0);
28 int cellSize() const { return cellsize; }
29
30signals:
31 void key( ushort unicode, ushort scancode, ushort modifiers, bool, bool );
32
33public slots:
34 void scrollTo( int unicode );
35
36protected:
37 void contentsMousePressEvent(QMouseEvent*);
38 void contentsMouseReleaseEvent(QMouseEvent*);
39 void drawContents( QPainter *, int cx, int cy, int cw, int ch ) ;
40
41private:
42 int cellsize;
43 QFont smallFont;
44 int xoff;
45};
46
47
48class UniKeyboard : public QFrame
49{
50 Q_OBJECT
51public:
52 UniKeyboard(QWidget* parent=0, const char* name=0, int f=0);
53 ~UniKeyboard();
54
55 void resetState();
56
57 QSize sizeHint() const;
58
59signals:
60 void key( ushort, ushort, ushort, bool, bool );
61
62protected:
63 void resizeEvent(QResizeEvent *);
64
65private slots:
66 void handleCombo( int );
67 void svMove( int, int );
68
69private:
70 UniScrollview *sv;
71 QComboBox *cb;
72 int currentBlock;
73 int* cbmap;
74};
75
76
77