Results 1 to 2 of 2

Thread: graphics view architecture

  1. #1
    Join Date
    Feb 2011
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default graphics view architecture

    How can I put graphics items in different layers so that items can be viewed selectively by
    simply enabling/disabling the layers. Also how some layers can be drawn frequently and some
    drawn infrequently and some drawn only once i.e. selective layer draw.

    Example:
    1.Background map is static information thus has to be drawn only once.

    2.Target information coming from LAN is dynamic and gets updated frequently and different types of targets have to be drawn in different layers so that the operator can view one type of targets using layer selection.

    I am using Graphics View Framework of Qt 4.7.

  2. #2
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: graphics view architecture

    I'm not sure if this separate paint can be done on a graphicsview item. I'm just thinking on the fact that when the data changes so eg. a curve changes than new areas get visible from the background and otherd get hidden so the backgroung should be also redrawn. Better qualified people, please let me know if I'm wrong.

    for the layers: I would try to use classes for the implementation of a layer in which maybe a boolean variable could be a solution, and in the paint function there should be an if statement before doing anything. Connecting its "setVisible()" to some proper signals or slots should work. Well, this idea was not really detailful, I know, but I would start working on this line.

    (please note I'm just an innocent but curious beginner... )
    Szilvi

Similar Threads

  1. Using Qt::UserRole in the Model/View architecture
    By d_stranz in forum Qt Programming
    Replies: 8
    Last Post: 23rd January 2011, 16:13
  2. Questions about Model-View Architecture in QT
    By Polnareff in forum Newbie
    Replies: 4
    Last Post: 4th June 2010, 15:01
  3. Replies: 3
    Last Post: 30th March 2010, 13:06
  4. document view Architecture in QT
    By phillip_Qt in forum Qt Programming
    Replies: 3
    Last Post: 15th September 2009, 07:54
  5. modal/view architecture
    By sonuani in forum Qt Programming
    Replies: 2
    Last Post: 4th April 2008, 05:39

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.