summaryrefslogtreecommitdiff
path: root/core/launcher/inputmethods.h
Unidiff
Diffstat (limited to 'core/launcher/inputmethods.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/inputmethods.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/core/launcher/inputmethods.h b/core/launcher/inputmethods.h
new file mode 100644
index 0000000..286a818
--- a/dev/null
+++ b/core/launcher/inputmethods.h
@@ -0,0 +1,76 @@
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 __INPUT_METHODS_H__
22#define __INPUT_METHODS_H__
23
24
25#include <qpe/inputmethodinterface.h>
26
27#include <qwidget.h>
28#include <qvaluelist.h>
29
30class QToolButton;
31class QLibrary;
32
33struct InputMethod
34{
35#ifndef QT_NO_COMPONENT
36 QLibrary *library;
37#endif
38 QWidget *widget;
39 InputMethodInterface *interface;
40};
41
42class InputMethods : public QWidget
43{
44 Q_OBJECT
45public:
46 InputMethods( QWidget * );
47 ~InputMethods();
48
49 QRect inputRect() const;
50 bool shown() const;
51 QString currentShown() const; // name of interface
52 void showInputMethod(const QString& id);
53 void showInputMethod();
54 void hideInputMethod();
55 void loadInputMethods();
56
57signals:
58 void inputToggled( bool on );
59
60private slots:
61 void chooseKbd();
62 void showKbd( bool );
63 void resetStates();
64 void sendKey( ushort unicode, ushort scancode, ushort modifiers, bool, bool );
65
66private:
67 void chooseMethod(InputMethod* im);
68 QToolButton *kbdButton;
69 QToolButton *kbdChoice;
70 InputMethod *method;
71 QValueList<InputMethod> inputMethodList;
72};
73
74
75#endif // __INPUT_METHODS_H__
76