Results 1 to 5 of 5

Thread: Drawing Rect on QwtPlot

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Drawing Rect on QwtPlot

    I am planning to overlay some boxes (rects) on top of my spectrogram but i am not sure how to go about this.

    background:

    these boxes can be up to millions ,information is from a database so i am expecting lots.

    I dont think all of them will be shown in one time, its just too much information to handle for the user - say if valid x is from 0 to 1000000 , i will only give my user maximum of 200 units x at a time , and they can scroll left and right to navigate from 0 - 1000000. but still i should be prepared to handle more than 100 boxes.

    My plans:

    a) I would sublass QwtPlotItem which will represent a single rect.plot will have lots of items to draw i am not sure if this is efficient;
    b) I would give a plotCurve a Rect Data (4 points) which represent a rect. This is worse than option a i think.

    your thoughts? your opinion is highly appreciated

    baray98

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Drawing Rect on QwtPlot

    With the version of SVN trunk you could use a QwtPlotShapeItem - with Qwt 6.0 you can use the RectItem from the navigation example.
    Using curves for displaying rectangles is no good idea - as long as its size depends on plot coordinates ( otherwise it could be a curve symbol ).

    Using one item for each rectangle of course has a lot overhead compared with an implementation where you have one item for all rectangles. But this depends on details I don't know.

    Uwe

Similar Threads

  1. Replies: 0
    Last Post: 1st November 2010, 08:22
  2. Get rect tab on object QTabWidget
    By votinh in forum Qt Programming
    Replies: 1
    Last Post: 3rd June 2010, 11:21
  3. Replies: 6
    Last Post: 14th May 2009, 12:02
  4. Focus rect not drawing
    By draftpunk in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2008, 15:21
  5. QListWidgetItem Text Rect
    By js67257 in forum Qt Programming
    Replies: 2
    Last Post: 22nd August 2006, 12:02

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.