Results 1 to 17 of 17

Thread: Scene vs. multiple views

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Scene vs. multiple views

    Quote Originally Posted by wysota View Post
    By "closest" I understand it's not exactly what you wanted. What functionality are you missing exactly?
    OK, I am getting to it now... current code is this:

    Qt Code:
    1. void QfwSummaryView::drawItems( QPainter * painter,
    2. int numItems,
    3. QGraphicsItem* items[],
    4. const QStyleOptionGraphicsItem options[] )
    5. {
    6. for ( int idx = 0; idx < numItems; idx++ ) {
    7. QfwSummarizableItem* item = dynamic_cast<QfwSummarizableItem*>( items[ idx ] );
    8. if ( item ) {
    9. painter->save();
    10. item->drawSummary( painter );
    11. painter->restore();
    12. }
    13. }
    14. }
    To copy to clipboard, switch view to plain text mode 


    See the attached screen dump, I have 2 tracks with multiple curves, each curve shares the same Y axis, but they have their own X axis. The Y axis is long that require scroll bar, so the idea is to have 2 views: the bottom view is to draw those curves, the top view is to draw "legend" along with X axis min value and max value....

    I am currently using the same QGraphicsScene, there is a boundingRect problem, for instance the area plot (in the right track) has narrow width, but the "legend" at the top is wider, yet exposure is controlled by the real object's boundingRect...

    So, I think I need to have two scenes, can someone gives me a simple UML class diagram, as well as how to keep then in sync?
    Attached Images Attached Images

Similar Threads

  1. QGraphicsView, QGraphicsItem, QGraphicsScene
    By Shuchi Agrawal in forum Newbie
    Replies: 10
    Last Post: 23rd March 2011, 20:50
  2. Question about a model with multiple views
    By awhite1159 in forum Qt Programming
    Replies: 3
    Last Post: 26th June 2008, 00:27
  3. Creating new scene from a part of an old one
    By maverick_pol in forum Qt Programming
    Replies: 6
    Last Post: 28th November 2007, 18:14
  4. Creating a scene from piece of another scene
    By maverick_pol in forum Qt Programming
    Replies: 3
    Last Post: 23rd August 2007, 17:51
  5. How to use QGraphicsView and Scene right ...
    By Mike in forum Qt Programming
    Replies: 6
    Last Post: 22nd January 2007, 08:51

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.