-rw-r--r-- | inputmethods/dasher/QtDasherImpl.cc | 2 | ||||
-rw-r--r-- | inputmethods/dvorak/dvorakimpl.cpp | 2 | ||||
-rw-r--r-- | inputmethods/handwriting/handwritingimpl.cpp | 2 | ||||
-rw-r--r-- | inputmethods/jumpx/keyboardimpl.cpp | 2 | ||||
-rw-r--r-- | inputmethods/keyboard/keyboardimpl.cpp | 2 | ||||
-rw-r--r-- | inputmethods/kjumpx/keyboardimpl.cpp | 2 | ||||
-rw-r--r-- | inputmethods/multikey/keyboardimpl.cpp | 2 | ||||
-rw-r--r-- | inputmethods/pickboard/pickboardimpl.cpp | 2 | ||||
-rw-r--r-- | inputmethods/unikeyboard/unikeyboardimpl.cpp | 2 |
9 files changed, 18 insertions, 0 deletions
diff --git a/inputmethods/dasher/QtDasherImpl.cc b/inputmethods/dasher/QtDasherImpl.cc index 55c21b1..9513802 100644 --- a/inputmethods/dasher/QtDasherImpl.cc +++ b/inputmethods/dasher/QtDasherImpl.cc | |||
@@ -1,85 +1,87 @@ | |||
1 | #include <iostream> | 1 | #include <iostream> |
2 | #include <qapplication.h> | 2 | #include <qapplication.h> |
3 | #include <qobject.h> | 3 | #include <qobject.h> |
4 | #include <qpixmap.h> | 4 | #include <qpixmap.h> |
5 | #include "DasherInterface.h" | 5 | #include "DasherInterface.h" |
6 | #include "QtDasherScreen.h" | 6 | #include "QtDasherScreen.h" |
7 | #include "QtDasherImpl.h" | 7 | #include "QtDasherImpl.h" |
8 | 8 | ||
9 | /* XPM */ | 9 | /* XPM */ |
10 | static const char * qtdasher_xpm[]={ | 10 | static const char * qtdasher_xpm[]={ |
11 | "28 7 2 1", | 11 | "28 7 2 1", |
12 | "# c #303030", | 12 | "# c #303030", |
13 | " c None", | 13 | " c None", |
14 | " ########################## ", | 14 | " ########################## ", |
15 | " ", | 15 | " ", |
16 | " # # ", | 16 | " # # ", |
17 | " # # # # ", | 17 | " # # # # ", |
18 | " # # # # ", | 18 | " # # # # ", |
19 | " # # # ", | 19 | " # # # ", |
20 | " ########################## "}; | 20 | " ########################## "}; |
21 | 21 | ||
22 | 22 | ||
23 | QtDasherImpl::QtDasherImpl() | 23 | QtDasherImpl::QtDasherImpl() |
24 | : qtdasherwidget(0), icn(0), ref(0), qtdasherinterface(0) | 24 | : qtdasherwidget(0), icn(0), ref(0), qtdasherinterface(0) |
25 | { | 25 | { |
26 | } | 26 | } |
27 | 27 | ||
28 | QtDasherImpl::~QtDasherImpl() | 28 | QtDasherImpl::~QtDasherImpl() |
29 | { | 29 | { |
30 | delete qtdasherwidget; | 30 | delete qtdasherwidget; |
31 | delete icn; | 31 | delete icn; |
32 | } | 32 | } |
33 | 33 | ||
34 | QWidget *QtDasherImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 34 | QWidget *QtDasherImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
35 | { | 35 | { |
36 | if ( !qtdasherwidget ) { | 36 | if ( !qtdasherwidget ) { |
37 | qtdasherwidget = new QtDasherPlugin( parent, "Dasher", f ); | 37 | qtdasherwidget = new QtDasherPlugin( parent, "Dasher", f ); |
38 | } | 38 | } |
39 | return qtdasherwidget; | 39 | return qtdasherwidget; |
40 | } | 40 | } |
41 | 41 | ||
42 | void QtDasherImpl::resetState() | 42 | void QtDasherImpl::resetState() |
43 | { | 43 | { |
44 | if ( qtdasherwidget ) | 44 | if ( qtdasherwidget ) |
45 | qtdasherwidget->resetState(); | 45 | qtdasherwidget->resetState(); |
46 | } | 46 | } |
47 | 47 | ||
48 | QPixmap *QtDasherImpl::icon() | 48 | QPixmap *QtDasherImpl::icon() |
49 | { | 49 | { |
50 | if ( !icn ) | 50 | if ( !icn ) |
51 | icn = new QPixmap( (const char **)qtdasher_xpm ); | 51 | icn = new QPixmap( (const char **)qtdasher_xpm ); |
52 | return icn; | 52 | return icn; |
53 | } | 53 | } |
54 | 54 | ||
55 | QString QtDasherImpl::name() | 55 | QString QtDasherImpl::name() |
56 | { | 56 | { |
57 | return qApp->translate( "InputMethods", "Dasher" ); | 57 | return qApp->translate( "InputMethods", "Dasher" ); |
58 | } | 58 | } |
59 | 59 | ||
60 | void QtDasherImpl::onKeyPress( QObject *receiver, const char *slot ) | 60 | void QtDasherImpl::onKeyPress( QObject *receiver, const char *slot ) |
61 | { | 61 | { |
62 | if ( qtdasherwidget ) | 62 | if ( qtdasherwidget ) |
63 | QObject::connect( qtdasherwidget, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 63 | QObject::connect( qtdasherwidget, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
64 | } | 64 | } |
65 | 65 | ||
66 | #ifndef QT_NO_COMPONENT | 66 | #ifndef QT_NO_COMPONENT |
67 | QRESULT QtDasherImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 67 | QRESULT QtDasherImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
68 | { | 68 | { |
69 | *iface = 0; | 69 | *iface = 0; |
70 | if ( uuid == IID_QUnknown ) | 70 | if ( uuid == IID_QUnknown ) |
71 | *iface = this; | 71 | *iface = this; |
72 | else if ( uuid == IID_InputMethod ) | 72 | else if ( uuid == IID_InputMethod ) |
73 | *iface = this; | 73 | *iface = this; |
74 | else | ||
75 | return QS_FALSE; | ||
74 | 76 | ||
75 | if ( *iface ) | 77 | if ( *iface ) |
76 | (*iface)->addRef(); | 78 | (*iface)->addRef(); |
77 | return QS_OK; | 79 | return QS_OK; |
78 | } | 80 | } |
79 | 81 | ||
80 | Q_EXPORT_INTERFACE() | 82 | Q_EXPORT_INTERFACE() |
81 | { | 83 | { |
82 | Q_CREATE_INSTANCE( QtDasherImpl ) | 84 | Q_CREATE_INSTANCE( QtDasherImpl ) |
83 | } | 85 | } |
84 | #endif | 86 | #endif |
85 | 87 | ||
diff --git a/inputmethods/dvorak/dvorakimpl.cpp b/inputmethods/dvorak/dvorakimpl.cpp index 8050ce1..9e9fed9 100644 --- a/inputmethods/dvorak/dvorakimpl.cpp +++ b/inputmethods/dvorak/dvorakimpl.cpp | |||
@@ -1,130 +1,132 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 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 | 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 | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qapplication.h> | 20 | #include <qapplication.h> |
21 | #include <qpixmap.h> | 21 | #include <qpixmap.h> |
22 | #include "dvorak.h" | 22 | #include "dvorak.h" |
23 | #include "dvorakimpl.h" | 23 | #include "dvorakimpl.h" |
24 | 24 | ||
25 | /* XPM */ | 25 | /* XPM */ |
26 | static const char * const kb_xpm[] = { | 26 | static const char * const kb_xpm[] = { |
27 | "28 13 4 1", | 27 | "28 13 4 1", |
28 | " c None", | 28 | " c None", |
29 | ". c #4C4C4C", | 29 | ". c #4C4C4C", |
30 | "+ c #FFF7DD", | 30 | "+ c #FFF7DD", |
31 | "@ c #D6CFBA", | 31 | "@ c #D6CFBA", |
32 | " .......................... ", | 32 | " .......................... ", |
33 | " .+++.+++.+++.+++.+++.++++. ", | 33 | " .+++.+++.+++.+++.+++.++++. ", |
34 | " .+@@.+@@.+@@.+@@.+@@.+@@@. ", | 34 | " .+@@.+@@.+@@.+@@.+@@.+@@@. ", |
35 | " .......................... ", | 35 | " .......................... ", |
36 | " .+++++.+++.+++.+++.++++++. ", | 36 | " .+++++.+++.+++.+++.++++++. ", |
37 | " .+@@@@.+@@.+@@.+@@.+@@@@@. ", | 37 | " .+@@@@.+@@.+@@.+@@.+@@@@@. ", |
38 | " .......................... ", | 38 | " .......................... ", |
39 | " .++++++.+++.+++.+++.+++++. ", | 39 | " .++++++.+++.+++.+++.+++++. ", |
40 | " .+@@@@@.+@@.+@@.+@@.+@@@@. ", | 40 | " .+@@@@@.+@@.+@@.+@@.+@@@@. ", |
41 | " .......................... ", | 41 | " .......................... ", |
42 | " .++++.++++++++++++++.++++. ", | 42 | " .++++.++++++++++++++.++++. ", |
43 | " .+@@@.+@@@@@@@@@@@@@.+@@@. ", | 43 | " .+@@@.+@@@@@@@@@@@@@.+@@@. ", |
44 | " .......................... "}; | 44 | " .......................... "}; |
45 | 45 | ||
46 | 46 | ||
47 | /* XPM */ | 47 | /* XPM */ |
48 | static const char * const opti_xpm[] = { | 48 | static const char * const opti_xpm[] = { |
49 | "28 13 4 1", | 49 | "28 13 4 1", |
50 | " c None", | 50 | " c None", |
51 | ". c #4C4C4C", | 51 | ". c #4C4C4C", |
52 | "+ c #FFF7DD", | 52 | "+ c #FFF7DD", |
53 | "@ c #D6CFBA", | 53 | "@ c #D6CFBA", |
54 | " ......................... ", | 54 | " ......................... ", |
55 | " .+++.+++.+++.+++.+++.+++. ", | 55 | " .+++.+++.+++.+++.+++.+++. ", |
56 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", | 56 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", |
57 | " ......................... ", | 57 | " ......................... ", |
58 | " .+++.+++.+++.+++.+++.+++. ", | 58 | " .+++.+++.+++.+++.+++.+++. ", |
59 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", | 59 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", |
60 | " ......................... ", | 60 | " ......................... ", |
61 | " .+++.+++.+++.+++.+++.+++. ", | 61 | " .+++.+++.+++.+++.+++.+++. ", |
62 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", | 62 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", |
63 | " ......................... ", | 63 | " ......................... ", |
64 | " .+++.+++.+++.+++.+++.+++. ", | 64 | " .+++.+++.+++.+++.+++.+++. ", |
65 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", | 65 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", |
66 | " ......................... "}; | 66 | " ......................... "}; |
67 | 67 | ||
68 | 68 | ||
69 | 69 | ||
70 | KeyboardImpl::KeyboardImpl() | 70 | KeyboardImpl::KeyboardImpl() |
71 | : input(0), icn(0), ref(0) | 71 | : input(0), icn(0), ref(0) |
72 | { | 72 | { |
73 | } | 73 | } |
74 | 74 | ||
75 | KeyboardImpl::~KeyboardImpl() | 75 | KeyboardImpl::~KeyboardImpl() |
76 | { | 76 | { |
77 | delete input; | 77 | delete input; |
78 | delete icn; | 78 | delete icn; |
79 | } | 79 | } |
80 | 80 | ||
81 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 81 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
82 | { | 82 | { |
83 | if ( !input ) | 83 | if ( !input ) |
84 | input = new Dvorak::Keyboard( parent, "Keyboard", f ); | 84 | input = new Dvorak::Keyboard( parent, "Keyboard", f ); |
85 | return input; | 85 | return input; |
86 | } | 86 | } |
87 | 87 | ||
88 | void KeyboardImpl::resetState() | 88 | void KeyboardImpl::resetState() |
89 | { | 89 | { |
90 | if ( input ) | 90 | if ( input ) |
91 | input->resetState(); | 91 | input->resetState(); |
92 | } | 92 | } |
93 | 93 | ||
94 | QPixmap *KeyboardImpl::icon() | 94 | QPixmap *KeyboardImpl::icon() |
95 | { | 95 | { |
96 | if ( !icn ) | 96 | if ( !icn ) |
97 | icn = new QPixmap( (const char **)kb_xpm ); | 97 | icn = new QPixmap( (const char **)kb_xpm ); |
98 | return icn; | 98 | return icn; |
99 | } | 99 | } |
100 | 100 | ||
101 | QString KeyboardImpl::name() | 101 | QString KeyboardImpl::name() |
102 | { | 102 | { |
103 | return qApp->translate( "InputMethods", "Dvorak" ); | 103 | return qApp->translate( "InputMethods", "Dvorak" ); |
104 | } | 104 | } |
105 | 105 | ||
106 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) | 106 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) |
107 | { | 107 | { |
108 | if ( input ) | 108 | if ( input ) |
109 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 109 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
110 | } | 110 | } |
111 | 111 | ||
112 | #ifndef QT_NO_COMPONENT | 112 | #ifndef QT_NO_COMPONENT |
113 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 113 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
114 | { | 114 | { |
115 | *iface = 0; | 115 | *iface = 0; |
116 | if ( uuid == IID_QUnknown ) | 116 | if ( uuid == IID_QUnknown ) |
117 | *iface = this; | 117 | *iface = this; |
118 | else if ( uuid == IID_InputMethod ) | 118 | else if ( uuid == IID_InputMethod ) |
119 | *iface = this; | 119 | *iface = this; |
120 | else | ||
121 | return QS_FALSE; | ||
120 | 122 | ||
121 | if ( *iface ) | 123 | if ( *iface ) |
122 | (*iface)->addRef(); | 124 | (*iface)->addRef(); |
123 | return QS_OK; | 125 | return QS_OK; |
124 | } | 126 | } |
125 | 127 | ||
126 | Q_EXPORT_INTERFACE() | 128 | Q_EXPORT_INTERFACE() |
127 | { | 129 | { |
128 | Q_CREATE_INSTANCE( KeyboardImpl ) | 130 | Q_CREATE_INSTANCE( KeyboardImpl ) |
129 | } | 131 | } |
130 | #endif | 132 | #endif |
diff --git a/inputmethods/handwriting/handwritingimpl.cpp b/inputmethods/handwriting/handwritingimpl.cpp index c39e1aa..22e2058 100644 --- a/inputmethods/handwriting/handwritingimpl.cpp +++ b/inputmethods/handwriting/handwritingimpl.cpp | |||
@@ -1,113 +1,115 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 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 | 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 | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include <qapplication.h> | 21 | #include <qapplication.h> |
22 | #include <qwidget.h> | 22 | #include <qwidget.h> |
23 | #include <qpixmap.h> | 23 | #include <qpixmap.h> |
24 | #include "qimpeninput.h" | 24 | #include "qimpeninput.h" |
25 | #include "handwritingimpl.h" | 25 | #include "handwritingimpl.h" |
26 | 26 | ||
27 | /* XPM */ | 27 | /* XPM */ |
28 | static const char * pen_xpm[] = { | 28 | static const char * pen_xpm[] = { |
29 | "28 13 9 1", | 29 | "28 13 9 1", |
30 | " c None", | 30 | " c None", |
31 | ". c #000000", | 31 | ". c #000000", |
32 | "+ c #FFE993", | 32 | "+ c #FFE993", |
33 | "@ c #8292FF", | 33 | "@ c #8292FF", |
34 | "# c #F7C500", | 34 | "# c #F7C500", |
35 | "$ c #C69F00", | 35 | "$ c #C69F00", |
36 | "% c #0022FF", | 36 | "% c #0022FF", |
37 | "& c #000F72", | 37 | "& c #000F72", |
38 | "* c #A3732C", | 38 | "* c #A3732C", |
39 | " . ", | 39 | " . ", |
40 | " .+. ", | 40 | " .+. ", |
41 | " .@#$. ", | 41 | " .@#$. ", |
42 | " .@%&. ", | 42 | " .@%&. ", |
43 | " .@%&. ", | 43 | " .@%&. ", |
44 | " . .@%&. ", | 44 | " . .@%&. ", |
45 | " . .@%&. ", | 45 | " . .@%&. ", |
46 | " . .@%&. ", | 46 | " . .@%&. ", |
47 | " ... ... .. .@%&. ", | 47 | " ... ... .. .@%&. ", |
48 | " . . . . . .*.&. ", | 48 | " . . . . . .*.&. ", |
49 | " . . . . . .**. ", | 49 | " . . . . . .**. ", |
50 | " ... ... .. ... ", | 50 | " ... ... .. ... ", |
51 | " "}; | 51 | " "}; |
52 | 52 | ||
53 | HandwritingImpl::HandwritingImpl() | 53 | HandwritingImpl::HandwritingImpl() |
54 | : input(0), icn(0), ref(0) | 54 | : input(0), icn(0), ref(0) |
55 | { | 55 | { |
56 | } | 56 | } |
57 | 57 | ||
58 | HandwritingImpl::~HandwritingImpl() | 58 | HandwritingImpl::~HandwritingImpl() |
59 | { | 59 | { |
60 | delete input; | 60 | delete input; |
61 | delete icn; | 61 | delete icn; |
62 | } | 62 | } |
63 | 63 | ||
64 | QWidget *HandwritingImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 64 | QWidget *HandwritingImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
65 | { | 65 | { |
66 | if ( !input ) | 66 | if ( !input ) |
67 | input = new QIMPenInput( parent, "Handwriting", f ); | 67 | input = new QIMPenInput( parent, "Handwriting", f ); |
68 | return input; | 68 | return input; |
69 | } | 69 | } |
70 | 70 | ||
71 | void HandwritingImpl::resetState() | 71 | void HandwritingImpl::resetState() |
72 | { | 72 | { |
73 | if ( input ) | 73 | if ( input ) |
74 | input->resetState(); | 74 | input->resetState(); |
75 | } | 75 | } |
76 | 76 | ||
77 | QPixmap *HandwritingImpl::icon() | 77 | QPixmap *HandwritingImpl::icon() |
78 | { | 78 | { |
79 | if ( !icn ) | 79 | if ( !icn ) |
80 | icn = new QPixmap( (const char **)pen_xpm ); | 80 | icn = new QPixmap( (const char **)pen_xpm ); |
81 | return icn; | 81 | return icn; |
82 | } | 82 | } |
83 | 83 | ||
84 | QString HandwritingImpl::name() | 84 | QString HandwritingImpl::name() |
85 | { | 85 | { |
86 | return qApp->translate( "InputMethods", "Handwriting" ); | 86 | return qApp->translate( "InputMethods", "Handwriting" ); |
87 | } | 87 | } |
88 | 88 | ||
89 | void HandwritingImpl::onKeyPress( QObject *receiver, const char *slot ) | 89 | void HandwritingImpl::onKeyPress( QObject *receiver, const char *slot ) |
90 | { | 90 | { |
91 | if ( input ) | 91 | if ( input ) |
92 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 92 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
93 | } | 93 | } |
94 | 94 | ||
95 | #ifndef QT_NO_COMPONENT | 95 | #ifndef QT_NO_COMPONENT |
96 | QRESULT HandwritingImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 96 | QRESULT HandwritingImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
97 | { | 97 | { |
98 | *iface = 0; | 98 | *iface = 0; |
99 | if ( uuid == IID_QUnknown ) | 99 | if ( uuid == IID_QUnknown ) |
100 | *iface = this; | 100 | *iface = this; |
101 | else if ( uuid == IID_InputMethod ) | 101 | else if ( uuid == IID_InputMethod ) |
102 | *iface = this; | 102 | *iface = this; |
103 | else | ||
104 | return QS_FALSE; | ||
103 | 105 | ||
104 | if ( *iface ) | 106 | if ( *iface ) |
105 | (*iface)->addRef(); | 107 | (*iface)->addRef(); |
106 | return QS_OK; | 108 | return QS_OK; |
107 | } | 109 | } |
108 | 110 | ||
109 | Q_EXPORT_INTERFACE() | 111 | Q_EXPORT_INTERFACE() |
110 | { | 112 | { |
111 | Q_CREATE_INSTANCE( HandwritingImpl ) | 113 | Q_CREATE_INSTANCE( HandwritingImpl ) |
112 | } | 114 | } |
113 | #endif | 115 | #endif |
diff --git a/inputmethods/jumpx/keyboardimpl.cpp b/inputmethods/jumpx/keyboardimpl.cpp index 34c227f..e75dd5f 100644 --- a/inputmethods/jumpx/keyboardimpl.cpp +++ b/inputmethods/jumpx/keyboardimpl.cpp | |||
@@ -1,97 +1,99 @@ | |||
1 | /**************************************************************************************94x78** | 1 | /**************************************************************************************94x78** |
2 | ** | 2 | ** |
3 | ** This file may be distributed and/or modified under the terms of the | 3 | ** This file may be distributed and/or modified under the terms of the |
4 | ** GNU General Public License version 2 as published by the Free Software | 4 | ** GNU General Public License version 2 as published by the Free Software |
5 | ** Foundation and appearing in the file LICENSE.GPL included in the | 5 | ** Foundation and appearing in the file LICENSE.GPL included in the |
6 | ** packaging of this file. | 6 | ** packaging of this file. |
7 | ** | 7 | ** |
8 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 8 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
9 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 9 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
10 | ** | 10 | ** |
11 | *********************************************************************************************/ | 11 | *********************************************************************************************/ |
12 | #include <qapplication.h> | 12 | #include <qapplication.h> |
13 | #include <qpixmap.h> | 13 | #include <qpixmap.h> |
14 | #include "keyboard.h" | 14 | #include "keyboard.h" |
15 | #include "keyboardimpl.h" | 15 | #include "keyboardimpl.h" |
16 | 16 | ||
17 | /* XPM */ | 17 | /* XPM */ |
18 | static const char * const icon_xpm[] = { | 18 | static const char * const icon_xpm[] = { |
19 | "26 13 2 1", | 19 | "26 13 2 1", |
20 | " c None", | 20 | " c None", |
21 | ".c #000000", | 21 | ".c #000000", |
22 | " ... ... ... ... ... ... ", | 22 | " ... ... ... ... ... ... ", |
23 | ". . . . . . . ", | 23 | ". . . . . . . ", |
24 | ". . . . . . . ", | 24 | ". . . . . . . ", |
25 | ". . . . . . . ", | 25 | ". . . . . . . ", |
26 | " ....... ... ... ....... ", | 26 | " ....... ... ... ....... ", |
27 | ". . . . . ", | 27 | ". . . . . ", |
28 | ". . . . . ", | 28 | ". . . . . ", |
29 | ". . . . . ", | 29 | ". . . . . ", |
30 | " ....... ... ... ....... ", | 30 | " ....... ... ... ....... ", |
31 | ". . . . . . . ", | 31 | ". . . . . . . ", |
32 | ". . . . . . . ", | 32 | ". . . . . . . ", |
33 | ". . . . . . . ", | 33 | ". . . . . . . ", |
34 | " ... ... ... ... ... ... "}; | 34 | " ... ... ... ... ... ... "}; |
35 | 35 | ||
36 | 36 | ||
37 | KeyboardImpl::KeyboardImpl() | 37 | KeyboardImpl::KeyboardImpl() |
38 | : input(0), icn(0), ref(0) | 38 | : input(0), icn(0), ref(0) |
39 | { | 39 | { |
40 | } | 40 | } |
41 | 41 | ||
42 | KeyboardImpl::~KeyboardImpl() | 42 | KeyboardImpl::~KeyboardImpl() |
43 | { | 43 | { |
44 | delete input; | 44 | delete input; |
45 | delete icn; | 45 | delete icn; |
46 | } | 46 | } |
47 | 47 | ||
48 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 48 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
49 | { | 49 | { |
50 | if ( !input ) | 50 | if ( !input ) |
51 | input = new JumpX::Keyboard( parent, "Keyboard", f ); | 51 | input = new JumpX::Keyboard( parent, "Keyboard", f ); |
52 | return input; | 52 | return input; |
53 | } | 53 | } |
54 | 54 | ||
55 | void KeyboardImpl::resetState() | 55 | void KeyboardImpl::resetState() |
56 | { | 56 | { |
57 | if ( input ) | 57 | if ( input ) |
58 | input->resetState(); | 58 | input->resetState(); |
59 | } | 59 | } |
60 | 60 | ||
61 | QPixmap *KeyboardImpl::icon() | 61 | QPixmap *KeyboardImpl::icon() |
62 | { | 62 | { |
63 | if ( !icn ) | 63 | if ( !icn ) |
64 | icn = new QPixmap( (const char **)icon_xpm ); | 64 | icn = new QPixmap( (const char **)icon_xpm ); |
65 | return icn; | 65 | return icn; |
66 | } | 66 | } |
67 | 67 | ||
68 | QString KeyboardImpl::name() | 68 | QString KeyboardImpl::name() |
69 | { | 69 | { |
70 | return qApp->translate( "InputMethods", "JumpX" ); | 70 | return qApp->translate( "InputMethods", "JumpX" ); |
71 | } | 71 | } |
72 | 72 | ||
73 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) | 73 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) |
74 | { | 74 | { |
75 | if ( input ) | 75 | if ( input ) |
76 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 76 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
77 | } | 77 | } |
78 | 78 | ||
79 | #ifndef QT_NO_COMPONENT | 79 | #ifndef QT_NO_COMPONENT |
80 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 80 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
81 | { | 81 | { |
82 | *iface = 0; | 82 | *iface = 0; |
83 | if ( uuid == IID_QUnknown ) | 83 | if ( uuid == IID_QUnknown ) |
84 | *iface = this; | 84 | *iface = this; |
85 | else if ( uuid == IID_InputMethod ) | 85 | else if ( uuid == IID_InputMethod ) |
86 | *iface = this; | 86 | *iface = this; |
87 | else | ||
88 | return QS_FALSE; | ||
87 | 89 | ||
88 | if ( *iface ) | 90 | if ( *iface ) |
89 | (*iface)->addRef(); | 91 | (*iface)->addRef(); |
90 | return QS_OK; | 92 | return QS_OK; |
91 | } | 93 | } |
92 | 94 | ||
93 | Q_EXPORT_INTERFACE() | 95 | Q_EXPORT_INTERFACE() |
94 | { | 96 | { |
95 | Q_CREATE_INSTANCE( KeyboardImpl ) | 97 | Q_CREATE_INSTANCE( KeyboardImpl ) |
96 | } | 98 | } |
97 | #endif | 99 | #endif |
diff --git a/inputmethods/keyboard/keyboardimpl.cpp b/inputmethods/keyboard/keyboardimpl.cpp index 3c77fe6..701d35f 100644 --- a/inputmethods/keyboard/keyboardimpl.cpp +++ b/inputmethods/keyboard/keyboardimpl.cpp | |||
@@ -1,128 +1,130 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 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 | 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 | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qapplication.h> | 20 | #include <qapplication.h> |
21 | #include <qpixmap.h> | 21 | #include <qpixmap.h> |
22 | #include "keyboard.h" | 22 | #include "keyboard.h" |
23 | #include "keyboardimpl.h" | 23 | #include "keyboardimpl.h" |
24 | 24 | ||
25 | /* XPM */ | 25 | /* XPM */ |
26 | static const char * const kb_xpm[] = { | 26 | static const char * const kb_xpm[] = { |
27 | "28 13 4 1", | 27 | "28 13 4 1", |
28 | " c None", | 28 | " c None", |
29 | ". c #4C4C4C", | 29 | ". c #4C4C4C", |
30 | "+ c #FFF7DD", | 30 | "+ c #FFF7DD", |
31 | "@ c #D6CFBA", | 31 | "@ c #D6CFBA", |
32 | " .......................... ", | 32 | " .......................... ", |
33 | " .+++.+++.+++.+++.+++.++++. ", | 33 | " .+++.+++.+++.+++.+++.++++. ", |
34 | " .+@@.+@@.+@@.+@@.+@@.+@@@. ", | 34 | " .+@@.+@@.+@@.+@@.+@@.+@@@. ", |
35 | " .......................... ", | 35 | " .......................... ", |
36 | " .+++++.+++.+++.+++.++++++. ", | 36 | " .+++++.+++.+++.+++.++++++. ", |
37 | " .+@@@@.+@@.+@@.+@@.+@@@@@. ", | 37 | " .+@@@@.+@@.+@@.+@@.+@@@@@. ", |
38 | " .......................... ", | 38 | " .......................... ", |
39 | " .++++++.+++.+++.+++.+++++. ", | 39 | " .++++++.+++.+++.+++.+++++. ", |
40 | " .+@@@@@.+@@.+@@.+@@.+@@@@. ", | 40 | " .+@@@@@.+@@.+@@.+@@.+@@@@. ", |
41 | " .......................... ", | 41 | " .......................... ", |
42 | " .++++.++++++++++++++.++++. ", | 42 | " .++++.++++++++++++++.++++. ", |
43 | " .+@@@.+@@@@@@@@@@@@@.+@@@. ", | 43 | " .+@@@.+@@@@@@@@@@@@@.+@@@. ", |
44 | " .......................... "}; | 44 | " .......................... "}; |
45 | 45 | ||
46 | 46 | ||
47 | /* XPM */ | 47 | /* XPM */ |
48 | static const char * const ipti_xpm[] = { | 48 | static const char * const ipti_xpm[] = { |
49 | "28 13 4 1", | 49 | "28 13 4 1", |
50 | " c None", | 50 | " c None", |
51 | ". c #4C4C4C", | 51 | ". c #4C4C4C", |
52 | "+ c #FFF7DD", | 52 | "+ c #FFF7DD", |
53 | "@ c #D6CFBA", | 53 | "@ c #D6CFBA", |
54 | " ......................... ", | 54 | " ......................... ", |
55 | " .+++.+++.+++.+++.+++.+++. ", | 55 | " .+++.+++.+++.+++.+++.+++. ", |
56 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", | 56 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", |
57 | " ......................... ", | 57 | " ......................... ", |
58 | " .+++.+++.+++.+++.+++.+++. ", | 58 | " .+++.+++.+++.+++.+++.+++. ", |
59 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", | 59 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", |
60 | " ......................... ", | 60 | " ......................... ", |
61 | " .+++.+++.+++.+++.+++.+++. ", | 61 | " .+++.+++.+++.+++.+++.+++. ", |
62 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", | 62 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", |
63 | " ......................... ", | 63 | " ......................... ", |
64 | " .+++.+++.+++.+++.+++.+++. ", | 64 | " .+++.+++.+++.+++.+++.+++. ", |
65 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", | 65 | " .+@@.+@@.+@@.+@@.+@@.+@@. ", |
66 | " ......................... "}; | 66 | " ......................... "}; |
67 | 67 | ||
68 | KeyboardImpl::KeyboardImpl() | 68 | KeyboardImpl::KeyboardImpl() |
69 | : input(0), icn(0), ref(0) | 69 | : input(0), icn(0), ref(0) |
70 | { | 70 | { |
71 | } | 71 | } |
72 | 72 | ||
73 | KeyboardImpl::~KeyboardImpl() | 73 | KeyboardImpl::~KeyboardImpl() |
74 | { | 74 | { |
75 | delete input; | 75 | delete input; |
76 | delete icn; | 76 | delete icn; |
77 | } | 77 | } |
78 | 78 | ||
79 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 79 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
80 | { | 80 | { |
81 | if ( !input ) | 81 | if ( !input ) |
82 | input = new KeyboardInput::Keyboard( parent, "Keyboard", f ); | 82 | input = new KeyboardInput::Keyboard( parent, "Keyboard", f ); |
83 | return input; | 83 | return input; |
84 | } | 84 | } |
85 | 85 | ||
86 | void KeyboardImpl::resetState() | 86 | void KeyboardImpl::resetState() |
87 | { | 87 | { |
88 | if ( input ) | 88 | if ( input ) |
89 | input->resetState(); | 89 | input->resetState(); |
90 | } | 90 | } |
91 | 91 | ||
92 | QPixmap *KeyboardImpl::icon() | 92 | QPixmap *KeyboardImpl::icon() |
93 | { | 93 | { |
94 | if ( !icn ) | 94 | if ( !icn ) |
95 | icn = new QPixmap( (const char **)kb_xpm ); | 95 | icn = new QPixmap( (const char **)kb_xpm ); |
96 | return icn; | 96 | return icn; |
97 | } | 97 | } |
98 | 98 | ||
99 | QString KeyboardImpl::name() | 99 | QString KeyboardImpl::name() |
100 | { | 100 | { |
101 | return qApp->translate( "InputMethods", "Keyboard" ); | 101 | return qApp->translate( "InputMethods", "Keyboard" ); |
102 | } | 102 | } |
103 | 103 | ||
104 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) | 104 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) |
105 | { | 105 | { |
106 | if ( input ) | 106 | if ( input ) |
107 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 107 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
108 | } | 108 | } |
109 | 109 | ||
110 | #ifndef QT_NO_COMPONENT | 110 | #ifndef QT_NO_COMPONENT |
111 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 111 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
112 | { | 112 | { |
113 | *iface = 0; | 113 | *iface = 0; |
114 | if ( uuid == IID_QUnknown ) | 114 | if ( uuid == IID_QUnknown ) |
115 | *iface = this; | 115 | *iface = this; |
116 | else if ( uuid == IID_InputMethod ) | 116 | else if ( uuid == IID_InputMethod ) |
117 | *iface = this; | 117 | *iface = this; |
118 | else | ||
119 | return QS_FALSE; | ||
118 | 120 | ||
119 | if ( *iface ) | 121 | if ( *iface ) |
120 | (*iface)->addRef(); | 122 | (*iface)->addRef(); |
121 | return QS_OK; | 123 | return QS_OK; |
122 | } | 124 | } |
123 | 125 | ||
124 | Q_EXPORT_INTERFACE() | 126 | Q_EXPORT_INTERFACE() |
125 | { | 127 | { |
126 | Q_CREATE_INSTANCE( KeyboardImpl ) | 128 | Q_CREATE_INSTANCE( KeyboardImpl ) |
127 | } | 129 | } |
128 | #endif | 130 | #endif |
diff --git a/inputmethods/kjumpx/keyboardimpl.cpp b/inputmethods/kjumpx/keyboardimpl.cpp index 976d816..54fe36e 100644 --- a/inputmethods/kjumpx/keyboardimpl.cpp +++ b/inputmethods/kjumpx/keyboardimpl.cpp | |||
@@ -1,97 +1,99 @@ | |||
1 | /**************************************************************************************94x78** | 1 | /**************************************************************************************94x78** |
2 | ** | 2 | ** |
3 | ** This file may be distributed and/or modified under the terms of the | 3 | ** This file may be distributed and/or modified under the terms of the |
4 | ** GNU General Public License version 2 as published by the Free Software | 4 | ** GNU General Public License version 2 as published by the Free Software |
5 | ** Foundation and appearing in the file LICENSE.GPL included in the | 5 | ** Foundation and appearing in the file LICENSE.GPL included in the |
6 | ** packaging of this file. | 6 | ** packaging of this file. |
7 | ** | 7 | ** |
8 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 8 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
9 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 9 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
10 | ** | 10 | ** |
11 | *********************************************************************************************/ | 11 | *********************************************************************************************/ |
12 | #include <qapplication.h> | 12 | #include <qapplication.h> |
13 | #include <qpixmap.h> | 13 | #include <qpixmap.h> |
14 | #include "keyboard.h" | 14 | #include "keyboard.h" |
15 | #include "keyboardimpl.h" | 15 | #include "keyboardimpl.h" |
16 | 16 | ||
17 | /* XPM */ | 17 | /* XPM */ |
18 | static const char * const icon_xpm[] = { | 18 | static const char * const icon_xpm[] = { |
19 | "26 13 2 1", | 19 | "26 13 2 1", |
20 | " c None", | 20 | " c None", |
21 | ".c #000000", | 21 | ".c #000000", |
22 | " ... ... ... ... ... ... ", | 22 | " ... ... ... ... ... ... ", |
23 | ". . . . . ", | 23 | ". . . . . ", |
24 | ". . ... .. . . ", | 24 | ". . ... .. . . ", |
25 | ". . .. . . ", | 25 | ". . .. . . ", |
26 | " ...... ...... ... .... ", | 26 | " ...... ...... ... .... ", |
27 | ". .. .. .. . ", | 27 | ". .. .. .. . ", |
28 | ". .. .. .. . ", | 28 | ". .. .. .. . ", |
29 | ". ... .. . ", | 29 | ". ... .. . ", |
30 | " ...... .. ...... ", | 30 | " ...... .. ...... ", |
31 | ". . .. . . ", | 31 | ". . .. . . ", |
32 | ". . ....... . . ", | 32 | ". . ....... . . ", |
33 | ". . . . . ", | 33 | ". . . . . ", |
34 | " ... ... ... ... ... ... "}; | 34 | " ... ... ... ... ... ... "}; |
35 | 35 | ||
36 | 36 | ||
37 | KeyboardImpl::KeyboardImpl() | 37 | KeyboardImpl::KeyboardImpl() |
38 | : input(0), icn(0), ref(0) | 38 | : input(0), icn(0), ref(0) |
39 | { | 39 | { |
40 | } | 40 | } |
41 | 41 | ||
42 | KeyboardImpl::~KeyboardImpl() | 42 | KeyboardImpl::~KeyboardImpl() |
43 | { | 43 | { |
44 | delete input; | 44 | delete input; |
45 | delete icn; | 45 | delete icn; |
46 | } | 46 | } |
47 | 47 | ||
48 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 48 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
49 | { | 49 | { |
50 | if ( !input ) | 50 | if ( !input ) |
51 | input = new KJumpX::Keyboard( parent, "Keyboard", f ); | 51 | input = new KJumpX::Keyboard( parent, "Keyboard", f ); |
52 | return input; | 52 | return input; |
53 | } | 53 | } |
54 | 54 | ||
55 | void KeyboardImpl::resetState() | 55 | void KeyboardImpl::resetState() |
56 | { | 56 | { |
57 | if ( input ) | 57 | if ( input ) |
58 | input->resetState(); | 58 | input->resetState(); |
59 | } | 59 | } |
60 | 60 | ||
61 | QPixmap *KeyboardImpl::icon() | 61 | QPixmap *KeyboardImpl::icon() |
62 | { | 62 | { |
63 | if ( !icn ) | 63 | if ( !icn ) |
64 | icn = new QPixmap( (const char **)icon_xpm ); | 64 | icn = new QPixmap( (const char **)icon_xpm ); |
65 | return icn; | 65 | return icn; |
66 | } | 66 | } |
67 | 67 | ||
68 | QString KeyboardImpl::name() | 68 | QString KeyboardImpl::name() |
69 | { | 69 | { |
70 | return qApp->translate( "InputMethods", "KJumpX" ); | 70 | return qApp->translate( "InputMethods", "KJumpX" ); |
71 | } | 71 | } |
72 | 72 | ||
73 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) | 73 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) |
74 | { | 74 | { |
75 | if ( input ) | 75 | if ( input ) |
76 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 76 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
77 | } | 77 | } |
78 | 78 | ||
79 | #ifndef QT_NO_COMPONENT | 79 | #ifndef QT_NO_COMPONENT |
80 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 80 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
81 | { | 81 | { |
82 | *iface = 0; | 82 | *iface = 0; |
83 | if ( uuid == IID_QUnknown ) | 83 | if ( uuid == IID_QUnknown ) |
84 | *iface = this; | 84 | *iface = this; |
85 | else if ( uuid == IID_InputMethod ) | 85 | else if ( uuid == IID_InputMethod ) |
86 | *iface = this; | 86 | *iface = this; |
87 | else | ||
88 | return QS_FALSE; | ||
87 | 89 | ||
88 | if ( *iface ) | 90 | if ( *iface ) |
89 | (*iface)->addRef(); | 91 | (*iface)->addRef(); |
90 | return QS_OK; | 92 | return QS_OK; |
91 | } | 93 | } |
92 | 94 | ||
93 | Q_EXPORT_INTERFACE() | 95 | Q_EXPORT_INTERFACE() |
94 | { | 96 | { |
95 | Q_CREATE_INSTANCE( KeyboardImpl ) | 97 | Q_CREATE_INSTANCE( KeyboardImpl ) |
96 | } | 98 | } |
97 | #endif | 99 | #endif |
diff --git a/inputmethods/multikey/keyboardimpl.cpp b/inputmethods/multikey/keyboardimpl.cpp index 4cfbcd5..b7908d9 100644 --- a/inputmethods/multikey/keyboardimpl.cpp +++ b/inputmethods/multikey/keyboardimpl.cpp | |||
@@ -1,107 +1,109 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 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 | 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 | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qapplication.h> | 20 | #include <qapplication.h> |
21 | #include <qpixmap.h> | 21 | #include <qpixmap.h> |
22 | #include "keyboard.h" | 22 | #include "keyboard.h" |
23 | #include "keyboardimpl.h" | 23 | #include "keyboardimpl.h" |
24 | 24 | ||
25 | /* XPM */ | 25 | /* XPM */ |
26 | static const char * const kb_xpm[] = { | 26 | static const char * const kb_xpm[] = { |
27 | "28 13 4 1", | 27 | "28 13 4 1", |
28 | " c None", | 28 | " c None", |
29 | ". c #4C4C4C", | 29 | ". c #4C4C4C", |
30 | "+ c #FFF7DD", | 30 | "+ c #FFF7DD", |
31 | "@ c #D6CFBA", | 31 | "@ c #D6CFBA", |
32 | " .......................... ", | 32 | " .......................... ", |
33 | " .+++.+++.+++.+++.+++.++++. ", | 33 | " .+++.+++.+++.+++.+++.++++. ", |
34 | " .+@@.+@@.+@@.+@@.+@@.+@@@. ", | 34 | " .+@@.+@@.+@@.+@@.+@@.+@@@. ", |
35 | " .......................... ", | 35 | " .......................... ", |
36 | " .+++++.+++.+++.+++.++++++. ", | 36 | " .+++++.+++.+++.+++.++++++. ", |
37 | " .+@@@@.+@@.+@@.+@@.+@@@@@. ", | 37 | " .+@@@@.+@@.+@@.+@@.+@@@@@. ", |
38 | " .......................... ", | 38 | " .......................... ", |
39 | " .++++++.+++.+++.+++.+++++. ", | 39 | " .++++++.+++.+++.+++.+++++. ", |
40 | " .+@@@@@.+@@.+@@.+@@.+@@@@. ", | 40 | " .+@@@@@.+@@.+@@.+@@.+@@@@. ", |
41 | " .......................... ", | 41 | " .......................... ", |
42 | " .++++.++++++++++++++.++++. ", | 42 | " .++++.++++++++++++++.++++. ", |
43 | " .+@@@.+@@@@@@@@@@@@@.+@@@. ", | 43 | " .+@@@.+@@@@@@@@@@@@@.+@@@. ", |
44 | " .......................... "}; | 44 | " .......................... "}; |
45 | 45 | ||
46 | 46 | ||
47 | KeyboardImpl::KeyboardImpl() | 47 | KeyboardImpl::KeyboardImpl() |
48 | : input(0), icn(0), ref(0) | 48 | : input(0), icn(0), ref(0) |
49 | { | 49 | { |
50 | } | 50 | } |
51 | 51 | ||
52 | KeyboardImpl::~KeyboardImpl() | 52 | KeyboardImpl::~KeyboardImpl() |
53 | { | 53 | { |
54 | delete input; | 54 | delete input; |
55 | delete icn; | 55 | delete icn; |
56 | } | 56 | } |
57 | 57 | ||
58 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 58 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
59 | { | 59 | { |
60 | if ( !input ) | 60 | if ( !input ) |
61 | input = new MultiKey::Keyboard( parent, "Keyboard", f ); | 61 | input = new MultiKey::Keyboard( parent, "Keyboard", f ); |
62 | return input; | 62 | return input; |
63 | } | 63 | } |
64 | 64 | ||
65 | void KeyboardImpl::resetState() | 65 | void KeyboardImpl::resetState() |
66 | { | 66 | { |
67 | if ( input ) | 67 | if ( input ) |
68 | input->resetState(); | 68 | input->resetState(); |
69 | } | 69 | } |
70 | 70 | ||
71 | QPixmap *KeyboardImpl::icon() | 71 | QPixmap *KeyboardImpl::icon() |
72 | { | 72 | { |
73 | if ( !icn ) | 73 | if ( !icn ) |
74 | icn = new QPixmap( (const char **)kb_xpm ); | 74 | icn = new QPixmap( (const char **)kb_xpm ); |
75 | return icn; | 75 | return icn; |
76 | } | 76 | } |
77 | 77 | ||
78 | QString KeyboardImpl::name() | 78 | QString KeyboardImpl::name() |
79 | { | 79 | { |
80 | return qApp->translate( "InputMethods", "Multikey" ); | 80 | return qApp->translate( "InputMethods", "Multikey" ); |
81 | } | 81 | } |
82 | 82 | ||
83 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) | 83 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) |
84 | { | 84 | { |
85 | if ( input ) | 85 | if ( input ) |
86 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 86 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
87 | } | 87 | } |
88 | 88 | ||
89 | #ifndef QT_NO_COMPONENT | 89 | #ifndef QT_NO_COMPONENT |
90 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 90 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
91 | { | 91 | { |
92 | *iface = 0; | 92 | *iface = 0; |
93 | if ( uuid == IID_QUnknown ) | 93 | if ( uuid == IID_QUnknown ) |
94 | *iface = this; | 94 | *iface = this; |
95 | else if ( uuid == IID_InputMethod ) | 95 | else if ( uuid == IID_InputMethod ) |
96 | *iface = this; | 96 | *iface = this; |
97 | else | ||
98 | return QS_FALSE; | ||
97 | 99 | ||
98 | if ( *iface ) | 100 | if ( *iface ) |
99 | (*iface)->addRef(); | 101 | (*iface)->addRef(); |
100 | return QS_OK; | 102 | return QS_OK; |
101 | } | 103 | } |
102 | 104 | ||
103 | Q_EXPORT_INTERFACE() | 105 | Q_EXPORT_INTERFACE() |
104 | { | 106 | { |
105 | Q_CREATE_INSTANCE( KeyboardImpl ) | 107 | Q_CREATE_INSTANCE( KeyboardImpl ) |
106 | } | 108 | } |
107 | #endif | 109 | #endif |
diff --git a/inputmethods/pickboard/pickboardimpl.cpp b/inputmethods/pickboard/pickboardimpl.cpp index a4e8f02..8f449cd 100644 --- a/inputmethods/pickboard/pickboardimpl.cpp +++ b/inputmethods/pickboard/pickboardimpl.cpp | |||
@@ -1,101 +1,103 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 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 | 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 | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qapplication.h> | 20 | #include <qapplication.h> |
21 | #include <qobject.h> | 21 | #include <qobject.h> |
22 | #include <qpixmap.h> | 22 | #include <qpixmap.h> |
23 | #include "pickboard.h" | 23 | #include "pickboard.h" |
24 | #include "pickboardimpl.h" | 24 | #include "pickboardimpl.h" |
25 | 25 | ||
26 | /* XPM */ | 26 | /* XPM */ |
27 | static const char * pb_xpm[]={ | 27 | static const char * pb_xpm[]={ |
28 | "28 7 2 1", | 28 | "28 7 2 1", |
29 | "# c #303030", | 29 | "# c #303030", |
30 | " c None", | 30 | " c None", |
31 | " ########################## ", | 31 | " ########################## ", |
32 | " # # # # # # # ", | 32 | " # # # # # # # ", |
33 | " # # # # # # # ", | 33 | " # # # # # # # ", |
34 | " ########################## ", | 34 | " ########################## ", |
35 | " # # # # # # ", | 35 | " # # # # # # ", |
36 | " # # # # # # ", | 36 | " # # # # # # ", |
37 | " ########################## "}; | 37 | " ########################## "}; |
38 | 38 | ||
39 | 39 | ||
40 | PickboardImpl::PickboardImpl() | 40 | PickboardImpl::PickboardImpl() |
41 | : pickboard(0), icn(0), ref(0) | 41 | : pickboard(0), icn(0), ref(0) |
42 | { | 42 | { |
43 | } | 43 | } |
44 | 44 | ||
45 | PickboardImpl::~PickboardImpl() | 45 | PickboardImpl::~PickboardImpl() |
46 | { | 46 | { |
47 | delete pickboard; | 47 | delete pickboard; |
48 | delete icn; | 48 | delete icn; |
49 | } | 49 | } |
50 | 50 | ||
51 | QWidget *PickboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 51 | QWidget *PickboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
52 | { | 52 | { |
53 | if ( !pickboard ) | 53 | if ( !pickboard ) |
54 | pickboard = new Pickboard( parent, "pickboard", f ); | 54 | pickboard = new Pickboard( parent, "pickboard", f ); |
55 | return pickboard; | 55 | return pickboard; |
56 | } | 56 | } |
57 | 57 | ||
58 | void PickboardImpl::resetState() | 58 | void PickboardImpl::resetState() |
59 | { | 59 | { |
60 | if ( pickboard ) | 60 | if ( pickboard ) |
61 | pickboard->resetState(); | 61 | pickboard->resetState(); |
62 | } | 62 | } |
63 | 63 | ||
64 | QPixmap *PickboardImpl::icon() | 64 | QPixmap *PickboardImpl::icon() |
65 | { | 65 | { |
66 | if ( !icn ) | 66 | if ( !icn ) |
67 | icn = new QPixmap( (const char **)pb_xpm ); | 67 | icn = new QPixmap( (const char **)pb_xpm ); |
68 | return icn; | 68 | return icn; |
69 | } | 69 | } |
70 | 70 | ||
71 | QString PickboardImpl::name() | 71 | QString PickboardImpl::name() |
72 | { | 72 | { |
73 | return qApp->translate( "InputMethods", "Pickboard" ); | 73 | return qApp->translate( "InputMethods", "Pickboard" ); |
74 | } | 74 | } |
75 | 75 | ||
76 | void PickboardImpl::onKeyPress( QObject *receiver, const char *slot ) | 76 | void PickboardImpl::onKeyPress( QObject *receiver, const char *slot ) |
77 | { | 77 | { |
78 | if ( pickboard ) | 78 | if ( pickboard ) |
79 | QObject::connect( pickboard, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 79 | QObject::connect( pickboard, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
80 | } | 80 | } |
81 | 81 | ||
82 | #ifndef QT_NO_COMPONENT | 82 | #ifndef QT_NO_COMPONENT |
83 | QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 83 | QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
84 | { | 84 | { |
85 | *iface = 0; | 85 | *iface = 0; |
86 | if ( uuid == IID_QUnknown ) | 86 | if ( uuid == IID_QUnknown ) |
87 | *iface = this; | 87 | *iface = this; |
88 | else if ( uuid == IID_InputMethod ) | 88 | else if ( uuid == IID_InputMethod ) |
89 | *iface = this; | 89 | *iface = this; |
90 | else | ||
91 | return QS_FALSE; | ||
90 | 92 | ||
91 | if ( *iface ) | 93 | if ( *iface ) |
92 | (*iface)->addRef(); | 94 | (*iface)->addRef(); |
93 | return QS_OK; | 95 | return QS_OK; |
94 | } | 96 | } |
95 | 97 | ||
96 | Q_EXPORT_INTERFACE() | 98 | Q_EXPORT_INTERFACE() |
97 | { | 99 | { |
98 | Q_CREATE_INSTANCE( PickboardImpl ) | 100 | Q_CREATE_INSTANCE( PickboardImpl ) |
99 | } | 101 | } |
100 | #endif | 102 | #endif |
101 | 103 | ||
diff --git a/inputmethods/unikeyboard/unikeyboardimpl.cpp b/inputmethods/unikeyboard/unikeyboardimpl.cpp index fe601e0..e7fc00e 100644 --- a/inputmethods/unikeyboard/unikeyboardimpl.cpp +++ b/inputmethods/unikeyboard/unikeyboardimpl.cpp | |||
@@ -1,105 +1,107 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 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 | 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 | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qapplication.h> | 20 | #include <qapplication.h> |
21 | #include <qobject.h> | 21 | #include <qobject.h> |
22 | #include <qpixmap.h> | 22 | #include <qpixmap.h> |
23 | #include "unikeyboard.h" | 23 | #include "unikeyboard.h" |
24 | #include "unikeyboardimpl.h" | 24 | #include "unikeyboardimpl.h" |
25 | 25 | ||
26 | /* XPM */ | 26 | /* XPM */ |
27 | static const char * uni_xpm[]={ | 27 | static const char * uni_xpm[]={ |
28 | "28 13 2 1", | 28 | "28 13 2 1", |
29 | "# c #000000", | 29 | "# c #000000", |
30 | ". c None", | 30 | ". c None", |
31 | "............................", | 31 | "............................", |
32 | "...####....#####.....####...", | 32 | "...####....#####.....####...", |
33 | "...####....######....####...", | 33 | "...####....######....####...", |
34 | "...####....#######..........", | 34 | "...####....#######..........", |
35 | "...####....########..####...", | 35 | "...####....########..####...", |
36 | "...####....####.####.####...", | 36 | "...####....####.####.####...", |
37 | "...####....####..########...", | 37 | "...####....####..########...", |
38 | "...####....####...#######...", | 38 | "...####....####...#######...", |
39 | "...####....####....######...", | 39 | "...####....####....######...", |
40 | "...#####..#####.....#####...", | 40 | "...#####..#####.....#####...", |
41 | "....##########.......####...", | 41 | "....##########.......####...", |
42 | "......######..........###...", | 42 | "......######..........###...", |
43 | "............................"}; | 43 | "............................"}; |
44 | 44 | ||
45 | UniKeyboardImpl::UniKeyboardImpl() | 45 | UniKeyboardImpl::UniKeyboardImpl() |
46 | : input(0), icn(0), ref(0) | 46 | : input(0), icn(0), ref(0) |
47 | { | 47 | { |
48 | } | 48 | } |
49 | 49 | ||
50 | UniKeyboardImpl::~UniKeyboardImpl() | 50 | UniKeyboardImpl::~UniKeyboardImpl() |
51 | { | 51 | { |
52 | delete input; | 52 | delete input; |
53 | delete icn; | 53 | delete icn; |
54 | } | 54 | } |
55 | 55 | ||
56 | QWidget *UniKeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 56 | QWidget *UniKeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
57 | { | 57 | { |
58 | if ( !input ) | 58 | if ( !input ) |
59 | input = new UniKeyboard( parent, "UniKeyboard", f ); | 59 | input = new UniKeyboard( parent, "UniKeyboard", f ); |
60 | return input; | 60 | return input; |
61 | } | 61 | } |
62 | 62 | ||
63 | void UniKeyboardImpl::resetState() | 63 | void UniKeyboardImpl::resetState() |
64 | { | 64 | { |
65 | if ( input ) | 65 | if ( input ) |
66 | input->resetState(); | 66 | input->resetState(); |
67 | } | 67 | } |
68 | 68 | ||
69 | QPixmap *UniKeyboardImpl::icon() | 69 | QPixmap *UniKeyboardImpl::icon() |
70 | { | 70 | { |
71 | if ( !icn ) | 71 | if ( !icn ) |
72 | icn = new QPixmap( (const char **)uni_xpm ); | 72 | icn = new QPixmap( (const char **)uni_xpm ); |
73 | return icn; | 73 | return icn; |
74 | } | 74 | } |
75 | 75 | ||
76 | QString UniKeyboardImpl::name() | 76 | QString UniKeyboardImpl::name() |
77 | { | 77 | { |
78 | return qApp->translate( "InputMethods", "Unicode" ); | 78 | return qApp->translate( "InputMethods", "Unicode" ); |
79 | } | 79 | } |
80 | 80 | ||
81 | void UniKeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) | 81 | void UniKeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) |
82 | { | 82 | { |
83 | if ( input ) | 83 | if ( input ) |
84 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 84 | QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
85 | } | 85 | } |
86 | 86 | ||
87 | QRESULT UniKeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 87 | QRESULT UniKeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
88 | { | 88 | { |
89 | *iface = 0; | 89 | *iface = 0; |
90 | if ( uuid == IID_QUnknown ) | 90 | if ( uuid == IID_QUnknown ) |
91 | *iface = this; | 91 | *iface = this; |
92 | else if ( uuid == IID_InputMethod ) | 92 | else if ( uuid == IID_InputMethod ) |
93 | *iface = this; | 93 | *iface = this; |
94 | else | ||
95 | return QS_FALSE; | ||
94 | 96 | ||
95 | if ( *iface ) | 97 | if ( *iface ) |
96 | (*iface)->addRef(); | 98 | (*iface)->addRef(); |
97 | return QS_OK; | 99 | return QS_OK; |
98 | } | 100 | } |
99 | 101 | ||
100 | Q_EXPORT_INTERFACE() | 102 | Q_EXPORT_INTERFACE() |
101 | { | 103 | { |
102 | Q_CREATE_INSTANCE( UniKeyboardImpl ) | 104 | Q_CREATE_INSTANCE( UniKeyboardImpl ) |
103 | } | 105 | } |
104 | 106 | ||
105 | 107 | ||