Ingo Maindorfer | 23 Sep 11:38

Different colors in one curve

Dear list,

I'd like to draw some data in a simple curve, but every data point 
should have a different color depending on a third data value.
The type of data is cartesian data with x and y values and a third one 
which should influence the color.

Any suggestions?

Best regards,

Ingo

-------------------------------------------------------------------------
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=/
Ormond, Randy | 18 Sep 21:54

QwtPlotCurve deleted with clear() ?

Hello,

It appears that clear() is deleting my QwtPlotCurve pointers, leading to
a segfault when I try to reuse them.  autoDelete() is turned off,
although it's not clear if should matter, because the QwtPlot itself is
not being deleted.

The documentation seems to be telling me that the curves should not be
deleted, just removed from the plot.  But I guess I'm misreading
something.

Should clear() delete the curves?

Thanks,
Randy Ormond

-------------------------------------------------------------------------
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=/
Franco Amato | 17 Sep 01:28

Q_OBJECT

Hi to all,
I'm writing a little application integrating Qt (for the GUI part) and coin3D for the simulation part.
I wrote a class named SndTestViewer that inherits from SoQtViewer (from coin3d). In this class
I added the macro Q_OBJECT because I would implement in the same class the signal/slot mechanism.
When I compile I got lots these errors:
moc/moc_SndTestViewer.cpp:37: error: 'staticMetaObject' is not a member of 'SoQtViewer'
moc/moc_SndTestViewer.cpp: In member function 'virtual void* SndTestViewer::qt_metacast(const char*)':
moc/moc_SndTestViewer.cpp:51: error: 'qt_metacast' is not a member of 'SoQtViewer'
moc/moc_SndTestViewer.cpp: In member function 'virtual int SndTestViewer::qt_metacall(QMetaObject::Call, int, void**)':
moc/moc_SndTestViewer.cpp:56: error: 'qt_metacall' is not a member of 'SoQtViewer'

Reading some online document I discovered that if a class doesn't inherits from a QObject I don't have to add the Q_OBJECT
macro, but how can implement the signal-slot so?

Regards,
Franco

-------------------------------------------------------------------------
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
Ken Hopper | 16 Sep 23:41

newbie [Q] colors of dials and knobs

Forgive me if I am writing to the wrong list.
I am learning Qt/C++ and enjoying it a great deal.
I compiled the QWT demo's under WindowsXP and Ubuntu
and they look beautiful.

I have especially enjoyed the "radio" demo and I
wondered if it is possible to change the color of
the knobs and background from grey to something
else? where does one go to find the modules in
QWT or Qt where the colors are set?

thank you for your patience,
Ken - Naperville, IL USA

-------------------------------------------------------------------------
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=/
noname | 5 Sep 19:27

height of QwtPlotScaleItem ?

hi guys,

basically, i only need to know the height of a QwtPlotScaleItem which is 
inside a widget derived from QwtPlot.
i guess it shouldn't be that much of a problem, but it couldn't figure 
out how to get the height for some weeks now.
all i found was QwtScaleDraw::extent which doesn't seem to work, but in 
the docs the description sounds like it's what i'm looking for.

i hope you can help me. if you need me to show some code of what i tried 
or give you more infos, just say it.

thanks in advance!
sincerely,
julian

-------------------------------------------------------------------------
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 Douard | 5 Sep 16:58

Zooming can be *very* slow

Hi,

I use Qwt by the mean of PyQwt.
I a plotting some time series step curves, with do plot fine, as long as I do 
not zoom too much. 

Digging in the C++ code, I have noticed that it is the  
QwtPainter::drawPolyline that is in cause. 
There is already a hack to encounter a serious pb in Qt, but I have played a 
bit with this hack. The hack is to split the polyline in parts if [some 
condition]. I  forced it to split the polyline, and now it behave OK whatever 
the zooming ratio.
So I suggest that, as long as Trolltech has not fixed this (serious) bug, the 
condition test should be removed.

