Darryl Wallace | 8 Oct 2008 17:48
Picon
Favicon

Re: Qwt plot in Model/View/Delegate

I've thought about this a bit more and I think I'm kind of stuck with 
more of the big picture.

Basically what i want to do is an MDI type of interface where a table of 
data can be displayed along side a plot of the same data.  If the user 
selects a row in the data table, for example, the data points 
corresponding to that row will be highlighted in the plot (and vice 
versa). 

I've implemented  a method for selecting data points on a plot with a 
rubber band, but would I would like is for a selection to be translated 
to all other views of the same data.

My big problem is how to start the interaction between the model/view 
with the qwtdata.  Any further insight to this would be greatly 
appreciated.  You'll have to forgive me as I am a novice with the 
model/view style.

Thanks,
Darryl

> Uwe Rathmann wrote:
>   
>> On Monday 25 August 2008 22:44, Darryl Wallace wrote:
>>
>>   
>>     
>>> Just a quick question.  Has anyone implemented a Qwt plot in the
>>> Model/View/Delegate framework?
>>>     
(Continue reading)

Uwe Rathmann | 8 Oct 2008 22:55
Picon

Re: Qwt plot in Model/View/Delegate

On Wednesday 08 October 2008 17:48, Darryl Wallace wrote:

> Basically what i want to do is an MDI type of interface where a table of
> data can be displayed along side a plot of the same data.  If the user
> selects a row in the data table, for example, the data points
> corresponding to that row will be highlighted in the plot (and vice
> versa).

QwtPlotCurve has no concept of selecting/highlighting. 

So first you have to think about how to implement this. If you display your 
curve with symbols only you could split your points into 2 curves with 
different symbols. If not you have to overwrite QwtPlotCurve::drawSymbols and 
paint the symbols with different colors.

QwtData also has no concept of selected points. So you have to look into the 
model to see which points are selected.

Uwe

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Ramji Srimurugan | 16 Oct 2008 09:49
Picon

qwt_symbols -- Ray and Arrow

Hi all,

Has anybody used Qwt for generating vector plots ???

Noticed symbols 'Ray and Arrow' have been declared in the qwt_symbol header file but seems like they are currently not supported.
Interested to hear from anyone who has successfully implemented the same. Or from anybody who has tweaked the existing symbols to generate vector fields.
Thanks...

- Srimurugan
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest
wilfried.brignoli | 16 Oct 2008 09:40

Fix size of plot


Hello everybody,

I want to fix the size of my plot.
For example, i want that my X axis has a real size of 100 pixel wherever
the size of the parent widget.

How can i do this ?

Thanks

Wilfried Brignoli
--------------------------------------------------------------------------
Tél interne :  68 835
Mail interne :  wilfried.brignoli <at> fr.michelin.com
Bat F32 / 2ème étage / Bureau 340
--------------------------------------------------------------------------
Logica IT Services

Direction Régionale Auvergne - Limousin
23, Allée Alan Turing
PAT La Pardieu
63000 Clermont Ferrand

Email : wilfried.brignoli <at> logica.com
Web : http://www.logica.com/

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Uwe Rathmann | 17 Oct 2008 09:29
Picon

Re: Fix size of plot

On Thursday 16 October 2008 09:40, wilfried.brignoli <at> fr.michelin.com wrote:

> For example, i want that my X axis has a real size of 100 pixel wherever
> the size of the parent widget.

With the code below you get a canvas with a size of 200x100 pixels

    plot.canvas()->setMinimumSize(QSize(200, 100));
    plot.replot();
    plot.setFixedSize(plot.minimumSizeHint());

Uwe

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Uwe Rathmann | 17 Oct 2008 09:41
Picon

Re: qwt_symbols -- Ray and Arrow

On Thursday 16 October 2008 09:49, Ramji Srimurugan wrote:

> Has anybody used Qwt for generating vector plots ???

Qwt 5.1 has QwtPlotCurve for displaying 2D samples and QwtPlotSpectrogram for 
displaying 3D raster - but there is no item for 3D samples needed for vector 
plots. Items like these are planned for Qwt 5.2, where you find 
QwtPlotSeriesItem/QwtPlotSeriesData templates, that are designed for new 
items like vector plots ( or items displaying the 3rd dimension as color ).

> Noticed symbols 'Ray and Arrow' have been declared in the qwt_symbol header

There are none, but QwtPlotCurve/QwtSymbol are not the right classes to 
implement vector plots ( see above ).

If you decide to implement a vector plot item for Qwt 5.2.x please send me the 
code.

Uwe

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Christopher Probst | 20 Oct 2008 03:14
Picon
Favicon

not drawing dots

Hello,

Allthought it works with QTopia 4.3.1.

We're running qwt 5.0.0 with Qt-embedded 4.4.3 and arm 11 processor. We are having
trouble with the method replot() when setting the style of the curve to
QwtPlotCurve::Dots, the dots are simply not appearing.

With 5.1.1 same problem.

We have exhausted ideas on making the dots appear and were wondering if you had any ideas to make it work
with qwt 5.0.0 and Qt-embedded 4.4.3

Thanks,
Christopher
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest
Uwe Rathmann | 20 Oct 2008 06:44
Picon

Re: not drawing dots

Hi Christopher,

