IR remote controller support of embedded Qt
-
wrote on 23 Aug 2011, 10:50 last edited by
Hi all:
So far as I've known, embedded Qt doesn't support IR remote controller, so how
can my GUI response a IR remote controller? After studying, I've following candidate
methods:- Following Qt's event-handling infrastructure which, say mouse, uses QMouseDriverFactory/
QMouseDriverPlugin/QxxMouseHandler family to load driver and QEventLoop::processEvents()
in server application's main() to monitor corresponding event device file, I should write
my own factory/plugin/handler family for IR from the beginning(I say from the beginning because
it doesn't seem to have any class I can inherit), even relative mechanisms to send
a new kind of event class about IR, say QIREvent.
The defect is that Qt must be rebuilt. - Treat IR like keyboard, so only the plugin driver, like QxxMouseHandler mentioned above, needs
to be implemented and added to QKbdDriverFactory. The plugin driver's major job is to map IR
keys to some standard keyboard keys, and the rest is Qt's business. And GUI also needs to know the
key mapping rule to response correctly.
The defect is that there's problem when GUI also uses keyboard as input.
Do you have any better idea?
- Following Qt's event-handling infrastructure which, say mouse, uses QMouseDriverFactory/
-
wrote on 24 Aug 2011, 02:16 last edited by
Hi all:
So far as I've known, embedded Qt doesn't support IR remote controller, so how can my GUI response a IR remote controller? After studying, I've following candidate methods:-
Following Qt's event-handling infrastructure which, say mouse, uses QMouseDriverFactory/QMouseDriverPlugin/QxxMouseHandler family to load driver and QEventLoop::processEvents() in server application's main() to monitor corresponding event device file, I should write my own factory/plugin/handler family for IR from the beginning(I say from the beginning because it doesn't seem to have any class I can inherit), and even relative mechanisms to send a new kind of event class about IR, say QIREvent.The defect is that Qt must be rebuilt.
-
Treat IR like keyboard, so only the plugin driver, like QxxMouseHandler mentioned above, needs to be implemented and added to QKbdDriverFactory. The plugin driver's major job is to map IR keys to some standard keyboard keys. And GUI also needs to know the key mapping rule to response correctly. The defect is that there's problem when GUI also uses keyboard as input.
Do you have any better idea?
-
-
wrote on 24 Aug 2011, 05:25 last edited by
I have merged your two topics into one. Please don't double post.
-
wrote on 24 Aug 2011, 11:43 last edited by
Why not just implement a custom event that is send to the appropriate objects?
-
wrote on 30 Aug 2011, 18:21 last edited by
I am working with DM365 board IR Remote control key mapping with Qt Key event. I could not achieve as a generic Keyboard event for all my screen using sending custom event. Could you please any one suggest me to achieve as a generic key event for whole application?
1/5