Diffstat (limited to 'development/keyview/keyboardimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | development/keyview/keyboardimpl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/development/keyview/keyboardimpl.cpp b/development/keyview/keyboardimpl.cpp index 673eaa5..0216110 100644 --- a/development/keyview/keyboardimpl.cpp +++ b/development/keyview/keyboardimpl.cpp | |||
@@ -119,71 +119,75 @@ static const char * kb_xpm[] = { | |||
119 | "i|56c|56c|56.@#.--pqrstuvwxy", | 119 | "i|56c|56c|56.@#.--pqrstuvwxy", |
120 | "i169c169c16.@#.--zAqrBCDEFGH", | 120 | "i169c169c16.@#.--zAqrBCDEFGH", |
121 | "82700ccc0cj...--IzAqrJKLMNOP"}; | 121 | "82700ccc0cj...--IzAqrJKLMNOP"}; |
122 | 122 | ||
123 | 123 | ||
124 | 124 | ||
125 | 125 | ||
126 | KeyboardImpl::KeyboardImpl() | 126 | KeyboardImpl::KeyboardImpl() |
127 | : input(0), icn(0), ref(0) | 127 | : input(0), icn(0), ref(0) |
128 | { | 128 | { |
129 | } | 129 | } |
130 | 130 | ||
131 | KeyboardImpl::~KeyboardImpl() | 131 | KeyboardImpl::~KeyboardImpl() |
132 | { | 132 | { |
133 | delete input; | 133 | delete input; |
134 | delete icn; | 134 | delete icn; |
135 | } | 135 | } |
136 | 136 | ||
137 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 137 | QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
138 | { | 138 | { |
139 | if ( !input ) | 139 | if ( !input ) |
140 | input = new Keyview( parent, "Keyview", f ); | 140 | input = new Keyview( parent, "Keyview", f ); |
141 | return input; | 141 | return input; |
142 | } | 142 | } |
143 | 143 | ||
144 | void KeyboardImpl::resetState() | 144 | void KeyboardImpl::resetState() |
145 | { | 145 | { |
146 | /* | 146 | /* |
147 | if ( input ) | 147 | if ( input ) |
148 | input->resetState(); | 148 | input->resetState(); |
149 | */ | 149 | */ |
150 | } | 150 | } |
151 | 151 | ||
152 | QPixmap *KeyboardImpl::icon() | 152 | QPixmap *KeyboardImpl::icon() |
153 | { | 153 | { |
154 | if ( !icn ) | 154 | if ( !icn ) |
155 | icn = new QPixmap( (const char **)kb_xpm ); | 155 | icn = new QPixmap( (const char **)kb_xpm ); |
156 | return icn; | 156 | return icn; |
157 | } | 157 | } |
158 | 158 | ||
159 | QString KeyboardImpl::name() | 159 | QString KeyboardImpl::name() |
160 | { | 160 | { |
161 | // return qApp->translate( "InputMethods", "Keyboard" ); | 161 | // return qApp->translate( "InputMethods", "Keyboard" ); |
162 | return "Keyview"; | 162 | return "Keyview"; |
163 | } | 163 | } |
164 | 164 | ||
165 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) | 165 | void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) |
166 | { | 166 | { |
167 | Q_UNUSED( receiver ); | ||
168 | Q_CONST_UNUSED( slot ); | ||
167 | //if ( input ) | 169 | //if ( input ) |
168 | //QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 170 | //QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
169 | } | 171 | } |
170 | 172 | ||
171 | #ifndef QT_NO_COMPONENT | 173 | #ifndef QT_NO_COMPONENT |
172 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 174 | QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
173 | { | 175 | { |
174 | *iface = 0; | 176 | *iface = 0; |
175 | if ( uuid == IID_QUnknown ) | 177 | if ( uuid == IID_QUnknown ) |
176 | *iface = this; | 178 | *iface = this; |
177 | else if ( uuid == IID_InputMethod ) | 179 | else if ( uuid == IID_InputMethod ) |
178 | *iface = this; | 180 | *iface = this; |
181 | else | ||
182 | return QS_FALSE; | ||
179 | 183 | ||
180 | if ( *iface ) | 184 | if ( *iface ) |
181 | (*iface)->addRef(); | 185 | (*iface)->addRef(); |
182 | return QS_OK; | 186 | return QS_OK; |
183 | } | 187 | } |
184 | 188 | ||
185 | Q_EXPORT_INTERFACE() | 189 | Q_EXPORT_INTERFACE() |
186 | { | 190 | { |
187 | Q_CREATE_INSTANCE( KeyboardImpl ) | 191 | Q_CREATE_INSTANCE( KeyboardImpl ) |
188 | } | 192 | } |
189 | #endif | 193 | #endif |