×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    78

    How can I solve if device is touch enabled?

    hei

    Nokia phones have touchscreen or not.
    How to ask if device is touch enabled?

    I know it's somewhere and simple..

    Hannu

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How can I solve if device is touch enabled?

    From Qt point of view it should make no difference if device have touchscreen or not. Could you tell us more about use case?

  3. #3
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    78

    Re: How can I solve if device is touch enabled?

    Hey

    I have navigation program which uses toolbars and buttons. One funtion is pointer that shows interesting point on map.

    How to use toolbar and buttons?
    How to move cursor/pointer?

    Hannu

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How can I solve if device is touch enabled?

    Quote Originally Posted by salesh View Post
    How to use toolbar and buttons?
    What could be problem with that?
    Quote Originally Posted by salesh View Post
    How to move cursor/pointer?
    Probably the question is how user controls cursor/pointer? Then the answer is trough mousePressEvent, mouseMoveEvent and mouseReleaseEvent.

  5. #5
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: How can I solve if device is touch enabled?

    Quote Originally Posted by divanov View Post
    From Qt point of view it should make no difference if device have touchscreen or not. Could you tell us more about use case?
    Certainly it's reasonable for an application to change its presentation depending on whether touch is enabled or not. Not true that "it should make no difference".

    But to answer the OP's question (sort of), I suspect you have to drop into Symbian C++ (or whatever language your phone uses) to test this.

  6. #6
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    78

    Re: How can I solve if device is touch enabled?

    Quote Originally Posted by divanov View Post
    What could be problem with that?

    Probably the question is how user controls cursor/pointer? Then the answer is trough mousePressEvent, mouseMoveEvent and mouseReleaseEvent.
    No mouse? device is 6210.
    With touch N97/5800/N8

    Here is Win32 version: http://www.taskuloisto.fi/ohjeet/TLreitti.htm
    This is from old native version: http://www.hannusales.fi/uusiloisto/Flash/Nok5800.htm

    Hannu

  7. #7
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How can I solve if device is touch enabled?

    Quote Originally Posted by danhicksbyron View Post
    Certainly it's reasonable for an application to change its presentation depending on whether touch is enabled or not.
    And what could be those changes in presentation?

  8. #8
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How can I solve if device is touch enabled?

    Quote Originally Posted by salesh View Post
    No mouse? device is 6210.
    With touch N97/5800/N8
    Mouse events are produced for all kind of devices disregarding of mouse presence.

  9. #9
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327

    Re: How can I solve if device is touch enabled?

    QtMobility has a function for that:

    Code:
             #include <qsysteminfo.h>
            QSystemInfo* systemInfo = new QSystemInfo();
    
            QSystemDeviceInfo::InputMethodFlags methods = systemInfo->inputMethodType();
            QStringList inputs;
            if((methods & QSystemDeviceInfo::Keys)){
                inputs << "Keys";
            }
            if((methods & QSystemDeviceInfo::Keypad)) {
                inputs << "Keypad";
            }
            if((methods & QSystemDeviceInfo::Keyboard)) {
                inputs << "Keyboard";
            }
            if((methods & QSystemDeviceInfo::SingleTouch)) {
                inputs << "Touch Screen";
            }
            if((methods & QSystemDeviceInfo::MultiTouch)) {
                inputs << "Multi touch";
            }
            if((methods & QSystemDeviceInfo::Mouse)){
                inputs << "Mouse";
            }
    Check out http://doc.qt.nokia.com/qtmobility-1...eviceinfo.html for details

  10. #10
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    78

    Re: How can I solve if device is touch enabled?

    Quote Originally Posted by achipa View Post
    QtMobility has a function for that:

    ........

    Check out http://doc.qt.nokia.com/qtmobility-1...eviceinfo.html for details
    Thank's

    This was just that I asked.

    Hannu

  11. #11
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    78

    Re: How can I solve if device is touch enabled?

    Quote Originally Posted by divanov View Post
    Mouse events are produced for all kind of devices disregarding of mouse presence.
    So the scribble sample (http://doc.trolltech.com/4.6/widgets-scribble.html) should work on 6210 or N95 without any modifications.
    It would be very nice to have keyboard mouse like in some web-browsers. This is in wish list!

    Hannu

  12. #12
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How can I solve if device is touch enabled?

    Quote Originally Posted by salesh View Post
    So the scribble sample (http://doc.trolltech.com/4.6/widgets-scribble.html) should work on 6210 or N95 without any modifications.
    Yes, it should and it works on my N900.
    Quote Originally Posted by salesh View Post
    It would be very nice to have keyboard mouse like in some web-browsers. This is in wish list!
    This is not impossible, but S60 browsers have keyboard mouse and they have poor usability, while Maemo browser doesn't have and it has nice usability. Cursor pointer doesn't really fit well into touch UI paradigm.

  13. #13
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    78

    Re: How can I solve if device is touch enabled?

    Quote Originally Posted by achipa View Post
    QtMobility has a function for that:

    Code:
             #include <QSystemDeviceInfo>
            QSystemDeviceInfo* systemInfo = new QSystemDeviceInfo();
    
            QSystemDeviceInfo::InputMethodFlags methods = systemInfo->inputMethodType();
    Check out http://doc.qt.nokia.com/qtmobility-1...eviceinfo.html for details
    And code is corrected above.

    Hannu

Similar Threads

  1. Who can help to solve reboot device function
    By sd_liuwei in forum Symbian
    Replies: 4
    Last Post: 2010-03-10, 09:57
  2. Full screen support for touch enabled MIDlet
    By forceoflight in forum Mobile Java General
    Replies: 6
    Last Post: 2009-12-14, 08:53
  3. Replies: 3
    Last Post: 2008-08-25, 12:56
  4. Replies: 7
    Last Post: 2007-03-02, 11:48

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×