Something like

--- ../../../qwt/src/qwt_painter.cpp	2008-09-05 14:07:34.000000000 +0200
+++ ./qwt_painter.cpp	2008-09-05 16:55:48.000000000 +0200
@@ -496,36 +495,21 @@
     QwtPolygon cpa = d_metricsMap.layoutToDevice(pa);
     if ( deviceClipping )
         cpa = clip(cpa);
-
+    
 #if QT_VERSION >= 0x040000
     bool doSplit = false;
-    if ( painter->paintEngine()->type() == QPaintEngine::Raster &&
-        painter->pen().width() >= 2 )
-    {
-        /*
-            The raster paint engine seems to use some algo with O(n*n).
-            ( Qt 4.3 is better than Qt 4.2, but remains unacceptable)
-            To work around this problem, we have to split the polygon into
-            smaller pieces.
-         */
-        doSplit = true;
-    }
-
-    if ( doSplit )
-    {
         const int numPoints = cpa.size();
         const QPoint *points = cpa.data();
-
-        const int splitSize = 20;
+        const int splitSize = 200;
         for ( int i = 0; i < numPoints; i += splitSize )
         {
             const int n = qwtMin(splitSize + 1, cpa.size() - i);
             painter->drawPolyline(points + i, n);
         }
-    }
-    else
-#endif
+#else
         painter->drawPolyline(cpa);
