Results 1 to 7 of 7

Thread: Navigation purpose

  1. #1
    Join Date
    Mar 2011
    Posts
    35
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Navigation purpose

    I might be wrong here!!!!!!!!!!
    Is it possible get the co-ordinate value of an image(say for example map) when user click the mouse button on that image....If so ............how?
    I want to perform it on qt gui application
    please provide me some materials to read for this purpose...

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Navigation purpose

    You can easily get the X/Y location of a pixel within an image.

    If you want the geographic coordinates from a picture of a map - no, there's no simple way to do that without knowing the map projection used and the transform between the map projection and the display space. Even then, the mathematics can range from relatively simple to quite complex.

    But the picture itself generally won't be sufficient to get you there.

  3. #3
    Join Date
    Mar 2011
    Posts
    35
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Navigation purpose

    You can easily get the X/Y location of a pixel within an image.
    can I get the pixel value on clicking the mouse...If so how?

  4. #4
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Navigation purpose

    Read the documentation for whatever display framework you are using.

  5. #5
    Join Date
    Mar 2011
    Posts
    35
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Navigation purpose

    what do you mean by documentation of display framework .....please be specific

  6. #6
    Join Date
    Mar 2011
    Posts
    35
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Navigation purpose

    please NEED helping hand in this topic

  7. #7
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Navigation purpose

    If your using a Qt class to display the image then that class will mostly likely inherit QWidget and so will receive mouse movements and mouse buttons like all other widgets, so you can just subclass the object or implement an event listener on it. It really depends on what you want to do, maybe the ideal thing would be to create something like a ImageMap class that inherits from QImage for better encapsulation.

Similar Threads

  1. Replies: 12
    Last Post: 6th October 2009, 10:27
  2. How to make a general purpose storage class?
    By khikho in forum Qt Programming
    Replies: 1
    Last Post: 3rd February 2009, 23:16
  3. Navigation bar similar to Dolphin
    By dentharg in forum Qt Programming
    Replies: 1
    Last Post: 12th January 2009, 13:25
  4. GraphicsScene navigation widget
    By EricTheFruitbat in forum Qt Programming
    Replies: 4
    Last Post: 2nd April 2007, 22:11
  5. Tab navigation and QListWidget
    By Arthur in forum Qt Programming
    Replies: 5
    Last Post: 9th March 2007, 19:07

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.