Results 1 to 2 of 2

Thread: IR remote controller support of embedded Qt

  1. #1

    Default IR remote controller support of embedded Qt

    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:

    1. 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.

    2. 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?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: IR remote controller support of embedded Qt

    You are over complicating things.
    Qt can not, and is not meant to, support every possible peripheral device.
    But it DOES accommodate classes that can be used to build such support in to Qt applications.
    Most notable is QIODevice.
    It could be that Mobility might have even more specific classes I don't know as I am not mobility user, but you can check.
    You need to have a lib, or code, that can operate your IR device.
    Once you have that, it is trivial to map the IR "events" to Qt events of your choosing.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. IR remote Connect Mouse Qt embedded ?
    By Thành Viên Mới in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 17th February 2011, 06:41
  2. Support for tslib in Qt3 Embedded
    By Vortex in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 19th February 2010, 10:41
  3. Does Qt Embedded support PNG
    By hybrid_snyper in forum Newbie
    Replies: 3
    Last Post: 23rd October 2009, 08:53
  4. remote control support on Qt4.4 & Qt embedded.
    By punit.doshi.85 in forum Qt Programming
    Replies: 1
    Last Post: 1st August 2008, 20:08
  5. regarding qt/embedded support in MontaVista linux
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 6th February 2007, 12:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.