+#endif
+   
 }

 /*!

David

-------------------------------------------------------------------------
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 | 4 Sep 05:53

RE: QwtPlotSpectrogram and contour text labels .... try this update.

G'day All,

Two minor updates:

* Fixed an issue with text rotation. Needed to take into account aspect
ratio between real and display coordinates.
* Added a label step variable to choose which contour lines would have
labels. i.e. all, 2nd, 3rd, 4th, etc contour interval.

Have Fun !!

Shane Hill

-----Original Message-----
From: Hill, Shane 
Sent: Wednesday, 3 September 2008 5:16 PM
To: 'List for both Qwt users and developers'
Subject: QwtPlotSpectrogram and contour text labels .... try this.
[SEC=UNCLASSIFIED]

G'day All,

(Second try for this. The first blocked by zip file. Now using a tar.gz
file.)

Uwe or Josef: Feel free to add any aspects of this code to the base
QwtPlotSpectrogram if you think it is useful.

A while back I asked the group about text labels for the
QwtPlotSpectrogram and found, while this had not been done yet, it was
something that was on the list of things to do.

I have just spent a few days looking into this and have written and
extender class to QwtPlotSpectrogram that will add contour text labels
called LabelledSpectrogram. To test it out I have modified the
QwtPlotSpectrogram example and added another contour plot over the top
of the example (i.e. two contour diagrams in the one plot; something I
need to do). The code is in early development, but I have attached it
for anyone to have a look at, use or make comment on. Included in the
code is a sample PNG file on what it should look like.

Features of LabelledSpectrogram
-------------------------------
* Contour labels may be positions based on label placement bit flags.
Any combination of the flags may be enabled. The options are:
  * N_PER_LEVEL: Display 'N' labels per contour level evenly spaced
(sort of); default is 2 per level.
  * AT_MIN_X:    Display a label at the minimum X value for each
contour.
  * AT_MAX_X:    Display a label at the maximum X value for each
contour.
  * AT_MIN_Y:    Display a label at the minimum Y value for each
contour.
  * AT_MAX_Y:    Display a label at the maximum Y value for each
contour; the default behaviour.
  * NO_LABELS:   As it says.

* Labels are rotated to follow the contour line. There are still a few
small issues with this that I'm working on; namely that consecutive
labels may sometimes flip by 180 degrees.
* Label text is back filled to put a break in the contour line, so the
label is easier to read. This does cause an issue with the solid filled
coloured spectrogram, (maybe back filling should be turned off for this
case).
* Label font attributes may be changed.
* A margin around the plot may be set to prevent labels from getting too
close to the plot edge and become unreadable.

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.

Attachment (LabelledSpectrogram.tar.gz): application/x-gzip, 44 KiB
-------------------------------------------------------------------------
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
Hill, Shane | 3 Sep 09:16

QwtPlotSpectrogram and contour text labels .... try this.

G'day All,

(Second try for this. The first blocked by zip file. Now using a tar.gz
file.)

Uwe or Josef: Feel free to add any aspects of this code to the base
QwtPlotSpectrogram if you think it is useful.

A while back I asked the group about text labels for the
QwtPlotSpectrogram and found, while this had not been done yet, it was
something that was on the list of things to do.

I have just spent a few days looking into this and have written and
extender class to QwtPlotSpectrogram that will add contour text labels
called LabelledSpectrogram. To test it out I have modified the
QwtPlotSpectrogram example and added another contour plot over the top
of the example (i.e. two contour diagrams in the one plot; something I
need to do). The code is in early development, but I have attached it
for anyone to have a look at, use or make comment on. Included in the
code is a sample PNG file on what it should look like.

Features of LabelledSpectrogram
-------------------------------
* Contour labels may be positions based on label placement bit flags.
Any combination of the flags may be enabled. The options are:
  * N_PER_LEVEL: Display 'N' labels per contour level evenly spaced
(sort of); default is 2 per level.
  * AT_MIN_X:    Display a label at the minimum X value for each
contour.
  * AT_MAX_X:    Display a label at the maximum X value for each
contour.
  * AT_MIN_Y:    Display a label at the minimum Y value for each
contour.
  * AT_MAX_Y:    Display a label at the maximum Y value for each
contour; the default behaviour.
  * NO_LABELS:   As it says.

* Labels are rotated to follow the contour line. There are still a few
small issues with this that I'm working on; namely that consecutive
labels may sometimes flip by 180 degrees.
* Label text is back filled to put a break in the contour line, so the
label is easier to read. This does cause an issue with the solid filled
coloured spectrogram, (maybe back filling should be turned off for this
case).
* Label font attributes may be changed.
* A margin around the plot may be set to prevent labels from getting too
close to the plot edge and become unreadable.

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.

Attachment (LabelledSpectrogram.tar.gz): application/x-gzip, 44 KiB
-------------------------------------------------------------------------
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
Alexei V. Mezin | 21 Aug 18:12
Favicon

Smooth plot resize?


I use QwtRasterData/QwtPlotSpectrogram to draw color maps with rather 
small resolution (about 256x256 data points). But plot widget sometimes 
is bigger than 256x256 and image is (automatically) resized and looks 
"pixelized". Is it a "nearest neighbor" resize algorithm? How to 
optionally change that algorithm to smooth one?

-------------------------------------------------------------------------
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=/
E.R. | 19 Aug 15:34

QwtLegend without a symbol

Hi everybody,

I have made a QwtPlot with XCross symbol and a legend. The XCross
appears at the legend as well. Is it possible to remove the XCross from
the legend?

Thanks for help, Chris

-------------------------------------------------------------------------
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=/
Joey Mukherjee | 18 Aug 15:15

QGraphics... and Qwt

Has anyone else tried using the new QGraphics* (Widgets on a Canvas)  
series of routines in the new Qt 4.4+ with Qwt?

We tried it, and it seems to work okay, except for mouse-release  
events with things such as the QwtPlotZoomer (panning and picking  
exhibit the same problem).  You will be zooming, and it will never  
register that you released the mouse button so you rubber-band will  
always be "band-ing" around.  If you hit Return, it will zoom.  Strange!

Anyway, before I debug too far, has anyone done it or does anyone  
have any ideas on how to fix or even what might be wrong?

Cheers,
Joey

-------------------------------------------------------------------------
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