Results 1 to 4 of 4

Thread: Splitting a single QwtPlotCurve

  1. #1
    Join Date
    May 2010
    Location
    Rousse, Bulgaria
    Posts
    25
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Splitting a single QwtPlotCurve

    Hello!
    First of all, I am really really sorry for my English.
    I'm quite new to C++/Qt/Qwt and I'm writing a ping application which plots a real-time graph with Qwt on Windows.
    I'll try to explain with a couple of pictures for clearance, because I don't know how to express myself.
    So here goes...

    This is the current state of my program:


    As you can see around X 10 its working... kinda. When I receive an error (value < 0) it does plot it how it should.
    But what I want is this:

    Instead of plotting it below, leave a hole in the graph and continue anew.
    I searched around the web and the forum and from what I understood I'm supposed to overload MyCurve::drawCurve. I know how to overload a function but I have no idea how to overload drawCurve to change color/disable the pen and brush in my case, so the plot should be invisible/. If you need the code for my plot, you can find it here: plotter.h and here: plotter.cpp.

    Thanks for all replies in advance!

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

    Default Re: Splitting a single QwtPlotCurve

    For this particular use case I would use different curves,

    Uwe

  3. #3
    Join Date
    May 2010
    Location
    Rousse, Bulgaria
    Posts
    25
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Splitting a single QwtPlotCurve

    Wouldn't this decrease performance? My app is a QWidget, that will be integrated into a larger app to ping multiple hosts.

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

    Default Re: Splitting a single QwtPlotCurve

    No - at least when you don't have 100nds of curves with only few points each.

    There might even be the opposite effect - f.e. when many points are off the canvas clipping might be faster, because the bounding rectangle of many curves is completely outside the clip rectangle.

    Like always: the best solution depends and you have to understand, what is going on.

    Uwe

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

    Axtroz (5th August 2011)

Similar Threads

  1. Splitting QString
    By Peeri in forum Newbie
    Replies: 1
    Last Post: 13th April 2011, 14:41
  2. QwtPlotCurve Selection
    By WXNSNW in forum Qwt
    Replies: 1
    Last Post: 5th August 2009, 08:41
  3. set QwtPlotCurve invisible
    By gyre in forum Qwt
    Replies: 2
    Last Post: 19th December 2007, 08:53
  4. Splitting data so it fits into datagrams
    By toratora in forum Qt Programming
    Replies: 4
    Last Post: 27th April 2007, 19:01
  5. Splitting Translation Files
    By Jimmy2775 in forum Qt Programming
    Replies: 9
    Last Post: 3rd February 2006, 20:23

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.