Results 1 to 12 of 12

Thread: Making a KeyBoard into LCD connected with the ARM board.how can i ?

  1. #1
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Making a KeyBoard into LCD connected with the ARM board.how can i ?

    hi all,

    I am a newbie to the Qt programming.And i have an TouchScreen LCD connected with the ARM controller.
    My goal is very simple.I have one QlineEdit(assume a scrren/form) box into this 7" LCD.

    I want to make a QWERTY Keyboard into this LCD at the bottom side.Now when ever i presses any key,it should display the
    same Key in the the LineEdit box/Form. I mean if i press "1" it should display a 1. Can any one please guide me into this
    creation?

    Thanks to all who helps to the programmer.

  2. #2
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Making a KeyBoard into LCD connected with the ARM board.how can i ?

    hello,

    Please reply me some one with some hints and guidelines so that i can proceed into my work. I am planning to use
    QKeyEvent ,but i dont know how to generate a key (like we generate pushbutton from QPushButton).

    please reply some one.Thanks.

  3. #3
    Join Date
    Mar 2009
    Posts
    72
    Thanks
    7
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Making a KeyBoard into LCD connected with the ARM board.how can i ?

    In your case you can use a lot of existent keyboard widgets and/or input methods.

    You can find them, for example, on qt-apps.org: search for "virtual keyboard".

  4. #4
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Making a KeyBoard into LCD connected with the ARM board.how can i ?

    hi,Thanks for reply.

    Isnt it possible to make my own keypad on LCD window?please let me know the various ways of doing this.

    I am thinking of with QPushButton,but its very lond. i need to implement slots for each and every button.

    i have tried with the QSignalMapper example given in the examples.In that they have used QStringList.I have used six
    keys in that.i.e. A list of Six word as "123456". But when i presses any key,it goes to the single slots.so i cant identify which one is pressed?

    can any one please tell me how can i find a particular key from map() or mapped()?

    Also suggest other ways of builiding keypad or provide the links.please.

    THANK YOU ALL.

  5. #5
    Join Date
    Jul 2008
    Posts
    139
    Thanks
    9
    Thanked 18 Times in 15 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Making a KeyBoard into LCD connected with the ARM board.how can i ?

    hi, I managed to make a basic keyboard on my touchscreen, for WIFI key input. I made an object called 'alphapad', this displays the keyboard and emits a QKeyEvent using QCoreApplication::sendEvent. I have the source, but you will need to find your own images. It is a QGraphicsView with QGraphicItem.


  6. The following user says thank you to QbelcorT for this useful post:

    savaliya_ambani (1st July 2010)

  7. #6
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Making a KeyBoard into LCD connected with the ARM board.how can i ?

    ohhhhhhhh congratulations.

    This is really a nice thing. And will be helpfull to all the developers.

    So,is it that each key is a pushbutton or a key? which base object you have taken for a key widget?I am thinking of taking each key as a pushbutton object. i can imagine only half picture from what you ahve said as far as design is concerned. becasue i dont know much about keyevents and QGraphicsItem.

    Any way please guide me in my development. Thanks again.

    With regards,
    savaliya.

  8. #7
    Join Date
    Jul 2008
    Posts
    139
    Thanks
    9
    Thanked 18 Times in 15 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Making a KeyBoard into LCD connected with the ARM board.how can i ?

    Hi,
    Most of my buttons for the touchscreen are based from an example of Qt code. In the Qt package there is an example under qgraphicsview, called pad navigator. The buttons are using the object roundrectitem.cpp,h. It is a QGraphicsItem. I don't have a way to post the files here. Message me. Here is a snippet, when the button is pressed this slot is called.
    Qt Code:
    1. void AlphaPad::numEntry(QGraphicsItem *item)
    2. {
    3. QVariant count = item->data(QVariant::Int);
    4.  
    5. int keyValue = count.value<int>();
    6. // toggle the alpha characters, repaint the text inthe button
    7. if (keyValue == Qt::Key_CapsLock)
    8. {
    9. m_caseToggle ^= 1;
    10. for ( int y = 0; y < m_height; ++y)
    11. {
    12. for (int x = 0; x < m_width; ++x)
    13. {
    14. RoundRectItem *item = qgraphicsitem_cast<RoundRectItem *>(grid[y][x]);
    15. QString charString;
    16. if (m_caseToggle == true)
    17. charString = itemValue[y][x].toLower();
    18. else
    19. charString = itemValue[y][x].toUpper();
    20. if (itemValue[y][x] != QChar::Null)
    21. item->setText(charString,QFont(ALPHAPADFONT),
    22. QColor(ALPHATEXTCOL),
    23. QRectF(QPointF(ALPHATEXTRECTTL),QPointF(ALPHATEXTRECTBR)));
    24. }
    25.  
    26. }
    27. }
    28.  
    29. QChar keyChar = count.toChar();
    30. QString unicodeval(count.toChar());
    31.  
    32. // for alphabet encoding
    33. // alter the keypress value for lower case
    34. if ((keyValue <= Qt::Key_Z && keyValue >= Qt::Key_A) &&
    35. m_caseToggle == true)
    36. {
    37. keyValue += 0x20; // for lower case
    38. keyChar = keyValue;
    39. unicodeval = keyChar;
    40. }
    41.  
    42. if (recObject)
    43. {
    44. QLineEdit *lineEdit = qobject_cast<QLineEdit *>(recObject);
    45. if(keyValue == Qt::Key_Enter)
    46. {
    47. unicodeval = "d";
    48. if(lineEdit->hasAcceptableInput())
    49. {
    50. emit finished();
    51. hidePad();
    52. }
    53. else
    54. {
    55. lineEdit->undo();
    56. }
    57. }
    58. else if(keyValue == Qt::Key_Backspace)
    59. unicodeval = "08";
    60. else if(keyValue == Qt::Key_CapsLock)
    61. return;
    62.  
    63. QKeyEvent keyPress(QEvent::KeyPress,keyValue,Qt::NoModifier,unicodeval);
    64. QCoreApplication::sendEvent(recObject,&keyPress);
    65. }
    66. if(keyValue == Qt::Key_Enter)
    67. hidePad();
    68.  
    69. qDebug() << "KeyPressed" << unicodeval << keyValue;
    70. }
    To copy to clipboard, switch view to plain text mode 

  9. #8
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Making a KeyBoard into LCD connected with the ARM board.how can i ?

    Ohhh yes, i am seeing that keypad examples in graphicsview.

    can u please send me the source to my mail id,please? My e-mail id id savaliya_ambani@yahoo.co.in

    Actually ,we want to add our icons on each key button. Thats under development.

    i will be very very thankful to yours.

    With regards,
    savaliya

  10. #9
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Making a KeyBoard into LCD connected with the ARM board.how can i ?

    hellow,can u please send me same source file again,as i have lost it from my mail and harddisk.

    please,send on the same is:savaliya_ambani@yahoo.co.in.

    waiting for it.Thanking you.

  11. #10
    Join Date
    Jan 2011
    Posts
    18
    Thanks
    6
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Making a KeyBoard into LCD connected with the ARM board.how can i ?

    Hi,
    I am really new to Qt and also C++, the discussion about creating a virtual keyboard was very interesting but i was not able to understand exactly where to start with building a virtual keyboard. If anyone could explain me, It would be really a big help.

    Thanks,
    regards

  12. #11
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Making a KeyBoard into LCD connected with the ARM board.how can i ?

    You can read about the QSignalMapper and QPushButton. i Hope you will get the Understanding.

  13. #12
    Join Date
    Jan 2011
    Posts
    18
    Thanks
    6
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Making a KeyBoard into LCD connected with the ARM board.how can i ?

    Thank you for the Quick Reply. Today I read about the QSignalMapper the whole day. I am trying to make an example on my own and Hopefully I can get back to you with some more questions.

    Thanks Much,
    Regards,

Similar Threads

  1. single board computer embeddede board, mini2440v2, sky2440v2
    By wujianwen in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 2nd November 2016, 07:29
  2. Is internet connected
    By bunjee in forum Qt Programming
    Replies: 2
    Last Post: 24th November 2009, 21:22
  3. Help with Board Game!
    By drake1983 in forum Newbie
    Replies: 3
    Last Post: 8th July 2007, 03:22
  4. Image for Board
    By AP.Sakkthivel in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 18th April 2006, 09:47

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.