Results 1 to 14 of 14

Thread: Graphics View Queries

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2008
    Posts
    31
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Graphics View Queries

    Quote Originally Posted by wysota View Post
    That's not what your code does.
    "i need to Ignore the Transformation for some items as they are required to retain the size independent of zoom level."
    for this i have just set the flag "item3->setFlag(QGraphicsItem::ItemIgnoresTransformations , true);"
    This should satisfy my requirement right? what's my code doing, where am i going wrong?



    Quote Originally Posted by wysota View Post
    Both, as far as I remember.
    I have used Standard EllipseItem of the Framework, this should take care of the issue automatically right?
    I think i need to call "prepareGeometryChange();" for custom item , should i do this in the Resize Event?




    Quote Originally Posted by wysota View Post
    Your usecase is very simple and you make it way too complicated.
    I guess there is a design flaw somewhere , how can it be simplified ? can you help me rectify my attached code ?

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

    Default Re: Graphics View Queries

    What exactly is your application meant to do? I ran the code you provided but I don't see much

  3. #3
    Join Date
    Dec 2008
    Posts
    31
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Graphics View Queries

    Hmm

    I didnt want to go deep into it, now that you have asked for, i think you would have to read completely

    My application is a Radar Display System,
    I receive data from radar , through network which represent aircrafts in space.
    The data received is to be plotted on to the display. the concentric circle represent the PPI view.
    Origin represents the radar and rings are mapped to 10Km , 20 and so on ....

    a. Application receives data from Network continuously.
    b. This data has to be processed and then drawn on to the scene.
    c. There can be as many as 600 data items for every 4 secs or even lesser interval.
    d. data which is old by one interval should be changed to a different color and that those which are old by two intervals should be deleted/erased from the display. (aircraft gone away)

    I have done bulk of my Coding in QPainter, its not living to expected performance, now i am planning to do the same in GraphicsView. (Following the way showed by you )

    The Application i have done now , is to test whether GraphicsView Framework will do my job at much better performance boost.
    For that,
    a. I have not added the network part in this miniature app.
    b. Instead to test performance , i am drawing only one data at an interval of 10msec. (Planning to put 500 more items)

    Will this workout ?
    Should i still need to use QThread for Network or its fine with the GraphicsView Framework.

    The radar is quite fast , it rotates at 24 Rpm. Pumping data upto 600 data in one rotation.
    I have to display them efficiently, giving much better User Response. (As he will do a lot of other things)


    This is my Story, hope to receive some help so that i can make a movie

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

    Default Re: Graphics View Queries

    In that case I would draw the crosshair using drawBackground() or drawForeground() and the aircrafts and other potential objects using items of the graphics view. I would probably not use scaling even if you want to have different zoom levels, as most objects would have to ignore transformations anyway, so it might be easier to move them around instead of scaling - losing transformations altogether would make things much faster. Bare QPainter is fine too but you'd have to do some caching to avoid recalculating everything.

  5. The following user says thank you to wysota for this useful post:

    linuxdev (8th January 2009)

Similar Threads

  1. Qt Coordinate System and the Graphics View Framework
    By djurodrljaca in forum Qt Programming
    Replies: 14
    Last Post: 17th February 2012, 11:19
  2. Replies: 4
    Last Post: 5th August 2008, 19:55
  3. Graphics View Event Propagation
    By pherthyl in forum Qt Programming
    Replies: 10
    Last Post: 3rd July 2008, 10:39
  4. Graphics view display problem.
    By kiranraj in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 07:08
  5. Adding Rectangular overlay on graphics view
    By forrestfsu in forum Qt Programming
    Replies: 10
    Last Post: 21st November 2006, 19:42

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.