PDA

View Full Version : regarding graph plotting in qt



sar_van81
23rd April 2007, 11:45
hi everyone,

is it possible to develop applications to plot graphs in real time using qt/embedded -3.3.5 ? if yes means can any send me any details regarding that ?

thanks in advance,

saravanan

high_flyer
23rd April 2007, 12:12
check out Qwt.
But I don't know if it will work with Qtopia.

sar_van81
23rd April 2007, 12:42
hi,

i saw that.but i cant use that as i cant port it to my Blackfin processor board. is there any way to develop in qt.

high_flyer
23rd April 2007, 13:15
is there any way to develop in qt.
Could you explain a bit more what do you mean?

sar_van81
23rd April 2007, 16:53
hi,

i have real time datas coming from a sensor. i need to plot those datas on the screen.this is my requirements.i can find the x and y coordinates and can draw a line also.but i got stuck as how to keep updating the x and y axis with values as the values comes from the sensor.

high_flyer
23rd April 2007, 17:46
your description is very general.
What it is you want to show?
The current x,y value?
That is apoint, you don't need a graph for that.
Or do you want to show a "moving" graph as time passes?
Explain with a bit more details what it is you are trying to do, what have you done (post code), and then we can see if we can help you more.

Uwe
23rd April 2007, 19:09
i saw that.but i cant use that as i cant port it to my Blackfin processor board.

Does this mean, that you simply don't know how to cross compile Qwt for your board, or that Qwt doesn't work in this environment, because of too many problems ?

If the only problem is, that you don't know how to cross compile, don't you think it's better to learn it instead of reimplementing everything from scratch ? You will have to learn how to cross compile your code anyway, so why don't you tell me, what needs to be done and I will improve the Qwt project files - if necessary.

In the case of too many platform incompatibilities, why don't you report them to the Qwt mailing list (or me). I'm always accepting bug reports and if these are platform incompatibilities only, you could have a fixed Qwt 5.0.2 the next day.

Uwe

sar_van81
24th April 2007, 05:35
Uwe:

the QWT is working fine in my linux PC. i dont know how to cross compile it for blackfin. i mean for example if i want to use qt/embedded for blackfin first i'l use qt-embedded patch provided blackfin and compile it .like wise i searched for qwt,but i could not find anything.i posted in blackfin uclinux forum also,but there was no response.So i decided to analyze the qwt and reimplement it in qt/embedded.

Is this possible ? Also if you have any details as to how to cross compile qwt, can you plese send me.

sar_van81
24th April 2007, 06:06
high_flyer:

yeah i need to show the "moving" graph as the time passes.i post my code. in my code i had created the QLabel of x and y axis when i define the class itself. but when i want to show a moving graph i need to updated them or change them. this is my problem.

Uwe
24th April 2007, 07:14
the QWT is working fine in my linux PC. i dont know how to cross compile it for blackfin. i mean for example if i want to use qt/embedded for blackfin first i'l use qt-embedded patch provided blackfin and compile it .like wise i searched for qwt,but i could not find anything.i posted in blackfin uclinux forum also,but there was no response.So i decided to analyze the qwt and reimplement it in qt/embedded.

Well I don't know much about the blackfin board, but I don't see why cross-compiling Qwt should be different to cross-compiling your own code. Qwt has no system requirements beside using the Qt API and I would expect, that all blackfin specific details are already handled in the Qt code.

So please tell me how you cross-compile your own code, then we can try to do the same with the Qwt lib.

Uwe

I would prefer to continue by email. You can use the Qwt mailing list or look on the Qwt home page for my address.

high_flyer
24th April 2007, 10:42
I also think you should go on the cross compilation path.
You have to be able to cross compile otherwise your code wont run on the target.
I am sorry, I have no time (at the moment) to look at you code.
But the problem it self is rather simple to solve (ofcourse, this will be the most simple "graph", nothing like Qwt can offer you):
You have to descide how long your "x" axis should be and tread it as a FIFO stack.
Fill the array at your polling intervals.
You say you can draw a line, so you have all you need.
At the polling intervals, poll your array, and plot the Y values from the array, in their X index.

Uwe
30th April 2007, 09:51
For the records:

Cross compiling Qwt 5.0.1 (library + examples) for the Blackfin board works out of the box. All what needs to be done is to set QTDIR and QMAKESPEC environment variables - like for any other platform.

Uwe