Results 1 to 3 of 3

Thread: globally re-orient the co-ordinate system

  1. #1
    Join Date
    Oct 2010
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default globally re-orient the co-ordinate system

    I have a device that I would like to dynamically re-orient the co-ordinate system on. Like taking the ipad and turning it on it's side. How can I re-map the co-ordinate system so that instead of the geometry of the screen reporting the screen as, say 800x480 and the origin in the upper left hand corner, have it report the origin at one of the different corners, and the screen being 480x800, and have this happen -globally-? Otherwise it would take re-implementing -every single- widget's and -every single- button's paint event. Of course it wouldn't be difficult to shuffle around the screen when I got some signal that indicated that the orientation changed, but getting to that point seems to be the problem. I'm currently using Qt 4.6.3 (ok, I'll move to 4.7 soon) compiled for an embedded system, running on debian kernel 2.6.29 on an omap 4 chip.

    TIA,

    Tom

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: globally re-orient the co-ordinate system

    You can use Graphics View as the base for your ui and just rotate the scene but with a complex user interface it will get quite slow. The real and only solution is to implement it in the operating system. If the device is running X11, XRandR or something similar should be a viable solution.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2010
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: globally re-orient the co-ordinate system

    hmmm... ok, thanks... since we are running qt embedded, it would seem as if I need to find an ioctl that will allow me to re-orient the screen. Thanks for the heads up. Might be something to think about in the future. It doesn't seem as if it would be -too- hard to make a global setting like that somewhere....

Similar Threads

  1. co-ordinate confusion: scenePos()
    By Urthas in forum Newbie
    Replies: 3
    Last Post: 15th March 2010, 03:12
  2. Setting layout margin and spacing globally
    By aarpon in forum Qt Programming
    Replies: 0
    Last Post: 7th April 2009, 12:23
  3. system in Qt
    By jaca in forum Qt Programming
    Replies: 2
    Last Post: 22nd January 2008, 15:56
  4. using class objects globally??????
    By pratik in forum Qt Programming
    Replies: 2
    Last Post: 9th July 2007, 13:51
  5. Set QSettings::IniFormat globally?
    By Slip Nine in forum Newbie
    Replies: 2
    Last Post: 10th June 2006, 21:43

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.