Axtroz
5th August 2011, 13:21
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:
http://img28.imageshack.us/img28/1603/current.th.png (http://imageshack.us/photo/my-images/28/current.png/)
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:
http://img38.imageshack.us/img38/2613/desired.th.png (http://imageshack.us/photo/my-images/38/desired.png/)
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 (http://paste2.org/p/1565244) and here: plotter.cpp (http://paste2.org/p/1565247).
Thanks for all replies in advance!
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:
http://img28.imageshack.us/img28/1603/current.th.png (http://imageshack.us/photo/my-images/28/current.png/)
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:
http://img38.imageshack.us/img38/2613/desired.th.png (http://imageshack.us/photo/my-images/38/desired.png/)
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 (http://paste2.org/p/1565244) and here: plotter.cpp (http://paste2.org/p/1565247).
Thanks for all replies in advance!