Results 1 to 6 of 6

Thread: Working with coordinates (QGraphicsScene/view)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Working with coordinates (QGraphicsScene/view)

    Hi,

    Interesting chunk of code. Just give me a bit of time to go throught it.
    My app can work on screens (14'',15'',17'',19'',21'',25'',27'',32''); default resolution is 1024x768, but can be bigger/smaller.
    Any other code/explanations appreciated.

    Correct me if I am wrong, but these are the sample results:
    * Screen Res: 1024x768, Diagonal Size: 19", Pixel size: 0.377mm
    * Screen Res: 800x600, Diagonal Size: 17", Pixel size: 0.4318mm
    * Screen Res: 640x480, Diagonal Size: 15", Pixel size: 0.4763mm
    Ok. Let's say I map view's PV(x1,y1) and get as the result scene coordinates PS(x2,y2). At some point PS(x2,y2) are not correct(not precise), then I should calculate the PS using the code above?
    So the faktor has to be more than 1.1 and that's why you define as fallows:
    #define _FAKTOR_PIX_POINT_ 1.3
    I am not 100% sure if totally understand the idea.

    THanks.

    Kacper
    Last edited by maverick_pol; 27th March 2008 at 08:17.
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  2. #2
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Working with coordinates (QGraphicsScene/view)

    Quote Originally Posted by maverick_pol View Post
    Hi,
    I am not 100% sure if totally understand the idea.
    THanks.
    Kacper
    one Nautical Miles is 6526.37758266 point
    take from
    http://www.metric-conversions.org/cg...2&from=10&to=3

    now you can only find your zoom depending on how many NM you wand to display on a 1024 screen....

  3. The following user says thank you to patrik08 for this useful post:

    maverick_pol (27th March 2008)

  4. #3
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Working with coordinates (QGraphicsScene/view)

    Clear enought.

    THanks.

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

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
  •  
Qt is a trademark of The Qt Company.