Skip navigation.
Home
The QNX Community Portal

View topic - Display the scale on a trend graph ?

Display the scale on a trend graph ?

Isn't the name clear?

Display the scale on a trend graph ?

Postby _KB_ » Tue Oct 30, 2012 5:00 pm

Hi,

I would like to know if there is a flag to set or maybe a function to call in order to display the scale on a trend graph grid?

If not what are my options? (labels, raw widget, ... ?)

Thanks a lot!
_KB_
Active Member
 
Posts: 24
Joined: Mon Oct 15, 2012 6:36 pm

Re: Display the scale on a trend graph ?

Postby maschoen » Thu Nov 01, 2012 1:42 am

I'm not sure if you meant a vertical or horizontal scale.

In either case I think you answered your own question.
If you put a label or raw widget on top of the trend widget that have transparent backgrounds,
the trend will show through. Those are the obvious ones, but you can put any type of widget
you want.

If you update the trend frequently, you may get a lot of flashing.
To mitigate that you can put everything into an PtOSContainer widget.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: Display the scale on a trend graph ?

Postby _KB_ » Fri Nov 02, 2012 10:12 pm

Thank you for your answer.

I meant both vertical and horizontal scales. My final goal is to display a spectrum of 1024 samples with zoom capability.
Besides, I would like to add vertical and horizontal cursors on the trend too and to display the coordinates of each sample when I put the cursor on the spectrum.

I guess the trend widget does not fit my goal (I blow my mind to try to zoom on the X-scale :shock: ) and that I will have to code my own widget in order to achieve that :|

Or maybe with a raw widget and few functions such as PgDrawTrend, PgDrawPixelArray, PgDrawPolygon and so on ...

What do you think about it ? I'm a little confused here :roll:

Any tip, link or snippet of code would be appreciated!
_KB_
Active Member
 
Posts: 24
Joined: Mon Oct 15, 2012 6:36 pm

Re: Display the scale on a trend graph ?

Postby _KB_ » Wed Nov 07, 2012 7:55 am

My final goal is to display a spectrum of 1024 samples with zoom capability.
Besides, I would like to add vertical and horizontal cursors on the trend too and to display the coordinates of each
sample when I put the cursor on the spectrum.

I guess the trend widget does not fit my goal (I blow my mind to try to zoom on the X-scale! ) and that I will have to
code my own widget in order to achieve that :|

Or maybe with a raw widget and few functions such as PgDrawTrend], PgDrawPixelArray, PgDrawPolygon and so on ...

What do you think about it ? I'm a little confused here

Any tip, link or snippet of code would be appreciated!
_KB_
Active Member
 
Posts: 24
Joined: Mon Oct 15, 2012 6:36 pm

Re: Display the scale on a trend graph ?

Postby maschoen » Fri Nov 16, 2012 12:55 pm

At the lowest level, all widgets are just painting graphically, sometimes with the assistance of the font manager for text. If the available widgets don't provide the visual functionality you need, then yes, using a raw widget is a good way to go. The alternative is to write your own widget.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 1 guest