> We're running qwt 5.0.0 with Qt-embedded 4.4.3 and arm 11 processor.
> We are having trouble with the method replot() when setting the style
> of the curve to QwtPlotCurve::Dots, the dots are simply not appearing.
>
> With 5.1.1 same problem. It works with QTopia 4.3.1.

When the same code works with Qtopia 4.3.1, but not with Qt-embedded 4.4.3 its 
very likely, that it is a Qt problem.

In the end the Dot style ends in QPainter::drawPoint calls to a QPixmap, that 
is painted to the canvas later:

a) What happens, when you disable the canvas cache ( 
plot->canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false); ) ?

b) Can you write a small test program, that paints points to a QPixmap and 
displays it in a QLabel without Qwt ?

Uwe

PS: Noticed, that you posted on the list too. Please continue here.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Hill, Shane | 21 Oct 2008 00:19
Picon

Why are draw() and renderImade() declared as "const"?

G'day All,

Just a general question about why the QwtPlotItem / QwtPlotSpectrogram /
QwtPlotRasterItem draw() and renderImage() functions are declared as
"const"? This prevents any data within the class from being updated
unless you use a convoluted method of creating private data as an
external structure. Is there some good logic behind making these
functions "const"?

Sorry if I sound frustrated, but I'm trying to implement my own version
of the QwtSpectrogram class where I inherit a number of different sub
classes to manage contours, labels and images. But I can't update any of
the subclass information while these functions are declared const. The
only function I can work with at the moment is updateScaleDiv().

Have Fun !!

Shane Hill

-----------------------------------------------------
Shane D. Hill (B.E. Aero. Hons.)
Science Team Leader: Aircraft Flight Dynamics, Modelling & Simulation
Aircraft Vehicles Division
Defence Science & Technology Organisation
506 Lorimer St, Fishermens Bend, Vic. 3207 AUSTRALIA
Email:  Shane.Hill <at> dsto.defence.gov.au
Voice:  +61 3 9626 7811
FAX:    +61 3 9626 7705
-----------------------------------------------------

IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the
jurisdiction of section 70 of the CRIMES ACT 1914.  If you have received this email in error, you are
requested to contact the sender and delete the email.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
David Stranz | 21 Oct 2008 00:33

RE: Why are draw() and renderImade() declared as "const"?

Shane,

You can always use one of two methods for changing member data
from within a const method:

1 - Declare the members you want to change as "mutable".

2 - Use the trick of const-casting "this" inside the const method:

MySpectrogram * pSpec = const_cast< MySpectrogram * >( this );
pSpec->changeSomething();

That said, in my opinion, if you think you need to change things 
from within the draw() or renderImage() methods, then you have 
probably overlooked a more appropriate place to update your member 
variables.

QwtPlot is extremely hard to understand if you wish to do anything
out of the ordinary, so I have no idea where this more appropriate
place might be.  Perhaps Uwe has a suggestion.

Regards,

David

_______________________________________________________________
David Stranz, Ph.D.	david_stranz <at> MassSpec.com

Sierra Analytics, Inc.
5815 Stoddard Road, Suite 601
Modesto, CA  95356

Tel: (209) 545-8508
http://www.massspec.com
_______________________________________________________________

> -----Original Message-----
> From: Hill, Shane [mailto:Shane.Hill <at> dsto.defence.gov.au] 
> Sent: Monday, October 20, 2008 3:19 PM
> To: List for both Qwt users and developers
> Cc: qwt-support <at> tigertal.de
> Subject: Why are draw() and renderImade() declared as "const"?
> 
> G'day All,
> 
> Just a general question about why the QwtPlotItem / 
> QwtPlotSpectrogram /
> QwtPlotRasterItem draw() and renderImage() functions are declared as
> "const"? This prevents any data within the class from being updated
> unless you use a convoluted method of creating private data as an
> external structure. Is there some good logic behind making these
> functions "const"?
> 
> Sorry if I sound frustrated, but I'm trying to implement my 
> own version
> of the QwtSpectrogram class where I inherit a number of different sub
> classes to manage contours, labels and images. But I can't 
> update any of
> the subclass information while these functions are declared const. The
> only function I can work with at the moment is updateScaleDiv().
> 
> Have Fun !!
>  
> Shane Hill
>  
> -----------------------------------------------------
> Shane D. Hill (B.E. Aero. Hons.)
> Science Team Leader: Aircraft Flight Dynamics, Modelling & Simulation
> Aircraft Vehicles Division
> Defence Science & Technology Organisation
> 506 Lorimer St, Fishermens Bend, Vic. 3207 AUSTRALIA
> Email:  Shane.Hill <at> dsto.defence.gov.au
> Voice:  +61 3 9626 7811
> FAX:    +61 3 9626 7705
> -----------------------------------------------------
> 
> IMPORTANT: This email remains the property of the Australian 
> Defence Organisation and is subject to the jurisdiction of 
> section 70 of the CRIMES ACT 1914.  If you have received this 
> email in error, you are requested to contact the sender and 
> delete the email.
> 
> 
> 
> --------------------------------------------------------------
> -----------
> This SF.Net email is sponsored by the Moblin Your Move 
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & 
> win great prizes
> Grand prize is a trip for two to an Open Source event 
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> qwt-interest mailing list
> qwt-interest <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qwt-interest
> 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane