Qwt 6.0.1 Support
Upgrade to QWT 6.0.1, but still uses a locally patched copy since support for 8 axes has not been included, despite it being a relatively simple patch. Fixes #634. Fixes #567.
4
qwt/.gitignore
vendored
@@ -1,2 +1,6 @@
|
||||
lib
|
||||
qwtconfig.pri
|
||||
*.so
|
||||
moc*.cpp
|
||||
*.obj
|
||||
*.o
|
||||
|
||||
111
qwt/CHANGES
@@ -1,24 +1,125 @@
|
||||
Release 6.0.1
|
||||
===================
|
||||
|
||||
Changes
|
||||
-------
|
||||
1) Incompatibilities with Qt < 4.6.1 fixed
|
||||
2) Reduce warnings with pedantic compiler options
|
||||
3) Examples fixed
|
||||
4) Legend identifiers of with symbol and line fixed
|
||||
|
||||
Release 6.0.0
|
||||
===================
|
||||
|
||||
Changes
|
||||
-------
|
||||
1) Qt3 support dropped
|
||||
2) QwtPlot layout/render code ported from int to double
|
||||
Exported/printed documents in scalable formats like SVG or PDF
|
||||
are 100% scalable now.
|
||||
3) Template base classes introduced for curve and curve data
|
||||
to be reusable in all plot items displaying series of samples.
|
||||
4) New plot items
|
||||
- QwtPlotHistogram
|
||||
- QwtPlotIntervalCurve ( error bars or displaying the area between 2 curves )
|
||||
- QwtPlotSpectroCurve ( mapping the z value to a color )
|
||||
5) Raster items
|
||||
- QwtMatrixRasterData introduced
|
||||
- More accurate rendering
|
||||
- Several API changes
|
||||
- Thread support for rendering spectrograms
|
||||
6) QwtPlot::print moved to QwtPlotRenderer
|
||||
7) Other new classes
|
||||
QwtColumnSymbol
|
||||
QwtDoublePoint3D
|
||||
QwtIntervalSymbol
|
||||
QwtPlotDirectPainter
|
||||
QwtSamplingThread
|
||||
QwtSystemClock
|
||||
8) QwtPicker and friends reorganized,
|
||||
QwtPickerTrackerMachine added for displaying a rubberband for
|
||||
mouse moves. Enter/Leave added to events, that are handled
|
||||
by the picker machines.
|
||||
9) QwtScaleWidget::LayoutFlag added
|
||||
Introduced to control the direction of vertical axis titles.
|
||||
10)QwtWeedingCurveFitter added
|
||||
QwtWeedingCurveFitter is an implementation of the Douglas/Peuker
|
||||
algorithm, that can be used to reduce the number of curve points.
|
||||
It can be very useful to improve the performance of painting
|
||||
curves of many lines ( f.e. by implementing different level of details ).
|
||||
11)Legend code update for representing different pixmaps for different
|
||||
types of plot items.
|
||||
12)Copy operators removed, using pointers instead
|
||||
13)QwtPolarPoint from qwtpolar added
|
||||
14)QwtThermo
|
||||
Optional QwtColorMaps added
|
||||
15)Interfaces and code of all sliders/dials cleaned up.
|
||||
QApplication::globalStrut(), styled backgrounds ...
|
||||
|
||||
|
||||
Release 5.2.2
|
||||
===================
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
1) QwtSplineCurveFitter
|
||||
Rounding to integers values removed
|
||||
2) QwtPlot
|
||||
initial size of 200x200
|
||||
3) QwtPlotPrintFilter, QwtPlot::print
|
||||
handling of background color in QwtPlot::print
|
||||
4) QwtPlotPrintFilter
|
||||
Problem with colored plot titles fixed
|
||||
5) QwtPlotItem
|
||||
Crash fixed, when changing the z order of attached items
|
||||
6) QwtLinearScaleEngine, QwtLog10ScaleEngine
|
||||
Several minor fixes
|
||||
|
||||
Release 5.2.1
|
||||
===================
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
1) QwtScaleDraw
|
||||
1) Export declarations removed from qwt_valuelist.h to avoid
|
||||
compiler errors with Qt 4.6 + certain compilers on Windows.
|
||||
2) QwtScaleDraw
|
||||
Wrong border dist hints for unregular scale divisions fixed
|
||||
Layout calculation for the tick labels fixed.
|
||||
The layout was wrong by 1 pixel for top/left/bottom axes.
|
||||
On a left axis without a title the labels were sometimes cut off.
|
||||
3) QwtPainter
|
||||
Splits polylines for all pens to avoid a bottleneck of the
|
||||
raster paint engine.
|
||||
4) QwtScaleWidget
|
||||
Calculation of the colorbar position fixed ( spacing/margin )
|
||||
5) QwtPlotCurve
|
||||
Wrong clipping rect fixed
|
||||
6) QwtPicker
|
||||
QwtPicker::setTrackerFont() fixed.
|
||||
Recursion on the Mac, when constructing the rubberband fixed.
|
||||
Workaround for a Qt3 bug added that is responsible for left aligning
|
||||
all tracker texts to the canvas.
|
||||
|
||||
Changes
|
||||
-------
|
||||
1) Project files adopted for symbian
|
||||
2) qwt.pro
|
||||
CONFIG += ordered added for using make -j
|
||||
CONFIG += silent added
|
||||
|
||||
Release 5.2.0
|
||||
===================
|
||||
|
||||
Changes
|
||||
-------
|
||||
1) Ported to Qt 4.5.x
|
||||
1) Ported to Qt 4.5.x
|
||||
2) Scaling of non cosmetic pens (for printing to devices in high resolution)
|
||||
3) Clipping of polygons for SVG rendering
|
||||
3) Clipping of polygons for SVG rendering
|
||||
4) QwtRect removed
|
||||
use QwtClipper instead
|
||||
5) QwtPlotRescaler
|
||||
Introduced
|
||||
6) QwtDoubleInterval
|
||||
6) QwtDoubleInterval
|
||||
BorderMode introduced
|
||||
7) QwtPlotCurve
|
||||
Performance of incremental curve painting ( = draw(from, to) ) improved.
|
||||
@@ -38,7 +139,7 @@ Changes
|
||||
counter clockwise scales introduced
|
||||
15)QwtPlotMarker
|
||||
Vertical text labels
|
||||
16)doc/qwt-5.2.0.qch added foe browsing the Qwt docs in the Qt assistant
|
||||
16)doc/qwt-5.2.0.qch added foe browsing the Qwt docs in the Qt assistant
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
|
||||
130
qwt/INSTALL
@@ -9,18 +9,14 @@ build a certain project. A project file ends with the suffix "*.pro".
|
||||
Files that end with the suffix "*.pri" are included by the project
|
||||
files and contain definitions, that are common for several project files.
|
||||
|
||||
qwtconfig.pri is read by all project files of the Qwt package.
|
||||
So the first step is to edit qwtconfig.pri to adjust it to your
|
||||
needs.
|
||||
qwtconfig.pri and qwtbuild.pri are read by all project files of the Qwt
|
||||
package. qwtconfig.pri is also read by qwt.prf, when building your
|
||||
application. So the first step is to edit the *.pri files to adjust
|
||||
them to your needs.
|
||||
|
||||
MathML Extension
|
||||
================
|
||||
|
||||
Qwt/Qt4 supports the MathML render engine from the Qt solutions package,
|
||||
that is only available with a commercial Qt license.
|
||||
|
||||
You need a release of qtmmlwidget >= 2.1.
|
||||
Copy the files qtmmlwidget.[cpp|h] to textengines/mathml.
|
||||
The subdirs template of qmake is known to be buggy when using spaces
|
||||
in path names. So better don't build Qwt below a path name with spaces.
|
||||
( Otherwise you might have to run qmake in all subdirs manually ).
|
||||
|
||||
Documentation
|
||||
==========================
|
||||
@@ -29,12 +25,19 @@ Qwt includes a class documentation, that is available in various formats:
|
||||
|
||||
- Html files
|
||||
- PDF document
|
||||
- Qt Compressed Help (*.qch ) for the Qt assistant.
|
||||
- Qt Compressed Help (*.qch ) for the Qt assistant or creator.
|
||||
You can load it "Edit Preferences" -> "Documentation" -> "Add..."
|
||||
- Man pages ( UNIX only )
|
||||
|
||||
A) Unix Qt3/Qt4
|
||||
Building Qwt
|
||||
==========================
|
||||
|
||||
The easiest way to build Qwt is from the command line - but you insist on
|
||||
using an IDE don't forget the "make install" step.
|
||||
|
||||
A) Unix
|
||||
--------
|
||||
|
||||
qmake
|
||||
make
|
||||
make install
|
||||
@@ -57,8 +60,10 @@ qmake
|
||||
make
|
||||
|
||||
|
||||
B) Win32/MSVC Qt3/Qt4
|
||||
=====================
|
||||
B) Win32/MSVC
|
||||
--------
|
||||
|
||||
Check that your Qt version has been built with MSVC - not with MinGW !
|
||||
|
||||
Please read the qmake documentation how to convert
|
||||
your *.pro files into your development environment.
|
||||
@@ -66,6 +71,7 @@ your *.pro files into your development environment.
|
||||
F.e MSVC with nmake:
|
||||
qmake qwt.pro
|
||||
nmake
|
||||
nmake install
|
||||
|
||||
If you didn't enable autobuilding of the examples in qwtconfig.pri
|
||||
you have to build the examples this way:
|
||||
@@ -74,32 +80,28 @@ cd examples
|
||||
qmake examples.pro
|
||||
nmake
|
||||
|
||||
admin/msvc-qmake.bat helps users of Visual Studio users to
|
||||
generate makefiles or project files (.dsp for MSVC-6.0 or vcproj for
|
||||
MSVC.NET) for Qwt.
|
||||
|
||||
To generate makefiles, type: "admin\msvc-qmake"
|
||||
To generate project files, type: "admin\msvc-qmake vc"
|
||||
|
||||
When you have built a Qwt DLL you need to add the following
|
||||
define to your compiler flags: QWT_DLL.
|
||||
|
||||
Windows doesn't like mixing of debug and release binaries. Most
|
||||
of the problems with using the Qwt designer plugin are because
|
||||
of trying to load a Qwt debug library into a designer release
|
||||
executable.
|
||||
|
||||
It's not possible to load a plugin, that has been built with MinGW
|
||||
into a Qt Designer/Creator, that has been built with MSVC ( and v.v ).
|
||||
This is a common reason for problems, when working with prebuild
|
||||
binaries of the Qt Creator.
|
||||
|
||||
C) Win32/MinGW Qt4
|
||||
==================
|
||||
C) Win32/MinGW
|
||||
--------
|
||||
|
||||
C1) Windows Shell
|
||||
Check that your Qt version has been built with MinGW - not with MSVC !
|
||||
|
||||
Start a Windows Shell, where Qt4 is initialized. ( F.e. with
|
||||
Start a Shell, where Qt4 is initialized. ( F.e. with
|
||||
"Programs->Qt by Trolltech ...->Qt 4.x.x Command Prompt" ).
|
||||
Check if you can execute "make" or something like "mingw32-make".
|
||||
|
||||
qmake qwt.pro
|
||||
make
|
||||
make install
|
||||
|
||||
If you didn't enable autobuilding of the examples in qwtconfig.pri
|
||||
you have to build the examples this way:
|
||||
@@ -107,47 +109,17 @@ you have to build the examples this way:
|
||||
cd examples
|
||||
qmake examples.pro
|
||||
make
|
||||
make install
|
||||
|
||||
C2) MSYS Shell Qt >= 4.3.0
|
||||
|
||||
Support for the MSYS Shell has been improved in Qt 4.3.0.
|
||||
Now building Qwt from the MSYS Shell works exactly like in UNIX or in the
|
||||
Windows Shell - or at least it should:
|
||||
because of a bug in Qt 4.3.0 you always have to do a "qmake -r".
|
||||
|
||||
C3) MSYS Shell Qt < 4.3.0
|
||||
|
||||
For Qt < 4.3.0 you have to set the MINGW_IN_SHELL variable.
|
||||
make will run into errors with the subdirs target, that can be
|
||||
ignored (make -i).
|
||||
|
||||
export MINGW_IN_SHELL=1;
|
||||
|
||||
qmake
|
||||
make -i
|
||||
make -i install
|
||||
|
||||
If you didn't enable autobuilding of the examples in qwtconfig.pri
|
||||
you have to build the examples this way:
|
||||
|
||||
cd examples
|
||||
qmake examples.pro
|
||||
make -i
|
||||
make -i install
|
||||
|
||||
C1-C3)
|
||||
|
||||
When you have built a Qwt DLL you need to add QWT_DLL to your compiler
|
||||
flags. If you are using qmake for your own builds this done by adding
|
||||
the following line to your profile: "DEFINES += QWT_DLL".
|
||||
|
||||
Windows doesn't like mixing of debug and release binaries. Most
|
||||
of the problems with using the Qwt designer plugin are because
|
||||
of trying to load a Qwt debug library into a designer release
|
||||
executable.
|
||||
|
||||
Don't forget to tell qmake where to find qwt.prf:
|
||||
qmake -set QMAKEFEATURES ...
|
||||
|
||||
D) MacOSX
|
||||
--------
|
||||
|
||||
Well, the Mac is only another Unix system. So read the instructions in A).
|
||||
|
||||
@@ -158,19 +130,35 @@ following:
|
||||
qmake -spec macx-g++
|
||||
...
|
||||
|
||||
D) Qtopia Core
|
||||
D) Qt Embedded
|
||||
--------
|
||||
|
||||
I only tested Qwt with Qtopia Core in qvfb (Virtual Framebuffer Devivce)
|
||||
I only tested Qwt with Qt Embedded in qvfb (Virtual Framebuffer Devivce)
|
||||
Emulator on my Linux box. To build Qwt for the emulator was as simple as
|
||||
for a regular Unix build.
|
||||
|
||||
qmake
|
||||
make
|
||||
F) Symbian
|
||||
--------
|
||||
|
||||
E) Qtopia (!= Qtopia Core)
|
||||
I never tried this platform myself.
|
||||
|
||||
I once compiled the Qwt library against Qtopia 4.2.0 successfully - but
|
||||
not more. It should be possible to build and install Qwt, but it's
|
||||
not done yet.
|
||||
Using Qwt
|
||||
===========
|
||||
|
||||
For building a Qwt application with qmake use the Qwt configuration features
|
||||
file, that has been installed by "make install". When qmake is able to find
|
||||
it ( http://doc.qt.nokia.com/4.7/qmake-advanced-usage.html#adding-new-configuration-features )
|
||||
you can simply add "CONFIG += qwt" to your application project file.
|
||||
|
||||
If you don't use qmake you have to add the include path to find the Qwt
|
||||
headers to your compiler flags and the Qwt library to your linker list.
|
||||
Don't forget to add QWT_DLL to the compiler flags, when you work with a
|
||||
Qwt-DLLs on Windows.
|
||||
|
||||
For using the designer plugin you have to configure the Qt designer/creator
|
||||
where to look for plugins. This can be done by setting the QT_PLUGIN_PATH or
|
||||
using a qt.conf file ( see http://doc.qt.nokia.com/4.7/deployment-plugins.html ).
|
||||
Beside the plugin the Qwt library itsself also needs to be known to the Designer/Creator
|
||||
( see LD_LIBRARY_PATH, PATH ... above ).
|
||||
|
||||
Good luck !
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
REM Batch file to make all Makefiles or all Visual Studio project files
|
||||
REM (*.dsp for MSVC-6.0 or *.vcproj for MSVC-7.0) for Qwt with qmake.
|
||||
REM
|
||||
REM BUG: the designer plugin *.dsp file may not work; the Makefile does.
|
||||
REM
|
||||
REM To make Makefiles, type: msvc-qmake
|
||||
REM To make project files type: msvc-qmake vc
|
||||
|
||||
REM For the Qwt library:
|
||||
cd src
|
||||
qmake -t %1lib% src.pro
|
||||
cd ..
|
||||
|
||||
REM For the designer plugin:
|
||||
cd textengines\mathml
|
||||
qmake -t %1lib mathml.pro
|
||||
cd ..\..
|
||||
|
||||
REM For the designer plugin:
|
||||
cd designer
|
||||
qmake -t %1lib designer.pro
|
||||
cd ..
|
||||
|
||||
REM For the examples:
|
||||
cd examples
|
||||
cd bode
|
||||
qmake -t %1app bode.pro
|
||||
cd ..\cpuplot
|
||||
qmake -t %1app cpuplot.pro
|
||||
cd ..\curvdemo1
|
||||
qmake -t %1app curvdemo1.pro
|
||||
cd ..\curvdemo2
|
||||
qmake -t %1app curvdemo2.pro
|
||||
cd ..\data_plot
|
||||
qmake -t %1app data_plot.pro
|
||||
cd ..\dials
|
||||
qmake -t %1app dials.pro
|
||||
cd ..\event_filter
|
||||
qmake -t %1app event_filter.pro
|
||||
cd ..\histogram
|
||||
qmake -t %1app histogram.pro
|
||||
cd ..\radio
|
||||
qmake -t %1app radio.pro
|
||||
cd ..\realtime_plot
|
||||
qmake -t %1app realtime_plot.pro
|
||||
cd ..\simple_plot
|
||||
qmake -t %1app simple_plot.pro
|
||||
cd ..\sliders
|
||||
qmake -t %1app sliders.pro
|
||||
cd ..\spectrogram
|
||||
qmake -t %1app spectrogram.pro
|
||||
cd ..\svgmap
|
||||
qmake -t %1app svgmap.pro
|
||||
cd ..\sysinfo
|
||||
qmake -t %1app sysinfo.pro
|
||||
cd ..\..
|
||||
|
||||
REM EOF
|
||||
@@ -1,9 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
find src -name "qwt_*.h" | xargs grep -l 'signals:' | xargs sed -i "s/signals:/Q_SIGNALS:/"
|
||||
find src -name "qwt_*.h" | xargs grep -l 'slots:' | xargs sed -i "s/signals:/Q_SLOTS:/"
|
||||
find src -name "qwt_*.cpp" | xargs grep -l 'emit ' | xargs sed -i "s/emit /Q_EMIT /"
|
||||
|
||||
echo "CONFIG += no_keywords" >> src/src.pro
|
||||
|
||||
|
||||
@@ -1,299 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Generates a Qwt package from sourceforge svn
|
||||
#
|
||||
# Usage: svn2package.sh [-b|--branch <svn-branch>] [packagename]
|
||||
#
|
||||
|
||||
##########################
|
||||
# usage
|
||||
##########################
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $0 [-b|--branch <svn-branch>] [-pdf] [-qch] [packagename]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
################################
|
||||
# checkout
|
||||
################################
|
||||
|
||||
function checkoutQwt() {
|
||||
|
||||
if [ -x $2 ]
|
||||
then
|
||||
rm -r $2
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
svn -q co https://qwt.svn.sourceforge.net/svnroot/qwt/$1/$2
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Can't access sourceforge SVN"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ "$3" != "$2" ]
|
||||
then
|
||||
rm -rf $3
|
||||
mv $2 $3
|
||||
fi
|
||||
}
|
||||
|
||||
##########################
|
||||
# cleanQwt dirname
|
||||
##########################
|
||||
|
||||
function cleanQwt {
|
||||
|
||||
cd $1
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
find . -name .svn -print | xargs rm -r
|
||||
|
||||
rm TODO
|
||||
rm admin/svn2package.sh
|
||||
|
||||
PROFILES="qwtconfig.pri"
|
||||
for PROFILE in $PROFILES
|
||||
do
|
||||
sed -i -e 's/= debug /= release /' $PROFILE
|
||||
done
|
||||
|
||||
HEADERS=`find . -type f -name '*.h' -print`
|
||||
SOURCES=`find . -type f -name '*.cpp' -print`
|
||||
PROFILES=`find . -type f -name '*.pro' -print`
|
||||
PRIFILES=`find . -type f -name '*.pri' -print`
|
||||
|
||||
for EXPANDFILE in $HEADERS $SOURCES $PROFILES $PRIFILES
|
||||
do
|
||||
expand -4 $EXPANDFILE > $EXPANDFILE.expand
|
||||
mv $EXPANDFILE.expand $EXPANDFILE
|
||||
done
|
||||
|
||||
for SRCFILE in $SOURCES $PROFILES $PRIFILES
|
||||
do
|
||||
sed -i -e '/#warning/d' $SRCFILE
|
||||
done
|
||||
|
||||
sed -i -e "s/\$\$VERSION-svn/$VERSION/" qwtconfig.pri
|
||||
sed -i -e "s/\$\${QwtVersion}-svn/\$\${QwtVersion}/" qwt.prf
|
||||
|
||||
cd - > /dev/null
|
||||
}
|
||||
|
||||
##########################
|
||||
# createDocs dirname
|
||||
##########################
|
||||
|
||||
function createDocs {
|
||||
|
||||
ODIR=`pwd`
|
||||
|
||||
cd $1
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
cp Doxyfile Doxyfile.doc
|
||||
|
||||
sed -i '/PROJECT_NUMBER/d' Doxyfile.doc
|
||||
echo "PROJECT_NUMBER = $VERSION" >> Doxyfile.doc
|
||||
|
||||
if [ $GENERATE_MAN -ne 0 ]
|
||||
then
|
||||
sed -i -e '/GENERATE_MAN/d' -e '/PROJECT_NUMBER/d' Doxyfile.doc
|
||||
echo 'GENERATE_MAN = YES' >> Doxyfile.doc
|
||||
fi
|
||||
|
||||
if [ $GENERATE_PDF -ne 0 ]
|
||||
then
|
||||
# We need LateX for the qwtdoc.pdf
|
||||
|
||||
sed -i -e '/GENERATE_LATEX/d' -e '/GENERATE_MAN/d' -e '/PROJECT_NUMBER/d' Doxyfile.doc
|
||||
echo 'GENERATE_LATEX = YES' >> Doxyfile.doc
|
||||
echo 'GENERATE_MAN = YES' >> Doxyfile.doc
|
||||
echo "PROJECT_NUMBER = $VERSION" >> Doxyfile.doc
|
||||
fi
|
||||
|
||||
if [ $GENERATE_QCH -ne 0 ]
|
||||
then
|
||||
sed -i -e '/GENERATE_HTMLHELP/d' Doxyfile.doc
|
||||
echo "GENERATE_HTMLHELP = YES" >> Doxyfile.doc
|
||||
fi
|
||||
|
||||
cp ../INSTALL ../COPYING ./
|
||||
|
||||
doxygen Doxyfile.doc > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ $GENERATE_QCH -ne 0 ]
|
||||
then
|
||||
doxygen2qthelp --namespace=net.sourceforge.qwt-$VERSION --folder=qwt-$VERSION html/index.hhp qwt-$VERSION.qch
|
||||
rm html/index.hh*
|
||||
fi
|
||||
|
||||
rm Doxyfile.doc Doxygen.log INSTALL COPYING
|
||||
rm -r images
|
||||
|
||||
if [ $GENERATE_PDF -ne 0 ]
|
||||
then
|
||||
cd latex
|
||||
make > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
cd ..
|
||||
mkdir pdf
|
||||
mv latex/refman.pdf pdf/qwtdoc.pdf
|
||||
|
||||
rm -r latex
|
||||
fi
|
||||
|
||||
cd $ODIR
|
||||
}
|
||||
|
||||
##########################
|
||||
# posix2dos filename
|
||||
##########################
|
||||
|
||||
function posix2dos {
|
||||
# At least one unix2dos writes to stdout instead of overwriting the input.
|
||||
# The -q option is always enabled in stdin->stdout mode.
|
||||
unix2dos <$1 >$1.dos
|
||||
mv $1.dos $1
|
||||
}
|
||||
|
||||
##########################
|
||||
# prepare4Win dirname
|
||||
##########################
|
||||
|
||||
function prepare4Win {
|
||||
|
||||
cd $1
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
rm -r doc/man
|
||||
|
||||
# win files, but not uptodate
|
||||
|
||||
BATCHES=`find . -type f -name '*.bat' -print`
|
||||
HEADERS=`find . -type f -name '*.h' -print`
|
||||
SOURCES=`find . -type f -name '*.cpp' -print`
|
||||
PROFILES=`find . -type f -name '*.pro' -print`
|
||||
PRIFILES=`find . -type f -name '*.pri' -print`
|
||||
|
||||
for FILE in $BATCHES $HEADERS $SOURCES $PROFILES $PRIFILES
|
||||
do
|
||||
posix2dos $FILE
|
||||
done
|
||||
|
||||
cd - > /dev/null
|
||||
}
|
||||
|
||||
##########################
|
||||
# prepare4Unix dirname
|
||||
##########################
|
||||
|
||||
function prepare4Unix {
|
||||
|
||||
cd $1
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
rm -rf admin
|
||||
|
||||
cd - > /dev/null
|
||||
}
|
||||
|
||||
##########################
|
||||
# main
|
||||
##########################
|
||||
|
||||
QWTDIR=
|
||||
SVNDIR=trunk
|
||||
BRANCH=qwt
|
||||
VERSION=
|
||||
GENERATE_PDF=0
|
||||
GENERATE_QCH=0
|
||||
GENERATE_MAN=1
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
case "$1" in
|
||||
-h|--help)
|
||||
usage; exit 1 ;;
|
||||
-b|--branch)
|
||||
shift; SVNDIR=branches; BRANCH=$1; shift;;
|
||||
-pdf)
|
||||
GENERATE_PDF=1; shift;;
|
||||
-qch)
|
||||
GENERATE_QCH=1; shift;;
|
||||
*)
|
||||
QWTDIR=qwt-$1 ; VERSION=$1; shift;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$QWTDIR" == "" ]
|
||||
then
|
||||
usage
|
||||
exit 2
|
||||
fi
|
||||
|
||||
TMPDIR=/tmp/$QWTDIR-tmp
|
||||
|
||||
echo -n "checkout to $TMPDIR ... "
|
||||
checkoutQwt $SVNDIR $BRANCH $TMPDIR
|
||||
cleanQwt $TMPDIR
|
||||
echo done
|
||||
|
||||
echo -n "generate documentation ... "
|
||||
createDocs $TMPDIR/doc
|
||||
|
||||
if [ $GENERATE_PDF -ne 0 ]
|
||||
then
|
||||
mv $TMPDIR/doc/pdf/qwtdoc.pdf $QWTDIR.pdf
|
||||
rmdir $TMPDIR/doc/pdf
|
||||
fi
|
||||
|
||||
echo done
|
||||
|
||||
|
||||
DIR=`pwd`
|
||||
echo -n "create packages in $DIR ... "
|
||||
|
||||
cd /tmp
|
||||
|
||||
rm -rf $QWTDIR
|
||||
cp -a $TMPDIR $QWTDIR
|
||||
prepare4Unix $QWTDIR
|
||||
tar cfz $QWTDIR.tgz $QWTDIR
|
||||
tar cfj $QWTDIR.tar.bz2 $QWTDIR
|
||||
|
||||
rm -rf $QWTDIR
|
||||
cp -a $TMPDIR $QWTDIR
|
||||
prepare4Win $QWTDIR
|
||||
zip -r $QWTDIR.zip $QWTDIR > /dev/null
|
||||
|
||||
rm -rf $TMPDIR $QWTDIR
|
||||
|
||||
mv $QWTDIR.tgz $QWTDIR.tar.bz2 $QWTDIR.zip $DIR/
|
||||
echo done
|
||||
|
||||
exit 0
|
||||
4
qwt/designer/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
moc
|
||||
obj
|
||||
plugins
|
||||
resources
|
||||
@@ -1,135 +1,72 @@
|
||||
# -*- mode: sh -*- ###########################
|
||||
################################################################
|
||||
# Qwt Widget Library
|
||||
# Copyright (C) 1997 Josef Wilgen
|
||||
# Copyright (C) 2002 Uwe Rathmann
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the Qwt License, Version 1.0
|
||||
##############################################
|
||||
################################################################
|
||||
|
||||
QWT_ROOT = ..
|
||||
QWT_ROOT = $${PWD}/..
|
||||
|
||||
include ( $${QWT_ROOT}/qwtconfig.pri )
|
||||
include ( $${QWT_ROOT}/qwtbuild.pri )
|
||||
|
||||
contains(CONFIG, QwtDesigner) {
|
||||
contains(QWT_CONFIG, QwtDesigner) {
|
||||
|
||||
CONFIG += warn_on
|
||||
CONFIG += qt designer plugin
|
||||
CONFIG += warn_on
|
||||
|
||||
SUFFIX_STR =
|
||||
TEMPLATE = lib
|
||||
TARGET = qwt_designer_plugin
|
||||
|
||||
VVERSION = $$[QT_VERSION]
|
||||
isEmpty(VVERSION) {
|
||||
DESTDIR = plugins/designer
|
||||
|
||||
# Qt 3
|
||||
debug {
|
||||
SUFFIX_STR = $${DEBUG_SUFFIX}
|
||||
}
|
||||
else {
|
||||
SUFFIX_STR = $${RELEASE_SUFFIX}
|
||||
}
|
||||
INCLUDEPATH += $${QWT_ROOT}/src
|
||||
DEPENDPATH += $${QWT_ROOT}/src
|
||||
|
||||
contains(QWT_CONFIG, QwtFramework) {
|
||||
|
||||
LIBS += -F$${QWT_ROOT}/lib
|
||||
}
|
||||
else {
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
SUFFIX_STR = $${DEBUG_SUFFIX}
|
||||
}
|
||||
else {
|
||||
SUFFIX_STR = $${RELEASE_SUFFIX}
|
||||
LIBS += -L$${QWT_ROOT}/lib
|
||||
}
|
||||
|
||||
IPATH = $${INCLUDEPATH}
|
||||
qtAddLibrary(qwt)
|
||||
INCLUDEPATH = $${IPATH}
|
||||
|
||||
contains(QWT_CONFIG, QwtDll) {
|
||||
|
||||
win32 {
|
||||
DEFINES += QT_DLL QWT_DLL
|
||||
}
|
||||
}
|
||||
|
||||
TEMPLATE = lib
|
||||
MOC_DIR = moc
|
||||
OBJECTS_DIR = obj$${SUFFIX_STR}
|
||||
DESTDIR = plugins/designer
|
||||
INCLUDEPATH += $${QWT_ROOT}/src
|
||||
DEPENDPATH += $${QWT_ROOT}/src
|
||||
!contains(QWT_CONFIG, QwtPlot) {
|
||||
DEFINES += NO_QWT_PLOT
|
||||
}
|
||||
|
||||
LIBNAME = qwt$${SUFFIX_STR}
|
||||
contains(CONFIG, QwtDll) {
|
||||
win32 {
|
||||
DEFINES += QT_DLL QWT_DLL
|
||||
LIBNAME = $${LIBNAME}$${VER_MAJ}
|
||||
}
|
||||
}
|
||||
!contains(QWT_CONFIG, QwtWidgets) {
|
||||
DEFINES += NO_QWT_WIDGETS
|
||||
}
|
||||
|
||||
!contains(CONFIG, QwtPlot) {
|
||||
DEFINES += NO_QWT_PLOT
|
||||
}
|
||||
HEADERS += qwt_designer_plugin.h
|
||||
SOURCES += qwt_designer_plugin.cpp
|
||||
|
||||
!contains(CONFIG, QwtWidgets) {
|
||||
DEFINES += NO_QWT_WIDGETS
|
||||
}
|
||||
contains(QWT_CONFIG, QwtPlot) {
|
||||
|
||||
unix:LIBS += -L$${QWT_ROOT}/lib -l$${LIBNAME}
|
||||
win32-msvc:LIBS += $${QWT_ROOT}/lib/$${LIBNAME}.lib
|
||||
win32-msvc.net:LIBS += $${QWT_ROOT}/lib/$${LIBNAME}.lib
|
||||
win32-msvc2002:LIBS += $${QWT_ROOT}/lib/$${LIBNAME}.lib
|
||||
win32-msvc2003:LIBS += $${QWT_ROOT}/lib/$${LIBNAME}.lib
|
||||
win32-msvc2005:LIBS += $${QWT_ROOT}/lib/$${LIBNAME}.lib
|
||||
win32-msvc2008:LIBS += $${QWT_ROOT}/lib/$${LIBNAME}.lib
|
||||
win32-g++:LIBS += -L$${QWT_ROOT}/lib -l$${LIBNAME}
|
||||
HEADERS += qwt_designer_plotdialog.h
|
||||
SOURCES += qwt_designer_plotdialog.cpp
|
||||
}
|
||||
|
||||
# isEmpty(QT_VERSION) does not work with Qt-4.1.0/MinGW
|
||||
RESOURCES += qwt_designer_plugin.qrc
|
||||
|
||||
VVERSION = $$[QT_VERSION]
|
||||
isEmpty(VVERSION) {
|
||||
# Qt 3
|
||||
TARGET = qwtplugin$${SUFFIX_STR}
|
||||
CONFIG += qt plugin
|
||||
|
||||
UI_DIR = ui
|
||||
|
||||
HEADERS += qwtplugin.h
|
||||
SOURCES += qwtplugin.cpp
|
||||
|
||||
target.path = $(QTDIR)/plugins/designer
|
||||
INSTALLS += target
|
||||
|
||||
IMAGES += \
|
||||
pixmaps/qwtplot.png \
|
||||
pixmaps/qwtanalogclock.png \
|
||||
pixmaps/qwtcounter.png \
|
||||
pixmaps/qwtcompass.png \
|
||||
pixmaps/qwtdial.png \
|
||||
pixmaps/qwtknob.png \
|
||||
pixmaps/qwtscale.png \
|
||||
pixmaps/qwtslider.png \
|
||||
pixmaps/qwtthermo.png \
|
||||
pixmaps/qwtwheel.png \
|
||||
pixmaps/qwtwidget.png
|
||||
|
||||
} else {
|
||||
|
||||
# Qt 4
|
||||
|
||||
TARGET = qwt_designer_plugin$${SUFFIX_STR}
|
||||
CONFIG += qt designer plugin
|
||||
|
||||
RCC_DIR = resources
|
||||
|
||||
HEADERS += \
|
||||
qwt_designer_plugin.h
|
||||
|
||||
SOURCES += \
|
||||
qwt_designer_plugin.cpp
|
||||
|
||||
contains(CONFIG, QwtPlot) {
|
||||
|
||||
HEADERS += \
|
||||
qwt_designer_plotdialog.h
|
||||
|
||||
SOURCES += \
|
||||
qwt_designer_plotdialog.cpp
|
||||
}
|
||||
|
||||
RESOURCES += \
|
||||
qwt_designer_plugin.qrc
|
||||
|
||||
target.path = $$[QT_INSTALL_PLUGINS]/designer
|
||||
INSTALLS += target
|
||||
}
|
||||
target.path = $${QWT_INSTALL_PLUGINS}
|
||||
INSTALLS += target
|
||||
}
|
||||
else {
|
||||
TEMPLATE = subdirs # do nothing
|
||||
TEMPLATE = subdirs # do nothing
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
using namespace QwtDesignerPlugin;
|
||||
|
||||
PlotDialog::PlotDialog(const QString &properties, QWidget *parent):
|
||||
PlotDialog::PlotDialog(const QString &properties, QWidget *parent):
|
||||
QDialog(parent)
|
||||
{
|
||||
setWindowTitle("Plot Properties");
|
||||
@@ -39,4 +39,3 @@ PlotDialog::PlotDialog(const QString &properties, QWidget *parent):
|
||||
mainLayout->addLayout(buttonLayout);
|
||||
setLayout(mainLayout);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,27 +10,19 @@
|
||||
#ifndef QWT_DESIGNER_PLOTDIALOG_H
|
||||
#define QWT_DESIGNER_PLOTDIALOG_H
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
#ifdef __GNUC__
|
||||
#error This code is Qt4 only
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace QwtDesignerPlugin
|
||||
{
|
||||
|
||||
class PlotDialog: public QDialog
|
||||
class PlotDialog: public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PlotDialog(const QString &properties, QWidget *parent = NULL);
|
||||
|
||||
signals:
|
||||
Q_SIGNALS:
|
||||
void edited(const QString&);
|
||||
};
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
using namespace QwtDesignerPlugin;
|
||||
|
||||
CustomWidgetInterface::CustomWidgetInterface(QObject *parent):
|
||||
CustomWidgetInterface::CustomWidgetInterface(QObject *parent):
|
||||
QObject(parent),
|
||||
d_isInitialized(false)
|
||||
{
|
||||
@@ -116,13 +116,13 @@ void CustomWidgetInterface::initialize(
|
||||
|
||||
#ifndef NO_QWT_PLOT
|
||||
|
||||
PlotInterface::PlotInterface(QObject *parent):
|
||||
PlotInterface::PlotInterface(QObject *parent):
|
||||
CustomWidgetInterface(parent)
|
||||
{
|
||||
d_name = "QwtPlot";
|
||||
d_include = "qwt_plot.h";
|
||||
d_icon = QPixmap(":/pixmaps/qwtplot.png");
|
||||
d_domXml =
|
||||
d_domXml =
|
||||
"<widget class=\"QwtPlot\" name=\"qwtPlot\">\n"
|
||||
" <property name=\"geometry\">\n"
|
||||
" <rect>\n"
|
||||
@@ -144,13 +144,13 @@ QWidget *PlotInterface::createWidget(QWidget *parent)
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
|
||||
AnalogClockInterface::AnalogClockInterface(QObject *parent):
|
||||
AnalogClockInterface::AnalogClockInterface(QObject *parent):
|
||||
CustomWidgetInterface(parent)
|
||||
{
|
||||
d_name = "QwtAnalogClock";
|
||||
d_include = "qwt_analog_clock.h";
|
||||
d_icon = QPixmap(":/pixmaps/qwtanalogclock.png");
|
||||
d_domXml =
|
||||
d_domXml =
|
||||
"<widget class=\"QwtAnalogClock\" name=\"AnalogClock\">\n"
|
||||
" <property name=\"geometry\">\n"
|
||||
" <rect>\n"
|
||||
@@ -175,13 +175,13 @@ QWidget *AnalogClockInterface::createWidget(QWidget *parent)
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
|
||||
CompassInterface::CompassInterface(QObject *parent):
|
||||
CompassInterface::CompassInterface(QObject *parent):
|
||||
CustomWidgetInterface(parent)
|
||||
{
|
||||
d_name = "QwtCompass";
|
||||
d_include = "qwt_compass.h";
|
||||
d_icon = QPixmap(":/pixmaps/qwtcompass.png");
|
||||
d_domXml =
|
||||
d_domXml =
|
||||
"<widget class=\"QwtCompass\" name=\"Compass\">\n"
|
||||
" <property name=\"geometry\">\n"
|
||||
" <rect>\n"
|
||||
@@ -206,13 +206,13 @@ QWidget *CompassInterface::createWidget(QWidget *parent)
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
|
||||
CounterInterface::CounterInterface(QObject *parent):
|
||||
CounterInterface::CounterInterface(QObject *parent):
|
||||
CustomWidgetInterface(parent)
|
||||
{
|
||||
d_name = "QwtCounter";
|
||||
d_include = "qwt_counter.h";
|
||||
d_icon = QPixmap(":/pixmaps/qwtcounter.png");
|
||||
d_domXml =
|
||||
d_domXml =
|
||||
"<widget class=\"QwtCounter\" name=\"Counter\">\n"
|
||||
"</widget>\n";
|
||||
}
|
||||
@@ -226,13 +226,13 @@ QWidget *CounterInterface::createWidget(QWidget *parent)
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
|
||||
DialInterface::DialInterface(QObject *parent):
|
||||
DialInterface::DialInterface(QObject *parent):
|
||||
CustomWidgetInterface(parent)
|
||||
{
|
||||
d_name = "QwtDial";
|
||||
d_include = "qwt_dial.h";
|
||||
d_icon = QPixmap(":/pixmaps/qwtdial.png");
|
||||
d_domXml =
|
||||
d_domXml =
|
||||
"<widget class=\"QwtDial\" name=\"Dial\">\n"
|
||||
" <property name=\"geometry\">\n"
|
||||
" <rect>\n"
|
||||
@@ -257,13 +257,13 @@ QWidget *DialInterface::createWidget(QWidget *parent)
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
|
||||
KnobInterface::KnobInterface(QObject *parent):
|
||||
KnobInterface::KnobInterface(QObject *parent):
|
||||
CustomWidgetInterface(parent)
|
||||
{
|
||||
d_name = "QwtKnob";
|
||||
d_include = "qwt_knob.h";
|
||||
d_icon = QPixmap(":/pixmaps/qwtknob.png");
|
||||
d_domXml =
|
||||
d_domXml =
|
||||
"<widget class=\"QwtKnob\" name=\"Knob\">\n"
|
||||
" <property name=\"geometry\">\n"
|
||||
" <rect>\n"
|
||||
@@ -285,13 +285,13 @@ QWidget *KnobInterface::createWidget(QWidget *parent)
|
||||
|
||||
#ifndef NO_QWT_PLOT
|
||||
|
||||
ScaleWidgetInterface::ScaleWidgetInterface(QObject *parent):
|
||||
ScaleWidgetInterface::ScaleWidgetInterface(QObject *parent):
|
||||
CustomWidgetInterface(parent)
|
||||
{
|
||||
d_name = "QwtScaleWidget";
|
||||
d_include = "qwt_scale_widget.h";
|
||||
d_icon = QPixmap(":/pixmaps/qwtscale.png");
|
||||
d_domXml =
|
||||
d_domXml =
|
||||
"<widget class=\"QwtScaleWidget\" name=\"ScaleWidget\">\n"
|
||||
"</widget>\n";
|
||||
}
|
||||
@@ -305,13 +305,13 @@ QWidget *ScaleWidgetInterface::createWidget(QWidget *parent)
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
|
||||
SliderInterface::SliderInterface(QObject *parent):
|
||||
SliderInterface::SliderInterface(QObject *parent):
|
||||
CustomWidgetInterface(parent)
|
||||
{
|
||||
d_name = "QwtSlider";
|
||||
d_include = "qwt_slider.h";
|
||||
d_icon = QPixmap(":/pixmaps/qwtslider.png");
|
||||
d_domXml =
|
||||
d_domXml =
|
||||
"<widget class=\"QwtSlider\" name=\"Slider\">\n"
|
||||
" <property name=\"geometry\">\n"
|
||||
" <rect>\n"
|
||||
@@ -337,18 +337,14 @@ QWidget *SliderInterface::createWidget(QWidget *parent)
|
||||
|
||||
#endif
|
||||
|
||||
TextLabelInterface::TextLabelInterface(QObject *parent):
|
||||
TextLabelInterface::TextLabelInterface(QObject *parent):
|
||||
CustomWidgetInterface(parent)
|
||||
{
|
||||
d_name = "QwtTextLabel";
|
||||
d_include = "qwt_text_label.h";
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning QwtTextLabel icon is missing
|
||||
#endif
|
||||
|
||||
d_icon = QPixmap(":/pixmaps/qwtwidget.png");
|
||||
d_domXml =
|
||||
d_domXml =
|
||||
"<widget class=\"QwtTextLabel\" name=\"TextLabel\">\n"
|
||||
" <property name=\"geometry\">\n"
|
||||
" <rect>\n"
|
||||
@@ -368,13 +364,13 @@ QWidget *TextLabelInterface::createWidget(QWidget *parent)
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
|
||||
ThermoInterface::ThermoInterface(QObject *parent):
|
||||
ThermoInterface::ThermoInterface(QObject *parent):
|
||||
CustomWidgetInterface(parent)
|
||||
{
|
||||
d_name = "QwtThermo";
|
||||
d_include = "qwt_thermo.h";
|
||||
d_icon = QPixmap(":/pixmaps/qwtthermo.png");
|
||||
d_domXml =
|
||||
d_domXml =
|
||||
"<widget class=\"QwtThermo\" name=\"Thermo\">\n"
|
||||
"</widget>\n";
|
||||
}
|
||||
@@ -388,13 +384,13 @@ QWidget *ThermoInterface::createWidget(QWidget *parent)
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
|
||||
WheelInterface::WheelInterface(QObject *parent):
|
||||
WheelInterface::WheelInterface(QObject *parent):
|
||||
CustomWidgetInterface(parent)
|
||||
{
|
||||
d_name = "QwtWheel";
|
||||
d_include = "qwt_wheel.h";
|
||||
d_icon = QPixmap(":/pixmaps/qwtwheel.png");
|
||||
d_domXml =
|
||||
d_domXml =
|
||||
"<widget class=\"QwtWheel\" name=\"Wheel\">\n"
|
||||
"</widget>\n";
|
||||
}
|
||||
@@ -406,8 +402,8 @@ QWidget *WheelInterface::createWidget(QWidget *parent)
|
||||
|
||||
#endif
|
||||
|
||||
CustomWidgetCollectionInterface::CustomWidgetCollectionInterface(
|
||||
QObject *parent):
|
||||
CustomWidgetCollectionInterface::CustomWidgetCollectionInterface(
|
||||
QObject *parent):
|
||||
QObject(parent)
|
||||
{
|
||||
#ifndef NO_QWT_PLOT
|
||||
@@ -429,13 +425,13 @@ CustomWidgetCollectionInterface::CustomWidgetCollectionInterface(
|
||||
d_plugins.append(new TextLabelInterface(this));
|
||||
}
|
||||
|
||||
QList<QDesignerCustomWidgetInterface*>
|
||||
QList<QDesignerCustomWidgetInterface*>
|
||||
CustomWidgetCollectionInterface::customWidgets(void) const
|
||||
{
|
||||
return d_plugins;
|
||||
}
|
||||
|
||||
TaskMenuFactory::TaskMenuFactory(QExtensionManager *parent):
|
||||
TaskMenuFactory::TaskMenuFactory(QExtensionManager *parent):
|
||||
QExtensionFactory(parent)
|
||||
{
|
||||
}
|
||||
@@ -460,11 +456,11 @@ QObject *TaskMenuFactory::createExtension(
|
||||
|
||||
|
||||
TaskMenuExtension::TaskMenuExtension(QWidget *widget, QObject *parent):
|
||||
QObject(parent),
|
||||
QObject(parent),
|
||||
d_widget(widget)
|
||||
{
|
||||
d_editAction = new QAction(tr("Edit Qwt Attributes ..."), this);
|
||||
connect(d_editAction, SIGNAL(triggered()),
|
||||
connect(d_editAction, SIGNAL(triggered()),
|
||||
this, SLOT(editProperties()));
|
||||
}
|
||||
|
||||
@@ -492,7 +488,7 @@ void TaskMenuExtension::editProperties()
|
||||
if ( qobject_cast<QwtPlot*>(d_widget) )
|
||||
{
|
||||
PlotDialog dialog(properties);
|
||||
connect(&dialog, SIGNAL(edited(const QString&)),
|
||||
connect(&dialog, SIGNAL(edited(const QString&)),
|
||||
SLOT(applyProperties(const QString &)));
|
||||
(void)dialog.exec();
|
||||
return;
|
||||
|
||||
@@ -10,16 +10,6 @@
|
||||
#ifndef QWT_DESIGNER_PLUGIN_H
|
||||
#define QWT_DESIGNER_PLUGIN_H
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
|
||||
#ifdef __GNUC__
|
||||
#error This code is Qt4 only
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include <QDesignerCustomWidgetInterface>
|
||||
#include <QDesignerTaskMenuExtension>
|
||||
#include <QExtensionFactory>
|
||||
@@ -27,7 +17,7 @@
|
||||
namespace QwtDesignerPlugin
|
||||
{
|
||||
|
||||
class CustomWidgetInterface: public QObject,
|
||||
class CustomWidgetInterface: public QObject,
|
||||
public QDesignerCustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -49,11 +39,11 @@ public:
|
||||
virtual void initialize(QDesignerFormEditorInterface *);
|
||||
|
||||
protected:
|
||||
QString d_name;
|
||||
QString d_include;
|
||||
QString d_toolTip;
|
||||
QString d_whatsThis;
|
||||
QString d_domXml;
|
||||
QString d_name;
|
||||
QString d_include;
|
||||
QString d_toolTip;
|
||||
QString d_whatsThis;
|
||||
QString d_domXml;
|
||||
QString d_codeTemplate;
|
||||
QIcon d_icon;
|
||||
|
||||
@@ -77,7 +67,7 @@ private:
|
||||
};
|
||||
|
||||
#ifndef NO_QWT_PLOT
|
||||
class PlotInterface: public CustomWidgetInterface
|
||||
class PlotInterface: public CustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
@@ -89,7 +79,7 @@ public:
|
||||
#endif
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
class AnalogClockInterface: public CustomWidgetInterface
|
||||
class AnalogClockInterface: public CustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
@@ -101,7 +91,7 @@ public:
|
||||
#endif
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
class CompassInterface: public CustomWidgetInterface
|
||||
class CompassInterface: public CustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
@@ -113,7 +103,7 @@ public:
|
||||
#endif
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
class CounterInterface: public CustomWidgetInterface
|
||||
class CounterInterface: public CustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
@@ -125,7 +115,7 @@ public:
|
||||
#endif
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
class DialInterface: public CustomWidgetInterface
|
||||
class DialInterface: public CustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
@@ -137,7 +127,7 @@ public:
|
||||
#endif
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
class KnobInterface: public CustomWidgetInterface
|
||||
class KnobInterface: public CustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
@@ -149,7 +139,7 @@ public:
|
||||
#endif
|
||||
|
||||
#ifndef NO_QWT_PLOT
|
||||
class ScaleWidgetInterface: public CustomWidgetInterface
|
||||
class ScaleWidgetInterface: public CustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
@@ -161,7 +151,7 @@ public:
|
||||
#endif
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
class SliderInterface: public CustomWidgetInterface
|
||||
class SliderInterface: public CustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
@@ -172,7 +162,7 @@ public:
|
||||
};
|
||||
#endif
|
||||
|
||||
class TextLabelInterface: public CustomWidgetInterface
|
||||
class TextLabelInterface: public CustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
@@ -183,7 +173,7 @@ public:
|
||||
};
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
class ThermoInterface: public CustomWidgetInterface
|
||||
class ThermoInterface: public CustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
@@ -195,7 +185,7 @@ public:
|
||||
#endif
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
class WheelInterface: public CustomWidgetInterface
|
||||
class WheelInterface: public CustomWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
@@ -214,7 +204,7 @@ public:
|
||||
TaskMenuFactory(QExtensionManager *parent = 0);
|
||||
|
||||
protected:
|
||||
QObject *createExtension(QObject *object,
|
||||
QObject *createExtension(QObject *object,
|
||||
const QString &iid, QObject *parent) const;
|
||||
};
|
||||
|
||||
@@ -230,7 +220,7 @@ public:
|
||||
QAction *preferredEditAction() const;
|
||||
QList<QAction *> taskActions() const;
|
||||
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void editProperties();
|
||||
void applyProperties(const QString &);
|
||||
|
||||
|
||||
@@ -1,202 +0,0 @@
|
||||
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
|
||||
* Qwt Widget Library
|
||||
* Copyright (C) 1997 Josef Wilgen
|
||||
* Copyright (C) 2002 Uwe Rathmann
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the Qwt License, Version 1.0
|
||||
*****************************************************************************/
|
||||
|
||||
#if defined(_MSC_VER) /* MSVC Compiler */
|
||||
#pragma warning ( disable : 4786 )
|
||||
#endif
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <qvaluelist.h>
|
||||
#include <qmime.h>
|
||||
#include <qdragobject.h>
|
||||
|
||||
#include "qwtplugin.h"
|
||||
#include "qwt_text_label.h"
|
||||
|
||||
#ifndef NO_QWT_PLOT
|
||||
#include "qwt_plot.h"
|
||||
#include "qwt_scale_widget.h"
|
||||
#endif
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
#include "qwt_counter.h"
|
||||
#include "qwt_wheel.h"
|
||||
#include "qwt_thermo.h"
|
||||
#include "qwt_knob.h"
|
||||
#include "qwt_slider.h"
|
||||
#include "qwt_analog_clock.h"
|
||||
#include "qwt_compass.h"
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
struct Entry
|
||||
{
|
||||
Entry() {}
|
||||
Entry( QString _classname, QString _header, QString _pixmap,
|
||||
QString _tooltip, QString _whatshis):
|
||||
classname(_classname),
|
||||
header(_header),
|
||||
pixmap(_pixmap),
|
||||
tooltip(_tooltip),
|
||||
whatshis(_whatshis)
|
||||
{}
|
||||
|
||||
QString classname;
|
||||
QString header;
|
||||
QString pixmap;
|
||||
QString tooltip;
|
||||
QString whatshis;
|
||||
};
|
||||
|
||||
QValueList<Entry> vec;
|
||||
|
||||
const Entry *entry(const QString& str)
|
||||
{
|
||||
for ( uint i = 0; i < vec.count(); i++ )
|
||||
{
|
||||
if (str == vec[i].classname)
|
||||
return &vec[i];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
QwtPlugin::QwtPlugin()
|
||||
{
|
||||
#ifndef NO_QWT_PLOT
|
||||
vec.append(Entry("QwtPlot", "qwt_plot.h",
|
||||
"qwtplot.png", "QwtPlot", "whatsthis"));
|
||||
vec.append(Entry("QwtScaleWidget", "qwt_scale_widget.h",
|
||||
"qwtscale.png", "QwtScaleWidget", "whatsthis"));
|
||||
#endif
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
vec.append(Entry("QwtAnalogClock", "qwt_analog_clock.h",
|
||||
"qwtanalogclock.png", "QwtAnalogClock", "whatsthis"));
|
||||
vec.append(Entry("QwtCompass", "qwt_compass.h",
|
||||
"qwtcompass.png", "QwtCompass", "whatsthis"));
|
||||
vec.append(Entry("QwtCounter", "qwt_counter.h",
|
||||
"qwtcounter.png", "QwtCounter", "whatsthis"));
|
||||
vec.append(Entry("QwtDial", "qwt_dial.h",
|
||||
"qwtdial.png", "QwtDial", "whatsthis"));
|
||||
vec.append(Entry("QwtKnob", "qwt_knob.h",
|
||||
"qwtknob.png", "QwtKnob", "whatsthis"));
|
||||
vec.append(Entry("QwtSlider", "qwt_slider.h",
|
||||
"qwtslider.png", "QwtSlider", "whatsthis"));
|
||||
vec.append(Entry("QwtThermo", "qwt_thermo.h",
|
||||
"qwtthermo.png", "QwtThermo", "whatsthis"));
|
||||
vec.append(Entry("QwtWheel", "qwt_wheel.h",
|
||||
"qwtwheel.png", "QwtWheel", "whatsthis"));
|
||||
#endif
|
||||
|
||||
vec.append(Entry("QwtTextLabel", "qwt_text_label.h",
|
||||
"qwtwidget.png", "QwtTextLabel", "whatsthis"));
|
||||
|
||||
}
|
||||
|
||||
QWidget* QwtPlugin::create(const QString &key,
|
||||
QWidget* parent, const char* name)
|
||||
{
|
||||
QWidget *w = NULL;
|
||||
|
||||
#ifndef NO_QWT_PLOT
|
||||
if ( key == "QwtPlot" )
|
||||
w = new QwtPlot( parent );
|
||||
else if ( key == "QwtScaleWidget" )
|
||||
w = new QwtScaleWidget( QwtScaleDraw::LeftScale, parent);
|
||||
#endif
|
||||
|
||||
#ifndef NO_QWT_WIDGETS
|
||||
if ( key == "QwtAnalogClock" )
|
||||
w = new QwtAnalogClock( parent);
|
||||
else if ( key == "QwtCounter" )
|
||||
w = new QwtCounter( parent);
|
||||
else if ( key == "QwtCompass" )
|
||||
w = new QwtCompass( parent);
|
||||
else if ( key == "QwtDial" )
|
||||
w = new QwtDial( parent);
|
||||
else if ( key == "QwtWheel" )
|
||||
w = new QwtWheel( parent);
|
||||
else if ( key == "QwtThermo" )
|
||||
w = new QwtThermo( parent);
|
||||
else if ( key == "QwtKnob" )
|
||||
w = new QwtKnob( parent);
|
||||
else if ( key == "QwtSlider" )
|
||||
w = new QwtSlider( parent);
|
||||
#endif
|
||||
|
||||
if ( key == "QwtTextLabel" )
|
||||
w = new QwtTextLabel( parent);
|
||||
|
||||
if ( w )
|
||||
w->setName(name);
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
QStringList QwtPlugin::keys() const
|
||||
{
|
||||
QStringList list;
|
||||
|
||||
for (unsigned i = 0; i < vec.count(); i++)
|
||||
list += vec[i].classname;
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
QString QwtPlugin::group( const QString& feature ) const
|
||||
{
|
||||
if (entry(feature) != NULL )
|
||||
return QString("Qwt");
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
QIconSet QwtPlugin::iconSet( const QString& pmap) const
|
||||
{
|
||||
QString pixmapKey("qwtwidget.png");
|
||||
if (entry(pmap) != NULL )
|
||||
pixmapKey = entry(pmap)->pixmap;
|
||||
|
||||
const QMimeSource *ms =
|
||||
QMimeSourceFactory::defaultFactory()->data(pixmapKey);
|
||||
|
||||
QPixmap pixmap;
|
||||
QImageDrag::decode(ms, pixmap);
|
||||
|
||||
return QIconSet(pixmap);
|
||||
}
|
||||
|
||||
QString QwtPlugin::includeFile( const QString& feature ) const
|
||||
{
|
||||
if (entry(feature) != NULL)
|
||||
return entry(feature)->header;
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
QString QwtPlugin::toolTip( const QString& feature ) const
|
||||
{
|
||||
if (entry(feature) != NULL )
|
||||
return entry(feature)->tooltip;
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
QString QwtPlugin::whatsThis( const QString& feature ) const
|
||||
{
|
||||
if (entry(feature) != NULL)
|
||||
return entry(feature)->whatshis;
|
||||
return QString::null;
|
||||
}
|
||||
|
||||
bool QwtPlugin::isContainer( const QString& ) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Q_EXPORT_PLUGIN( QwtPlugin )
|
||||
@@ -1,42 +0,0 @@
|
||||
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
|
||||
* Qwt Widget Library
|
||||
* Copyright (C) 1997 Josef Wilgen
|
||||
* Copyright (C) 2002 Uwe Rathmann
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the Qwt License, Version 1.0
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef QWT_PLUGIN_H
|
||||
#define QWT_PLUGIN_H
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
|
||||
#ifdef __GNUC__
|
||||
#error This code is Qt3 only
|
||||
#endif
|
||||
|
||||
This code is Qt3 only
|
||||
|
||||
#endif
|
||||
|
||||
#include <qwidgetplugin.h>
|
||||
|
||||
class QT_WIDGET_PLUGIN_EXPORT QwtPlugin: public QWidgetPlugin
|
||||
{
|
||||
public:
|
||||
QwtPlugin();
|
||||
|
||||
QStringList keys() const;
|
||||
QWidget* create( const QString &classname, QWidget* parent = 0, const char* name = 0 );
|
||||
QString group( const QString& ) const;
|
||||
QIconSet iconSet( const QString& ) const;
|
||||
QString includeFile( const QString& ) const;
|
||||
QString toolTip( const QString& ) const;
|
||||
QString whatsThis( const QString& ) const;
|
||||
bool isContainer( const QString& ) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
615
qwt/designer/resources/qrc_qwt_designer_plugin.cpp
Normal file
@@ -0,0 +1,615 @@
|
||||
/****************************************************************************
|
||||
** Resource object code
|
||||
**
|
||||
** Created: Thu Feb 2 22:55:24 2012
|
||||
** by: The Resource Compiler for Qt version 4.7.4
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
static const unsigned char qt_resource_data[] = {
|
||||
// /Users/grauser/Documents/DEV/Qt/qwt-6.0.1/designer/pixmaps/qwtslider.png
|
||||
0x0,0x0,0x1,0xc4,
|
||||
0x89,
|
||||
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
|
||||
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x6,0x0,0x0,0x0,0xc4,0xb4,0x6c,0x3b,
|
||||
0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xd2,0xa,0x9,0x13,0xa,0x30,0x66,
|
||||
0xcc,0x85,0xa0,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x12,0x0,
|
||||
0x0,0xb,0x12,0x1,0xd2,0xdd,0x7e,0xfc,0x0,0x0,0x0,0x4,0x67,0x41,0x4d,0x41,
|
||||
0x0,0x0,0xb1,0x8f,0xb,0xfc,0x61,0x5,0x0,0x0,0x1,0x53,0x49,0x44,0x41,0x54,
|
||||
0x78,0xda,0x63,0x60,0x18,0x5,0xc3,0xf,0xfc,0x47,0x2,0x75,0x4b,0xba,0xfe,0x93,
|
||||
0xaa,0x9f,0x9,0x9f,0xe4,0xa7,0x6f,0x9f,0x18,0x8e,0x5c,0x3e,0x2,0x66,0xfb,0x54,
|
||||
0x5,0x92,0x64,0x38,0x13,0x29,0x8a,0x7,0x85,0xc1,0x2c,0x30,0x6,0xa3,0x3,0xdb,
|
||||
0xff,0xff,0xc,0xff,0x21,0x76,0x31,0x62,0x2a,0x3c,0x7d,0xed,0x24,0x3,0x83,0x23,
|
||||
0x3b,0xee,0xe0,0x60,0x62,0x66,0xe0,0x16,0x55,0x64,0xf8,0xba,0xe2,0x2a,0x23,0xdc,
|
||||
0x60,0x26,0xa0,0xa1,0xff,0x18,0x99,0x18,0xf8,0x85,0x14,0x18,0xd8,0xd8,0x79,0x19,
|
||||
0x18,0x81,0x8a,0xb0,0x1,0x31,0x69,0x43,0x1c,0xa6,0x32,0x32,0x30,0xb1,0xb0,0x31,
|
||||
0xbc,0xf8,0xf0,0x88,0x41,0xa2,0x2a,0xe1,0xff,0x8b,0xb6,0x5,0x8c,0x60,0x83,0xff,
|
||||
0x31,0x32,0x32,0x8,0x89,0xaa,0x32,0x18,0x5a,0xa7,0x30,0xe8,0x2a,0x6a,0x3,0x2d,
|
||||
0x67,0xc1,0xd0,0xca,0x2d,0xac,0xcc,0x10,0x10,0xd4,0x8c,0xdd,0xb1,0x40,0x87,0xbc,
|
||||
0xff,0xf5,0x9f,0xe1,0xee,0xc5,0x5,0xc,0x92,0x2,0x22,0xc,0xcb,0x61,0x2e,0xe6,
|
||||
0x16,0x53,0x66,0x78,0xf7,0xf3,0x13,0xc3,0xb1,0xb3,0x8b,0x19,0x98,0xbf,0x1a,0x33,
|
||||
0xb0,0xb3,0xb0,0x32,0x30,0x78,0xd9,0xa3,0x68,0xfe,0xfa,0xe9,0x29,0xc3,0xed,0xab,
|
||||
0x6b,0xb0,0x1a,0xcc,0xc9,0xce,0xc1,0xa0,0x2c,0x2e,0xcb,0xe0,0xe0,0x18,0xc8,0x20,
|
||||
0x22,0x2a,0x7,0x34,0xb8,0xb,0x62,0xf0,0xd7,0x95,0xd7,0x18,0x25,0x2a,0xe3,0xfe,
|
||||
0x4b,0xfc,0xfb,0xce,0x20,0x21,0x20,0xcc,0xc0,0xce,0xca,0x86,0xa1,0x99,0x9d,0x95,
|
||||
0x9d,0x41,0x42,0x50,0x4,0xab,0xc1,0x1c,0x40,0x39,0x61,0x1e,0x7e,0x6,0x69,0x49,
|
||||
0x25,0x6,0x27,0x15,0x6d,0x46,0x48,0xe0,0xe0,0x0,0xa0,0x8c,0x1,0x4a,0xc7,0x97,
|
||||
0xee,0x5e,0x62,0xd8,0x7d,0xe9,0x38,0xc3,0xb9,0x6b,0xc7,0x19,0xb6,0xb4,0xad,0xc7,
|
||||
0xa9,0x1e,0x23,0x78,0x88,0x55,0x48,0x2a,0xa0,0x7d,0x3a,0x46,0x7,0x69,0x53,0x2b,
|
||||
0x28,0x32,0x18,0x6f,0x98,0xa1,0x97,0xf,0xa4,0x84,0xf1,0x28,0x80,0x3,0x0,0xb9,
|
||||
0xf0,0x60,0x59,0x7a,0xd9,0xd8,0x20,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,
|
||||
0x42,0x60,0x82,
|
||||
// /Users/grauser/Documents/DEV/Qt/qwt-6.0.1/designer/pixmaps/qwtdial.png
|
||||
0x0,0x0,0x1,0xb1,
|
||||
0x89,
|
||||
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
|
||||
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x2,0x0,0x0,0x0,0x4b,0xd6,0xfb,0x6c,
|
||||
0x0,0x0,0x1,0x78,0x49,0x44,0x41,0x54,0x78,0x9c,0x9d,0x94,0x31,0x8e,0xc2,0x30,
|
||||
0x10,0x45,0x7,0x67,0x63,0x8d,0x81,0x2b,0x50,0x86,0x3,0xa4,0xa6,0xe2,0x0,0xf4,
|
||||
0x5c,0x82,0x9e,0x1b,0x70,0x83,0xb4,0x91,0xb8,0x41,0x2a,0x9a,0x70,0x84,0xa4,0x81,
|
||||
0xa,0x21,0x21,0x51,0x50,0x50,0x23,0x41,0x50,0xa4,0x2d,0x7e,0xd6,0xc,0xe,0xc9,
|
||||
0x66,0xf7,0x57,0x96,0x3d,0xff,0x79,0x3c,0xc9,0x4c,0x2f,0xcb,0x32,0x12,0x3a,0x1c,
|
||||
0xe,0xd4,0xaa,0x20,0x8,0x9c,0x9d,0xaf,0x8f,0xfe,0x3c,0xcf,0x99,0xd9,0x18,0xe3,
|
||||
0x79,0x9e,0xc,0x18,0x8d,0x46,0x88,0x91,0xa0,0x9e,0xcd,0x2,0x67,0x69,0x9a,0x6a,
|
||||
0xad,0x8d,0x31,0xf3,0xf9,0xdc,0xb9,0x6d,0xbb,0xdd,0x5a,0x90,0xa4,0x54,0x8,0xf8,
|
||||
0x93,0x24,0xf1,0x7d,0x7f,0xb1,0x58,0x48,0x67,0x18,0x86,0xf2,0xb1,0x0,0x49,0x8a,
|
||||
0xb2,0xfe,0xf5,0x7a,0x5d,0x14,0x5,0xfc,0x61,0x18,0x5a,0x8f,0x53,0xac,0xe9,0x74,
|
||||
0x4a,0x44,0xe7,0xf3,0xd9,0x1a,0x15,0xe,0xa2,0x28,0x2a,0x8a,0x62,0xb9,0x5c,0x3a,
|
||||
0xb6,0x44,0xb0,0x2c,0xd7,0xa1,0x28,0x90,0xca,0xb2,0x5c,0xad,0x56,0xd4,0x2a,0x99,
|
||||
0xe,0x28,0x90,0x22,0xa2,0x38,0x8e,0x8d,0x31,0x4e,0xfe,0x2d,0x42,0x98,0xd6,0xfa,
|
||||
0x7a,0xbd,0x56,0x8,0x63,0xc,0x52,0x70,0x9e,0xdd,0x9e,0xce,0x64,0x32,0xc1,0xc5,
|
||||
0x15,0xa2,0x29,0x7a,0x96,0x65,0x49,0x73,0x6a,0xcc,0x5c,0x21,0x7c,0xdf,0xef,0x72,
|
||||
0x79,0x5d,0x30,0x2a,0x22,0x1a,0xe,0x87,0xd4,0xb9,0x10,0x10,0x82,0x7,0x83,0x41,
|
||||
0x85,0xd0,0x5a,0x53,0x73,0x21,0x66,0x9f,0xf6,0x11,0xc,0xe3,0x2f,0xb5,0x68,0xd7,
|
||||
0xab,0x16,0xcc,0xbc,0xd9,0x6c,0xfe,0x81,0x78,0x7d,0x91,0xf1,0x78,0x8c,0x94,0xfe,
|
||||
0xea,0x3f,0x1e,0x8f,0x64,0x7f,0x70,0x12,0x8d,0xd8,0x51,0x65,0x59,0x62,0xa1,0xd0,
|
||||
0x6d,0xe8,0xbc,0x8e,0x94,0xdb,0xed,0xf6,0x7c,0x3e,0xf7,0xfb,0x3d,0x11,0x5,0x41,
|
||||
0xa0,0xe8,0xa7,0x67,0x3b,0x52,0x2e,0x97,0xcb,0xfd,0x7e,0x3f,0x9d,0x4e,0xd6,0xe8,
|
||||
0x8e,0x1c,0xf4,0x1f,0xbd,0x37,0x12,0xb4,0xdb,0xed,0x98,0x59,0x6b,0xfd,0x78,0x3c,
|
||||
0xa8,0x3e,0x72,0x24,0x45,0x82,0x20,0xcf,0xf3,0x98,0x99,0x99,0xfb,0xfd,0x3e,0x76,
|
||||
0xe4,0xe0,0x7b,0x9b,0x9d,0xf5,0xd1,0x5a,0x57,0x3d,0xe6,0x1b,0xf1,0xc5,0xa7,0x36,
|
||||
0x5f,0xe6,0x63,0x88,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
|
||||
|
||||
// /Users/grauser/Documents/DEV/Qt/qwt-6.0.1/designer/pixmaps/qwtwheel.png
|
||||
0x0,0x0,0x1,0x2a,
|
||||
0x89,
|
||||
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
|
||||
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x3,0x0,0x0,0x0,0xf3,0x6a,0x9c,0x9,
|
||||
0x0,0x0,0x0,0x2a,0x74,0x45,0x58,0x74,0x43,0x72,0x65,0x61,0x74,0x69,0x6f,0x6e,
|
||||
0x20,0x54,0x69,0x6d,0x65,0x0,0x4d,0x69,0x20,0x39,0x20,0x4f,0x6b,0x74,0x20,0x32,
|
||||
0x30,0x30,0x32,0x20,0x32,0x32,0x3a,0x35,0x33,0x3a,0x30,0x30,0x20,0x2b,0x30,0x31,
|
||||
0x30,0x30,0x8a,0x59,0x4f,0x7f,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xd2,
|
||||
0xa,0x9,0x14,0x38,0x1c,0xbc,0x2b,0xab,0xb7,0x0,0x0,0x0,0x9,0x70,0x48,0x59,
|
||||
0x73,0x0,0x0,0xe,0xc3,0x0,0x0,0xe,0xc3,0x1,0xc7,0x6f,0xa8,0x64,0x0,0x0,
|
||||
0x0,0x4,0x67,0x41,0x4d,0x41,0x0,0x0,0xb1,0x8f,0xb,0xfc,0x61,0x5,0x0,0x0,
|
||||
0x0,0x27,0x50,0x4c,0x54,0x45,0xfb,0xb3,0x8,0xfb,0xfb,0xfb,0x75,0x75,0x75,0xd7,
|
||||
0xd7,0xd7,0xe1,0xe1,0xe1,0xf2,0xf2,0xf2,0xea,0xea,0xea,0xc6,0xc6,0xc6,0xbd,0xbd,
|
||||
0xbd,0xb3,0xb3,0xb3,0xa1,0xa1,0xa1,0x86,0x86,0x86,0x7d,0x7d,0x7d,0xab,0xa1,0x7c,
|
||||
0x5d,0x0,0x0,0x0,0x1,0x74,0x52,0x4e,0x53,0x0,0x40,0xe6,0xd8,0x66,0x0,0x0,
|
||||
0x0,0x43,0x49,0x44,0x41,0x54,0x78,0xda,0xcd,0x8f,0x37,0xe,0x0,0x20,0x10,0xc3,
|
||||
0xc8,0xd1,0xcb,0xff,0xdf,0x4b,0x13,0x4c,0x61,0x3,0x9,0xf,0x1e,0x9c,0x29,0x4a,
|
||||
0xdd,0x40,0x18,0xa0,0x19,0x3d,0x83,0x30,0xf3,0x98,0xe6,0x2e,0x2b,0x6b,0x6d,0x4,
|
||||
0xd6,0x35,0xf9,0x10,0x93,0x20,0x97,0xcf,0xf2,0xf8,0xb5,0xd5,0x8d,0xf3,0x79,0xd0,
|
||||
0xf3,0xe0,0xf9,0x21,0x15,0xd5,0x8b,0x3,0xae,0x41,0xc3,0x32,0xc9,0x0,0x0,0x0,
|
||||
0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
|
||||
// /Users/grauser/Documents/DEV/Qt/qwt-6.0.1/designer/pixmaps/qwtplot.png
|
||||
0x0,0x0,0x2,0x1f,
|
||||
0x89,
|
||||
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
|
||||
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x6,0x0,0x0,0x0,0xc4,0xb4,0x6c,0x3b,
|
||||
0x0,0x0,0x0,0x2a,0x74,0x45,0x58,0x74,0x43,0x72,0x65,0x61,0x74,0x69,0x6f,0x6e,
|
||||
0x20,0x54,0x69,0x6d,0x65,0x0,0x4d,0x69,0x20,0x39,0x20,0x4f,0x6b,0x74,0x20,0x32,
|
||||
0x30,0x30,0x32,0x20,0x32,0x31,0x3a,0x32,0x34,0x3a,0x33,0x30,0x20,0x2b,0x30,0x31,
|
||||
0x30,0x30,0x72,0xfb,0x2a,0xa8,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xd2,
|
||||
0xa,0x9,0x13,0x21,0x1,0x41,0x62,0x78,0xf3,0x0,0x0,0x0,0x9,0x70,0x48,0x59,
|
||||
0x73,0x0,0x0,0xa,0xf0,0x0,0x0,0xa,0xf0,0x1,0x42,0xac,0x34,0x98,0x0,0x0,
|
||||
0x0,0x4,0x67,0x41,0x4d,0x41,0x0,0x0,0xb1,0x8f,0xb,0xfc,0x61,0x5,0x0,0x0,
|
||||
0x1,0x78,0x49,0x44,0x41,0x54,0x78,0xda,0x63,0x60,0x18,0x5,0x74,0x5,0x1a,0x62,
|
||||
0x5c,0xff,0xa9,0x65,0x16,0x23,0x36,0x43,0x6f,0xbc,0xfa,0xc6,0x48,0x9e,0x71,0x8,
|
||||
0xc0,0x34,0x28,0x82,0xe2,0x8c,0x28,0x13,0xb,0x10,0xf3,0x82,0x68,0xaa,0xb9,0x18,
|
||||
0x68,0x98,0x12,0xab,0x84,0xd4,0x46,0x16,0x11,0xb1,0xb,0x2c,0xc2,0x22,0x1b,0x81,
|
||||
0x7c,0x1d,0x8a,0xd,0x6,0x1a,0xc2,0xc5,0x22,0x2e,0x39,0x8b,0x4d,0x5e,0xc9,0x41,
|
||||
0xaa,0x7b,0x9a,0x12,0xbb,0xba,0xb6,0x3d,0xd0,0x82,0x79,0x40,0x71,0x41,0x8a,0x82,
|
||||
0xe2,0x82,0x96,0xa4,0xf7,0x39,0x25,0x81,0x9f,0x6f,0x76,0x6f,0xfb,0xff,0xfd,0xfb,
|
||||
0xf7,0xff,0x1f,0x2e,0x9e,0xfb,0x7f,0x41,0x53,0xe2,0xfb,0x5,0xd,0xf1,0x2c,0x8a,
|
||||
0x5c,0xcc,0xc8,0xce,0x9e,0xc0,0xa1,0xaa,0xc9,0xc4,0x69,0x60,0x2,0xe6,0xb3,0xab,
|
||||
0x6a,0x30,0xf0,0xfb,0x87,0xb2,0x32,0x30,0x31,0x65,0x2,0x5d,0xcd,0x47,0x96,0xc1,
|
||||
0xa0,0xc8,0xfa,0xff,0xeb,0x97,0x9,0xaf,0x87,0x1f,0xb,0x13,0xf,0x2f,0xd4,0x26,
|
||||
0x46,0x6,0x81,0xe0,0x28,0xe6,0xff,0x3f,0x7f,0xa8,0x30,0x71,0xf3,0xb8,0x92,0x65,
|
||||
0x30,0xb3,0xa0,0x50,0x0,0x23,0xb,0x8b,0x18,0xaf,0x93,0x3b,0x8a,0x38,0xbb,0xba,
|
||||
0x16,0x3,0xb7,0x8d,0x23,0x33,0xb3,0xa0,0x70,0x2e,0xd0,0x72,0x36,0xa2,0xd,0x6,
|
||||
0x29,0x3e,0x2b,0xcd,0xe1,0xf3,0xff,0xf7,0xef,0xe,0x7e,0xbf,0x50,0x66,0x90,0xf7,
|
||||
0x51,0x82,0x87,0x95,0x8d,0x41,0x24,0xbd,0x80,0x95,0x91,0x91,0xd1,0x8c,0x55,0x5a,
|
||||
0xb6,0x10,0xdd,0x70,0x26,0x2c,0x6,0x32,0x9e,0x95,0x64,0xb3,0x7,0x25,0x29,0x26,
|
||||
0xe,0xce,0xe5,0x40,0x43,0x85,0x45,0xf3,0x2a,0xd8,0x41,0xde,0x47,0x7,0x9c,0x86,
|
||||
0xa6,0x3f,0x84,0x92,0xb3,0x19,0xff,0x7d,0xf9,0x5c,0xcf,0xa6,0xa8,0xd2,0xf,0xd4,
|
||||
0xcb,0xc,0x93,0xc3,0x96,0xd0,0x99,0x19,0xd9,0xd8,0x4d,0x59,0xa5,0x64,0xdf,0x9,
|
||||
0x84,0xc7,0xf5,0xf3,0x79,0xf8,0x3d,0x65,0xe2,0xe1,0xf9,0x85,0xc3,0x63,0xf,0xf9,
|
||||
0xdc,0x7d,0x3f,0xfe,0xb8,0x7c,0x5e,0xe7,0xef,0xfb,0x77,0x4f,0xf5,0x4e,0xdd,0xfa,
|
||||
0x8b,0x55,0x15,0x25,0x85,0x10,0x48,0x2f,0xb2,0x7e,0x46,0x74,0x49,0x72,0xd,0x46,
|
||||
0x6,0xd4,0x28,0xc4,0x70,0xba,0x78,0xe8,0x1,0x0,0x3e,0x3c,0x69,0x30,0x7,0xb3,
|
||||
0x24,0xc3,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
|
||||
// /Users/grauser/Documents/DEV/Qt/qwt-6.0.1/designer/pixmaps/qwtscale.png
|
||||
0x0,0x0,0x1,0x75,
|
||||
0x89,
|
||||
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
|
||||
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x6,0x0,0x0,0x0,0xc4,0xb4,0x6c,0x3b,
|
||||
0x0,0x0,0x0,0x2b,0x74,0x45,0x58,0x74,0x43,0x72,0x65,0x61,0x74,0x69,0x6f,0x6e,
|
||||
0x20,0x54,0x69,0x6d,0x65,0x0,0x53,0x6f,0x20,0x32,0x37,0x20,0x4f,0x6b,0x74,0x20,
|
||||
0x32,0x30,0x30,0x32,0x20,0x31,0x36,0x3a,0x31,0x33,0x3a,0x32,0x32,0x20,0x2b,0x30,
|
||||
0x31,0x30,0x30,0x8c,0x3a,0x78,0x7b,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,
|
||||
0xd2,0xa,0x1b,0x11,0x10,0x23,0xab,0xcb,0x75,0xdf,0x0,0x0,0x0,0x9,0x70,0x48,
|
||||
0x59,0x73,0x0,0x0,0xa,0xf0,0x0,0x0,0xa,0xf0,0x1,0x42,0xac,0x34,0x98,0x0,
|
||||
0x0,0x0,0x4,0x67,0x41,0x4d,0x41,0x0,0x0,0xb1,0x8f,0xb,0xfc,0x61,0x5,0x0,
|
||||
0x0,0x0,0xcd,0x49,0x44,0x41,0x54,0x78,0xda,0x63,0x64,0xc0,0x3,0x74,0xf4,0xa6,
|
||||
0x54,0x2,0x29,0x6f,0x1c,0xd2,0x6c,0x40,0xfc,0x13,0x88,0x23,0xaf,0x5c,0xca,0x79,
|
||||
0x82,0x2e,0xc9,0xc2,0x80,0x1f,0xf4,0x3,0xf1,0x14,0x5c,0xf6,0x2,0xf1,0x5a,0x20,
|
||||
0x16,0x2,0x62,0xd2,0xc,0x6,0xba,0xe4,0x7,0x90,0xfa,0x81,0xc3,0x37,0x5f,0x81,
|
||||
0xd4,0x7f,0x5c,0x7a,0x99,0x18,0x68,0x4,0x8,0x5,0x5,0xc8,0x65,0x32,0x50,0xef,
|
||||
0xa2,0x3,0x35,0x20,0x66,0x26,0xdb,0x60,0x68,0xc4,0x3c,0x29,0x29,0xbb,0x73,0x64,
|
||||
0xc7,0x8e,0x1d,0xc8,0x52,0xdc,0x40,0xcc,0x49,0x89,0x8b,0x39,0x80,0x14,0x2b,0xd0,
|
||||
0x50,0x4f,0x74,0x29,0x6,0x48,0xe4,0x91,0xed,0x62,0xac,0x11,0x38,0x2,0x23,0xf,
|
||||
0x8,0x62,0x19,0xb0,0xe7,0x3e,0xca,0x22,0x8f,0x1,0x77,0xee,0x1b,0x8d,0x3c,0x38,
|
||||
0xa0,0x4e,0xce,0xeb,0xe9,0xfb,0x72,0x64,0xc1,0x82,0x5,0xc8,0x52,0x78,0x23,0x8f,
|
||||
0x91,0x8,0x17,0x83,0x73,0x1e,0x36,0x29,0x6,0x48,0xe4,0x79,0x0,0x2d,0xbf,0x44,
|
||||
0x8e,0x8b,0x87,0x50,0xe4,0xe1,0x89,0x38,0x10,0xa0,0x28,0xf2,0x70,0xe5,0x3a,0x10,
|
||||
0xa0,0x28,0xe7,0xe1,0xab,0xf3,0x4,0x80,0xd8,0x1e,0x88,0x1f,0x63,0x93,0x4,0x0,
|
||||
0xa7,0x60,0x4a,0x2f,0x7f,0x4f,0xa0,0xf9,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,
|
||||
0xae,0x42,0x60,0x82,
|
||||
// /Users/grauser/Documents/DEV/Qt/qwt-6.0.1/designer/pixmaps/qwtanalogclock.png
|
||||
0x0,0x0,0x1,0xa6,
|
||||
0x89,
|
||||
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
|
||||
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x2,0x0,0x0,0x0,0x4b,0xd6,0xfb,0x6c,
|
||||
0x0,0x0,0x1,0x6d,0x49,0x44,0x41,0x54,0x78,0x9c,0x9d,0x54,0x31,0x8e,0xc2,0x40,
|
||||
0xc,0x34,0x4b,0x58,0xb1,0x8f,0xd8,0x32,0x1d,0x95,0x85,0x44,0x8b,0xb6,0xa3,0x47,
|
||||
0xe2,0x7,0x54,0x48,0x34,0x3c,0x3,0xf1,0x3,0x5a,0xa4,0x48,0xf4,0x14,0x91,0x22,
|
||||
0x5e,0xe0,0x8a,0xce,0x65,0x5e,0xc0,0xf,0xae,0xf0,0x9d,0x65,0x36,0x90,0xcb,0xdd,
|
||||
0x54,0x6b,0xed,0xce,0x78,0xec,0x38,0x1e,0x11,0x11,0x18,0x30,0x33,0x0,0x3c,0x1e,
|
||||
0xf,0xef,0x7d,0x8,0xc1,0x5e,0xc5,0x18,0x1,0xa0,0x2c,0x4b,0x78,0x45,0x91,0xf1,
|
||||
0xef,0xf7,0x7b,0x8,0x61,0xb1,0x58,0xe8,0x53,0x44,0x94,0x34,0x4d,0xd3,0xe8,0x4b,
|
||||
0x2b,0xe4,0x2c,0xff,0x76,0xbb,0x2d,0x97,0xcb,0xd3,0xe9,0xd4,0x4d,0x5,0x0,0x29,
|
||||
0xa5,0x94,0x52,0xdb,0xb6,0x6a,0xf6,0x45,0x82,0x99,0xaf,0xd7,0xeb,0x6a,0xb5,0x7a,
|
||||
0x4b,0x56,0x20,0x62,0x57,0xc5,0x49,0x70,0x3e,0x9f,0xd7,0xeb,0xb5,0xf0,0x89,0x8,
|
||||
0x11,0x95,0x96,0x35,0x4b,0xec,0x58,0x95,0x11,0x11,0xed,0xf7,0xfb,0xdd,0x6e,0xf7,
|
||||
0x29,0xbf,0xc8,0x89,0xae,0x95,0x6b,0x9a,0x46,0x1a,0xec,0x98,0xd9,0x7b,0xbf,0xd9,
|
||||
0x6c,0x6c,0xe6,0xb7,0xc8,0xec,0x1c,0xe,0x87,0xef,0x42,0x2e,0x97,0xcb,0x76,0xbb,
|
||||
0x25,0xa2,0xcc,0x7f,0xf,0x10,0x51,0x1c,0x3d,0x9f,0x4f,0x0,0x28,0xbc,0xf7,0x5a,
|
||||
0x42,0xb7,0xec,0x7e,0x3b,0xf3,0xf9,0x9c,0x99,0xdd,0x74,0x3a,0x1d,0x42,0xeb,0x81,
|
||||
0xcb,0x46,0xf0,0x1f,0x28,0x42,0x8,0xda,0x82,0x9e,0x42,0xb2,0xcf,0xac,0x61,0x55,
|
||||
0x55,0x45,0x8,0x61,0x60,0xb,0x2c,0x94,0xc2,0xcc,0xc5,0x64,0x32,0x19,0xf8,0xfa,
|
||||
0x13,0xdc,0x6c,0x36,0xab,0xeb,0xfa,0x4f,0x16,0xb4,0xa,0x99,0x4e,0x7,0x0,0xe3,
|
||||
0xf1,0x38,0xbb,0xfb,0xd5,0x97,0x8c,0x86,0x84,0x5,0x0,0xc4,0x18,0x75,0x8a,0x7,
|
||||
0x1a,0x21,0x22,0xfd,0xcd,0x46,0x1a,0xb4,0x6d,0x9b,0x52,0xea,0xf7,0x6f,0xbb,0x28,
|
||||
0x87,0xb2,0x2c,0x1d,0xfc,0xec,0x8f,0x18,0xa3,0x2e,0x15,0x5b,0x91,0xfd,0xe4,0x72,
|
||||
0xb6,0x7c,0xd0,0x7d,0xd1,0x55,0xf9,0x84,0x8c,0xf,0x76,0x6b,0xa9,0xa,0x22,0x1e,
|
||||
0x8f,0xc7,0xb7,0xe4,0xaa,0xaa,0x32,0x3e,0x48,0x2f,0x7a,0x52,0x75,0xd1,0x5d,0x2b,
|
||||
0x5f,0xb,0x0,0xbe,0xfd,0x70,0x63,0x0,0x15,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,
|
||||
0x44,0xae,0x42,0x60,0x82,
|
||||
// /Users/grauser/Documents/DEV/Qt/qwt-6.0.1/designer/pixmaps/qwtcounter.png
|
||||
0x0,0x0,0x4,0x2,
|
||||
0x89,
|
||||
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
|
||||
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x6,0x0,0x0,0x0,0xc4,0xb4,0x6c,0x3b,
|
||||
0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xd2,0xa,0x9,0x15,0x9,0x2d,0x2a,
|
||||
0x6a,0xc6,0x8,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x12,0x0,
|
||||
0x0,0xb,0x12,0x1,0xd2,0xdd,0x7e,0xfc,0x0,0x0,0x0,0x4,0x67,0x41,0x4d,0x41,
|
||||
0x0,0x0,0xb1,0x8f,0xb,0xfc,0x61,0x5,0x0,0x0,0x3,0x91,0x49,0x44,0x41,0x54,
|
||||
0x78,0xda,0xad,0x95,0x5b,0x68,0x13,0x59,0x1c,0xc6,0xbf,0x5c,0x6d,0x6a,0xd2,0x34,
|
||||
0x69,0x2e,0xbd,0xc5,0x34,0x49,0xa1,0x46,0xbc,0x81,0x14,0x53,0x44,0xc5,0xdb,0x52,
|
||||
0x16,0xca,0xb2,0xb,0x22,0xfa,0x24,0xcb,0xae,0x3e,0x6d,0x1f,0x7c,0x13,0x65,0x97,
|
||||
0x85,0x45,0x41,0x45,0xc4,0xdb,0x83,0x88,0xa,0x8a,0xa2,0x20,0x8a,0xdd,0x15,0x41,
|
||||
0x1f,0x54,0x76,0xdb,0x2e,0x1b,0xb7,0xd5,0xd6,0x5a,0x35,0xb1,0x35,0x6d,0xc5,0x71,
|
||||
0x9a,0x9b,0x69,0x26,0xe9,0x34,0x33,0xc7,0x39,0x27,0xda,0x26,0x8a,0x9a,0x8a,0x1f,
|
||||
0x4c,0x38,0x27,0x9c,0xfc,0xe6,0x3b,0xdf,0xff,0x9f,0x73,0x54,0x28,0x90,0xb9,0x65,
|
||||
0x3d,0x49,0xf2,0x1c,0xbe,0x44,0x66,0xbb,0x13,0xc9,0xae,0x5b,0xaa,0x77,0x73,0x2d,
|
||||
0xfd,0x68,0xd8,0xb4,0x8d,0xc,0xdf,0xeb,0x42,0x4b,0xad,0x15,0x96,0x26,0x17,0xaa,
|
||||
0x8c,0x73,0x67,0x5,0x8d,0x4e,0xa4,0x21,0xa9,0xb5,0xb8,0xc4,0x2f,0x22,0xd,0xcb,
|
||||
0x5a,0x30,0x7c,0xf1,0x84,0x2a,0xff,0x86,0xc6,0x45,0xa4,0x75,0x89,0x1f,0x8d,0x35,
|
||||
0xe,0xf8,0xfd,0x7e,0xb8,0x5c,0x2e,0x98,0x4c,0xa6,0x92,0xa0,0x6a,0xb5,0x1a,0x84,
|
||||
0x10,0xe8,0xf5,0x7a,0x4,0x7,0x9f,0xa2,0x7d,0xcf,0x1,0x20,0xd4,0xa7,0xd2,0xd2,
|
||||
0xed,0x53,0xa7,0x14,0xda,0xd6,0xd6,0x86,0xe6,0xe6,0x66,0x18,0x8d,0x46,0xe8,0x74,
|
||||
0xba,0xcf,0x42,0x25,0x99,0x28,0x6e,0x27,0x91,0x11,0x73,0x70,0x56,0xcc,0x41,0x20,
|
||||
0x10,0x80,0xd3,0xe9,0xc4,0xb6,0x3f,0xe,0x10,0x35,0xcd,0xd4,0x62,0x9a,0xb,0xaf,
|
||||
0xd7,0xcb,0xa0,0x16,0x8b,0xa5,0x24,0x28,0x55,0x42,0x10,0x71,0xae,0x33,0x82,0xed,
|
||||
0xa7,0x83,0x18,0x78,0x36,0x8a,0x6c,0x36,0x8b,0xf9,0x3e,0xf,0x28,0x93,0x65,0x4c,
|
||||
0x33,0xad,0xaf,0xaf,0x67,0x4e,0x4b,0x15,0x75,0x1b,0x4f,0x4f,0x82,0x4f,0x65,0x71,
|
||||
0xff,0xf9,0x38,0xfe,0xed,0x49,0xc1,0x66,0xd4,0x63,0x81,0xcf,0x3b,0x53,0x3c,0xaa,
|
||||
0x52,0xb7,0x5f,0xe8,0xf6,0xc6,0x3,0xe,0x2f,0x92,0x79,0xf8,0xd1,0x8e,0x3e,0x78,
|
||||
0x6b,0x6d,0xb0,0x56,0x9a,0xf3,0xd9,0x17,0x2f,0x9e,0xc2,0xc9,0x3b,0x43,0x1f,0x1,
|
||||
0x4d,0xa1,0xfd,0x7c,0x2f,0xfa,0x46,0x93,0x6f,0xb3,0xcd,0x62,0x2c,0x91,0xc1,0x33,
|
||||
0x5e,0x80,0x24,0xc9,0xe0,0x26,0xa6,0xf0,0x30,0x34,0x8c,0x58,0x3c,0x1,0xa5,0x9a,
|
||||
0xc5,0xe0,0x5f,0xaf,0x3e,0xc4,0xce,0xcb,0xfd,0x1f,0x40,0xcf,0x77,0x8f,0x60,0xe3,
|
||||
0xf1,0x6e,0xdc,0x1e,0xe4,0xb1,0x72,0xef,0x1d,0x56,0xb0,0x53,0x77,0x9f,0xe3,0x7a,
|
||||
0x3f,0x87,0xbf,0xfb,0xc2,0x40,0x3c,0x82,0x44,0x22,0x89,0x93,0xd7,0xfe,0xc1,0xa3,
|
||||
0x70,0x84,0x81,0xb5,0x85,0x80,0xc3,0x5b,0x96,0xe2,0x82,0x2,0x79,0x5f,0x5b,0x2,
|
||||
0x2e,0xac,0x68,0xac,0x82,0xdb,0x56,0x8e,0x85,0xbb,0x6f,0xb2,0x2e,0xe8,0x1c,0x18,
|
||||
0x41,0x74,0xe0,0x3f,0x38,0x5e,0xd,0x41,0x16,0x5,0x20,0x37,0x9,0xe8,0xcb,0x11,
|
||||
0x8f,0x45,0x15,0xb0,0x5c,0xc,0xfe,0x94,0x28,0x74,0xed,0xbe,0xbb,0x4a,0xa1,0xf5,
|
||||
0xac,0xb5,0xe,0x6d,0x5e,0x88,0x70,0xa8,0xc,0xb1,0xe8,0x7c,0x48,0xb9,0x9c,0xb2,
|
||||
0x42,0xe9,0x65,0xa5,0x46,0x75,0xe,0x6b,0x71,0xf1,0x3e,0x96,0x6b,0x65,0xf9,0x4c,
|
||||
0x41,0x7f,0x5a,0xe5,0xc1,0x8f,0xa7,0x82,0x78,0x99,0x14,0xe1,0x9f,0xe7,0x40,0x5d,
|
||||
0x65,0x19,0x32,0x99,0x4c,0xd1,0x6f,0xc,0x6,0x3,0xfd,0xd7,0x7c,0x1a,0x5c,0x8,
|
||||
0x7d,0x17,0xc9,0x9e,0x3f,0x7,0x11,0x4b,0x8b,0xe8,0xe8,0x1d,0xc7,0xcb,0xd7,0x59,
|
||||
0xf0,0xca,0xf3,0x3a,0x9b,0xc3,0x53,0x6e,0x2,0x9a,0x34,0x8f,0x63,0x5b,0x97,0x7f,
|
||||
0xe8,0x98,0x3a,0xcc,0x49,0x64,0x7a,0x6e,0xfb,0xa5,0x3,0xe3,0x47,0xda,0xd8,0xf8,
|
||||
0xe7,0x33,0xf7,0xb0,0xcc,0x6d,0x41,0x85,0x41,0xab,0x44,0xa1,0x47,0x88,0x4b,0x61,
|
||||
0x24,0x41,0x5b,0x4d,0x44,0xff,0x58,0x12,0xa9,0xa1,0x1e,0xf8,0x75,0x3c,0x5e,0x44,
|
||||
0x1c,0x80,0x2c,0x17,0x77,0x45,0x77,0x28,0x8a,0xdf,0xbf,0x5f,0xc0,0x5a,0x8a,0x75,
|
||||
0xc9,0x77,0x7e,0x1c,0xbe,0x15,0x62,0xe3,0xe5,0x1e,0x2b,0x22,0x31,0x1,0x9d,0xbb,
|
||||
0xd6,0xb0,0x9c,0xbf,0x69,0x32,0xe1,0xf1,0x58,0xc,0xdd,0xe1,0x28,0x12,0xe1,0xff,
|
||||
0x61,0xe6,0x82,0xf8,0x76,0xb1,0x13,0x86,0xb7,0x56,0x8b,0x1c,0xb7,0x2e,0xae,0x46,
|
||||
0x6b,0xc1,0xbc,0x7d,0x7d,0xe3,0x4c,0xbe,0xab,0x3d,0xd3,0xe3,0x39,0x3a,0x2d,0x7c,
|
||||
0x35,0x16,0x58,0xd,0x3a,0x90,0xc9,0x28,0x34,0x89,0x8,0x2c,0xda,0x1c,0x5c,0xb5,
|
||||
0xd5,0xa8,0x76,0x2a,0x8e,0x55,0xea,0x62,0xc7,0xa5,0x4a,0xa5,0x1c,0x8a,0x6e,0x7b,
|
||||
0x5,0x76,0x6c,0x98,0x7,0x9b,0x36,0x83,0x4a,0x95,0x80,0x1f,0x36,0x4,0xe0,0x6b,
|
||||
0x50,0xe6,0x36,0x1b,0x5d,0x90,0x77,0x4c,0xcf,0xd3,0x9c,0xd2,0x32,0x92,0x24,0x41,
|
||||
0xa3,0xd1,0x94,0x4,0x2f,0xd3,0xeb,0xd0,0x54,0x57,0x85,0x6,0x23,0x81,0x60,0x35,
|
||||
0xc2,0xe3,0x76,0xa3,0xae,0xb6,0x6,0x23,0xaf,0xf8,0x3c,0x98,0x9e,0xfc,0xf1,0x54,
|
||||
0x9a,0x9d,0xa9,0xa2,0x28,0xe6,0xdb,0xa5,0x44,0xd7,0x1e,0xa7,0x19,0x47,0xb6,0xaf,
|
||||
0xc3,0x68,0xc4,0x7,0x5b,0x45,0x39,0xec,0x76,0x3b,0x6e,0x7,0x7b,0xd8,0x6d,0x92,
|
||||
0x97,0x72,0xd0,0xff,0xb6,0xff,0x20,0x99,0xad,0x64,0x59,0x26,0x82,0x20,0x10,0x8e,
|
||||
0xe3,0xd8,0x73,0xf6,0xca,0x35,0x42,0x59,0xd3,0x6f,0xa7,0x57,0x13,0xfd,0xe2,0xe2,
|
||||
0x5f,0x37,0xc8,0x83,0xc7,0x4f,0x66,0xd,0xef,0x1d,0x78,0x44,0x2e,0x74,0x5c,0x67,
|
||||
0xc,0x7a,0x71,0xb0,0x1d,0x15,0x6e,0xef,0x6b,0x5e,0xa6,0x6f,0x0,0x1e,0x59,0xe5,
|
||||
0x15,0x7,0x8d,0xbc,0x11,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,
|
||||
0x82,
|
||||
// /Users/grauser/Documents/DEV/Qt/qwt-6.0.1/designer/pixmaps/qwtcompass.png
|
||||
0x0,0x0,0x3,0xe0,
|
||||
0x89,
|
||||
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
|
||||
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x2,0x0,0x0,0x0,0x4b,0xd6,0xfb,0x6c,
|
||||
0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x12,0x0,0x0,0xb,0x12,
|
||||
0x1,0xd2,0xdd,0x7e,0xfc,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xd3,0x4,
|
||||
0xe,0xd,0x34,0x33,0x41,0x3,0x14,0x60,0x0,0x0,0x3,0x7f,0x49,0x44,0x41,0x54,
|
||||
0x78,0x9c,0x6d,0x54,0xcb,0x6e,0xdb,0x46,0x14,0xbd,0xf3,0x20,0x45,0x72,0xc4,0x21,
|
||||
0xf4,0x82,0x64,0x4b,0xb5,0x90,0x8,0x96,0x83,0x78,0x55,0x67,0xdb,0xae,0xbc,0xc9,
|
||||
0xa6,0x5d,0x7,0x68,0x7f,0x21,0x9b,0x16,0x8,0xb2,0xce,0xb2,0xfd,0x85,0x7c,0x41,
|
||||
0x11,0x20,0x7f,0x11,0x78,0x99,0x38,0x80,0x5b,0x38,0x80,0x1d,0x55,0xb6,0x1e,0x21,
|
||||
0x44,0x4a,0x91,0xf8,0x18,0x92,0xc3,0xe9,0x82,0x82,0x22,0x5b,0xbd,0x2b,0xf2,0xc,
|
||||
0xef,0xb9,0xe7,0xde,0x73,0x39,0xe8,0xcd,0x5f,0x6f,0xe0,0x6e,0xe4,0x79,0xbe,0x58,
|
||||
0x2c,0xa2,0x38,0xd2,0x4b,0xba,0x6d,0xdb,0x94,0x50,0x95,0x2b,0x40,0x40,0x30,0x41,
|
||||
0x8,0xc1,0x4e,0xd0,0xed,0x17,0xa5,0xd4,0xcd,0xed,0x4d,0xae,0xf2,0x7e,0xbf,0xdf,
|
||||
0x6c,0x35,0x9,0x21,0xdb,0x47,0x61,0x18,0x6,0x41,0x90,0xc6,0x69,0x92,0x24,0xff,
|
||||
0x4f,0x91,0x24,0xc9,0xc5,0xe5,0xc5,0x93,0x93,0x27,0x7,0x7,0x7,0x1b,0xf0,0xfa,
|
||||
0xfa,0x1a,0x0,0x1e,0x3c,0x78,0x80,0x10,0x62,0x8c,0x31,0xc6,0xd2,0x24,0xd,0x56,
|
||||
0xc1,0x62,0xbe,0xc8,0xf3,0xfc,0xe,0x45,0x92,0x24,0x97,0x57,0x97,0xa7,0xa7,0xa7,
|
||||
0xdc,0xe6,0x5,0x22,0xa5,0x14,0x42,0x58,0x96,0x65,0x18,0xc6,0x72,0xb9,0xb4,0x6d,
|
||||
0xbb,0xc0,0x35,0x5d,0x73,0x2a,0xe,0x63,0x6c,0x3c,0x1a,0x4b,0x29,0x1,0x0,0x17,
|
||||
0x22,0x2f,0x2e,0x2f,0xf6,0xf7,0xf6,0xbd,0x99,0xb7,0x5a,0xae,0xf2,0x3c,0xf7,0x3c,
|
||||
0x2f,0x8a,0x22,0x8c,0x71,0xb3,0xd9,0x74,0x1c,0x87,0x52,0xea,0xfb,0x7e,0x71,0x34,
|
||||
0x99,0x4c,0xae,0xae,0xae,0xe2,0x24,0xee,0x74,0x3a,0xc5,0x68,0x28,0x0,0xc,0x86,
|
||||
0x83,0x93,0xef,0x4f,0xb2,0x2c,0x33,0x4d,0x53,0x8,0x21,0x73,0x59,0xad,0x56,0xb7,
|
||||
0xbb,0x35,0x4d,0xd3,0x34,0x4d,0x4a,0xe9,0x6a,0xb5,0x32,0xc,0x63,0x36,0x9b,0x61,
|
||||
0x8c,0x35,0x43,0xab,0x37,0xea,0xee,0x17,0x17,0x4b,0x29,0x65,0x2e,0xbb,0xdd,0x6e,
|
||||
0xaf,0xd7,0x6b,0x34,0x1a,0x54,0xa3,0x9c,0xf3,0xdd,0xb1,0x6b,0x9a,0xf6,0xe8,0xe8,
|
||||
0x51,0xa5,0x52,0x1,0x80,0xe3,0xe3,0x63,0xc6,0x98,0x94,0x72,0x7f,0x6f,0x9f,0x10,
|
||||
0x82,0x7d,0xdf,0xef,0xf7,0xfb,0xc5,0x77,0xf3,0xf9,0xdc,0x71,0x9c,0x5d,0xe7,0x30,
|
||||
0xc6,0xbd,0x87,0xbd,0xe9,0x97,0x69,0x14,0x45,0x8e,0xe3,0xf8,0xbe,0x5f,0xe0,0xa9,
|
||||
0x4c,0x6b,0xb5,0x1a,0x8e,0xa2,0xa8,0xdd,0x6e,0x17,0xf3,0xd3,0x75,0x7d,0xb7,0x3e,
|
||||
0x0,0x74,0xf,0xba,0x61,0x18,0xba,0xae,0xb,0x0,0x8,0x21,0x4a,0xa9,0x52,0xa,
|
||||
0x0,0x62,0x11,0xb7,0x5a,0x2d,0xac,0x95,0xb4,0xc2,0x7f,0x21,0x4,0xa5,0xf4,0x5e,
|
||||
0xb2,0x69,0x9a,0xed,0x76,0x9b,0x52,0x3a,0xbc,0x19,0x6e,0x40,0x84,0x50,0x9a,0xa6,
|
||||
0x85,0xf,0xe5,0x72,0x19,0x33,0xc6,0xd2,0x34,0x1d,0xc,0x6,0x93,0xc9,0xc4,0x30,
|
||||
0x8c,0x3b,0xf9,0x9f,0x3e,0xb5,0xfe,0xfe,0x27,0x11,0xc9,0xe7,0xc1,0xe7,0xa2,0x6c,
|
||||
0x11,0xba,0xae,0xbb,0xae,0x3b,0xfc,0x77,0x8,0x0,0x80,0x0,0xeb,0xba,0xae,0x69,
|
||||
0x1a,0x21,0xa4,0x56,0xab,0xdd,0x93,0xa0,0x8f,0xc7,0xe1,0x8b,0x17,0xf2,0xf5,0xeb,
|
||||
0x2c,0xcb,0xb6,0x71,0x42,0x88,0x65,0x59,0xdc,0xe1,0x6b,0xa,0x99,0x49,0x0,0xe8,
|
||||
0x74,0x3a,0x18,0xe3,0x28,0x8a,0xbe,0x59,0xe0,0xba,0xdf,0xfd,0xf1,0x67,0xfc,0xfc,
|
||||
0xb9,0xff,0xf3,0x4f,0xdb,0x12,0x0,0x20,0x8,0x2,0xd3,0x34,0x1d,0xc7,0x1,0x0,
|
||||
0x82,0x9,0x6,0x80,0x62,0x55,0x6d,0xdb,0x8e,0xe3,0x78,0x6d,0x41,0x14,0x3f,0xfc,
|
||||
0xed,0xf7,0xe9,0xaf,0xbf,0x2c,0x7e,0xfc,0x41,0x61,0x7c,0x4f,0x9d,0x94,0xb2,0x68,
|
||||
0xb9,0xa8,0x8a,0x4b,0x7a,0x29,0x8,0x82,0x75,0x65,0xaa,0x15,0x74,0xdd,0x57,0xaf,
|
||||
0xa2,0xa3,0xbe,0xfb,0xec,0xd9,0xae,0x3b,0x52,0x4a,0x4d,0xd3,0x8a,0x67,0x6e,0xf3,
|
||||
0xe9,0x74,0x8a,0x9,0x21,0xcb,0xaf,0xcb,0x2,0xb2,0x98,0xb5,0x5c,0x2e,0xab,0x6f,
|
||||
0xdf,0x52,0xcf,0x1b,0xbe,0x7c,0xb9,0x9b,0x9f,0x65,0x59,0x10,0x4,0xe5,0x72,0x79,
|
||||
0x4d,0xc1,0xf9,0x78,0x34,0xa6,0x0,0x90,0x88,0x24,0x8e,0xe3,0xd1,0x68,0x4,0xa,
|
||||
0xca,0x76,0x79,0xf8,0xf8,0xb1,0xff,0xf4,0xa9,0xda,0x31,0x58,0x4a,0x19,0x86,0x61,
|
||||
0x18,0x86,0x83,0xc1,0xa0,0xd7,0xeb,0xed,0xb5,0xf6,0x6e,0x6f,0x6e,0xb3,0x2c,0xa3,
|
||||
0x0,0xa0,0x72,0xb5,0xfa,0xba,0xb2,0x2c,0xcb,0x34,0x4d,0x84,0x10,0x3b,0x3a,0xf2,
|
||||
0x7c,0x9f,0x66,0x19,0x42,0x48,0xd7,0x75,0x42,0x48,0x10,0x4,0x85,0x7e,0xce,0xb9,
|
||||
0xa6,0x69,0x42,0x8,0xc6,0x58,0x99,0x95,0xcf,0xdf,0x9f,0xc3,0xe6,0x67,0x5f,0xad,
|
||||
0x56,0x8d,0x7a,0x83,0xd9,0xc,0x10,0x0,0x40,0xa5,0x52,0x51,0x4a,0xa5,0x69,0xea,
|
||||
0xfb,0xbe,0x61,0x18,0xa5,0x52,0x69,0xb3,0x32,0xa6,0x69,0x1e,0x1e,0x1e,0xb6,0x9a,
|
||||
0xad,0xb3,0x77,0x67,0xc5,0xe0,0xd6,0xd3,0x56,0xb9,0x9a,0xcd,0x66,0x22,0x16,0x18,
|
||||
0xad,0x91,0x42,0x2,0xa5,0x54,0x8,0xb1,0xbd,0x72,0xe,0x77,0x1a,0xb5,0xc6,0xd9,
|
||||
0xbb,0x33,0x21,0x44,0x81,0x7c,0x6b,0x58,0x4a,0x39,0x1e,0x8d,0x2b,0x95,0x4a,0xa3,
|
||||
0xd5,0xc0,0x80,0x45,0x2a,0x94,0x52,0x9b,0x7d,0xc3,0x18,0x73,0x9b,0x73,0xce,0x6f,
|
||||
0x6f,0x6e,0xcf,0xdf,0x9f,0x6f,0xae,0x2c,0xd8,0xbd,0x3b,0x3d,0xcf,0x9b,0xcf,0xe7,
|
||||
0xd5,0x6a,0xb5,0x5e,0xaf,0x73,0x9b,0x3,0x1,0x4a,0x28,0x21,0x24,0x8a,0xa2,0xe9,
|
||||
0x74,0xfa,0xf1,0xc3,0xc7,0x7b,0x9b,0xa,0x0,0xff,0x1,0xeb,0xd6,0xb9,0xfd,0x35,
|
||||
0x6a,0x40,0xa3,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
|
||||
// /Users/grauser/Documents/DEV/Qt/qwt-6.0.1/designer/pixmaps/qwtknob.png
|
||||
0x0,0x0,0x3,0x27,
|
||||
0x89,
|
||||
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
|
||||
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x2,0x0,0x0,0x0,0x4b,0xd6,0xfb,0x6c,
|
||||
0x0,0x0,0x0,0x2a,0x74,0x45,0x58,0x74,0x43,0x72,0x65,0x61,0x74,0x69,0x6f,0x6e,
|
||||
0x20,0x54,0x69,0x6d,0x65,0x0,0x4d,0x69,0x20,0x39,0x20,0x4f,0x6b,0x74,0x20,0x32,
|
||||
0x30,0x30,0x32,0x20,0x32,0x33,0x3a,0x31,0x32,0x3a,0x30,0x37,0x20,0x2b,0x30,0x31,
|
||||
0x30,0x30,0xcd,0x73,0xb0,0xc8,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xd2,
|
||||
0xa,0x9,0x15,0xf,0x9,0x40,0x33,0x85,0x5f,0x0,0x0,0x0,0x9,0x70,0x48,0x59,
|
||||
0x73,0x0,0x0,0xe,0xc3,0x0,0x0,0xe,0xc3,0x1,0xc7,0x6f,0xa8,0x64,0x0,0x0,
|
||||
0x0,0x4,0x67,0x41,0x4d,0x41,0x0,0x0,0xb1,0x8f,0xb,0xfc,0x61,0x5,0x0,0x0,
|
||||
0x2,0x80,0x49,0x44,0x41,0x54,0x78,0xda,0xad,0x54,0x6b,0x6b,0xd3,0x50,0x18,0x6e,
|
||||
0xd3,0x5b,0xd6,0x26,0xdd,0xb2,0x5e,0xd2,0x76,0x75,0x75,0x17,0x10,0xc6,0xaa,0x93,
|
||||
0xb5,0x9b,0x88,0x96,0x21,0x88,0xfe,0x6,0x61,0xf8,0x41,0xf0,0x8f,0x88,0x1f,0xfc,
|
||||
0xf,0xc2,0x44,0xf0,0xb3,0x82,0xb8,0x31,0xd1,0x8f,0x7e,0xd0,0x8d,0x2a,0xeb,0x6c,
|
||||
0xb3,0xae,0xdd,0x4c,0xb7,0x5e,0xd7,0xa4,0xcd,0x65,0x4d,0xba,0x66,0xa9,0x6f,0x8d,
|
||||
0xc,0x7b,0x5b,0x95,0xf9,0xe4,0x25,0x9c,0xf3,0x9c,0xf7,0x3d,0x3c,0xef,0x73,0x4e,
|
||||
0xa2,0xdf,0xf8,0xf4,0x5e,0x77,0x31,0x20,0x17,0xac,0x7,0x18,0xbb,0xa9,0x7d,0x9a,
|
||||
0x96,0xe5,0xba,0x7f,0xcc,0x87,0x63,0xd8,0x9f,0xfc,0x6e,0x7a,0x4f,0xae,0xc9,0x6e,
|
||||
0xb7,0x8b,0x24,0x5d,0x3,0x54,0xac,0xbc,0x78,0xc5,0x32,0x6c,0x3c,0x41,0x75,0xf0,
|
||||
0xf1,0xef,0x9,0x2a,0x99,0xfc,0x91,0xa1,0x3b,0x78,0x7d,0xb7,0x17,0x95,0x2a,0x97,
|
||||
0xcb,0xe5,0xa6,0x26,0xa7,0x50,0xd4,0xc,0xd3,0x83,0xc3,0xec,0x25,0xff,0x18,0xc,
|
||||
0xa8,0x64,0xca,0x68,0x44,0x46,0x9,0x2,0x62,0x40,0x23,0xc4,0xc8,0xb0,0xdd,0x8e,
|
||||
0x47,0xa3,0xdf,0x30,0x1c,0xe3,0x79,0x9e,0xa6,0x33,0x62,0x70,0xd6,0x64,0x32,0x3b,
|
||||
0x46,0x9,0x97,0xd3,0xf1,0x57,0x5e,0x0,0x58,0xb6,0x22,0x49,0x72,0x78,0xf1,0x86,
|
||||
0xd3,0xe9,0x86,0x69,0xb9,0x5c,0x5a,0x5b,0x5d,0xd,0xcd,0x5f,0xef,0x99,0xdc,0xd9,
|
||||
0x88,0x20,0x8a,0x5b,0x5b,0xdb,0x5e,0x9f,0xef,0x76,0xe4,0xe,0x5b,0x2e,0x4a,0x35,
|
||||
0x1,0xc8,0x21,0x2b,0x3e,0xea,0x24,0x3f,0x7e,0x58,0x67,0x18,0x66,0x7a,0x6a,0x82,
|
||||
0x74,0xbb,0x3a,0x55,0x9c,0xaa,0xaa,0xd2,0x50,0x9a,0x4d,0x15,0x45,0x51,0x9b,0xcd,
|
||||
0x66,0x36,0x99,0x6f,0xde,0x8a,0x64,0x33,0xa9,0xb3,0x24,0xd8,0xe8,0x80,0xe6,0x8f,
|
||||
0xa5,0xba,0xc1,0x80,0xb8,0x5c,0x4e,0x8d,0xac,0xc9,0x32,0xbc,0xad,0x28,0x6a,0x78,
|
||||
0xfc,0x68,0x99,0xe3,0xf8,0xe7,0x2b,0x2f,0x25,0xb9,0x95,0x51,0xc8,0x17,0x83,0xd7,
|
||||
0xe6,0x4e,0x4f,0xea,0x8a,0xd2,0x68,0x53,0xab,0xd7,0x83,0xbb,0x8a,0xa2,0x82,0x10,
|
||||
0x49,0x96,0x4a,0xc5,0xa3,0xd7,0x6f,0xde,0x6e,0xc5,0xe2,0xa1,0xf9,0xb9,0xd6,0xa1,
|
||||
0x32,0x2c,0x33,0x17,0x9c,0x1d,0xb1,0x3,0xf0,0x58,0x3c,0xe1,0x26,0xbd,0xb2,0x5c,
|
||||
0xeb,0xee,0x19,0x5c,0x56,0x55,0x5d,0x2c,0xb6,0x6d,0x34,0x1a,0x31,0x3b,0x36,0x33,
|
||||
0x73,0x25,0x30,0xee,0xff,0xdd,0xc8,0xf4,0xe4,0x24,0x84,0x96,0xa7,0xb1,0x1a,0xa0,
|
||||
0xc1,0x6a,0x85,0x73,0x38,0xda,0x8e,0x30,0x10,0x18,0xf7,0x79,0x3c,0x30,0xf0,0x92,
|
||||
0x64,0xef,0xab,0x55,0x2e,0x33,0xa5,0x62,0x1e,0x45,0xad,0x50,0xff,0xe4,0xe9,0x33,
|
||||
0x5e,0xe0,0xcf,0x96,0xaa,0x1c,0x8f,0x20,0xad,0x84,0x8e,0x92,0xb6,0x2d,0xc0,0xa1,
|
||||
0x85,0x70,0x28,0x1a,0xdd,0x1c,0x71,0xba,0x3f,0x7f,0xd9,0x7c,0xb8,0xfc,0x60,0xe2,
|
||||
0x72,0x40,0x5b,0x52,0x9b,0xcd,0x7d,0xfa,0x50,0x14,0xf8,0xa5,0xa5,0x8,0xc3,0x54,
|
||||
0xfa,0xde,0xb,0xb0,0x17,0xa2,0xa1,0x34,0xbe,0x6e,0x6e,0x20,0x6,0xb,0x86,0xdb,
|
||||
0xa1,0xf2,0x97,0x59,0xd5,0xf4,0x5e,0xc6,0xef,0x6b,0x9d,0xa5,0x6d,0x68,0x8,0xa2,
|
||||
0xaf,0xa,0xd,0xc,0xc3,0xda,0x71,0x6c,0x21,0x74,0xf5,0xf8,0x58,0x4a,0x50,0x69,
|
||||
0x8,0x18,0xc0,0xd4,0xeb,0xf5,0x14,0x4b,0x47,0xd0,0xe0,0x80,0xab,0xf5,0x6e,0x6d,
|
||||
0xfd,0xfe,0xbd,0xbb,0x6,0xa4,0xf7,0x4f,0x0,0xea,0xf3,0x85,0x42,0x36,0x9b,0x13,
|
||||
0x45,0x11,0xc3,0xb0,0xc5,0x70,0xa8,0x87,0xa,0x6a,0x27,0xd5,0xaf,0x1e,0x0,0x4b,
|
||||
0x4,0x41,0x24,0x12,0x3b,0x14,0xb5,0xcb,0x71,0x42,0x6f,0x15,0x9c,0x20,0xc,0xe3,
|
||||
0xb8,0xae,0x3f,0xc0,0x9d,0xc6,0x9,0x3c,0xd,0xb5,0xa9,0x6a,0x99,0x9d,0x9f,0xd9,
|
||||
0xf9,0xf5,0x2d,0xd9,0x7a,0xbd,0xc5,0x62,0x86,0x38,0xcf,0xce,0x7f,0xc5,0x7f,0xd8,
|
||||
0xe2,0x27,0x25,0x35,0x22,0x3,0x9a,0x52,0xcb,0xd9,0x0,0x0,0x0,0x0,0x49,0x45,
|
||||
0x4e,0x44,0xae,0x42,0x60,0x82,
|
||||
// /Users/grauser/Documents/DEV/Qt/qwt-6.0.1/designer/pixmaps/qwtthermo.png
|
||||
0x0,0x0,0x2,0x44,
|
||||
0x89,
|
||||
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
|
||||
0x0,0x0,0xd,0x0,0x0,0x0,0x16,0x8,0x2,0x0,0x0,0x0,0x94,0x98,0x81,0x73,
|
||||
0x0,0x0,0x0,0x2a,0x74,0x45,0x58,0x74,0x43,0x72,0x65,0x61,0x74,0x69,0x6f,0x6e,
|
||||
0x20,0x54,0x69,0x6d,0x65,0x0,0x4d,0x69,0x20,0x39,0x20,0x4f,0x6b,0x74,0x20,0x32,
|
||||
0x30,0x30,0x32,0x20,0x32,0x33,0x3a,0x30,0x33,0x3a,0x31,0x31,0x20,0x2b,0x30,0x31,
|
||||
0x30,0x30,0x4c,0x45,0x31,0x92,0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xd2,
|
||||
0xa,0x1b,0xf,0x2,0x6,0x8e,0x83,0x5f,0x31,0x0,0x0,0x0,0x9,0x70,0x48,0x59,
|
||||
0x73,0x0,0x0,0xe,0x74,0x0,0x0,0xe,0x74,0x1,0x6b,0x24,0xb3,0xd6,0x0,0x0,
|
||||
0x0,0x4,0x67,0x41,0x4d,0x41,0x0,0x0,0xb1,0x8f,0xb,0xfc,0x61,0x5,0x0,0x0,
|
||||
0x1,0x9d,0x49,0x44,0x41,0x54,0x78,0xda,0x8d,0x53,0xd9,0x6a,0xc2,0x50,0x10,0xcd,
|
||||
0xe6,0x52,0x12,0x22,0x62,0x44,0x51,0x7c,0xd0,0x44,0x83,0xa2,0xe2,0x77,0xb4,0x8f,
|
||||
0xfd,0x64,0x5f,0x84,0x56,0x2b,0x42,0xab,0xf,0x22,0x28,0xa6,0x5a,0x97,0x98,0xa8,
|
||||
0x91,0xba,0xd2,0xa3,0x57,0x34,0xca,0x6d,0xe9,0x81,0x84,0x99,0x9b,0x99,0x33,0xe7,
|
||||
0xce,0x4c,0xd8,0x72,0xb9,0xcc,0xfc,0x3,0x2,0x9e,0x6a,0xb5,0x2a,0x49,0xd2,0xf2,
|
||||
0x4,0x4d,0xd3,0xe2,0xf1,0xf8,0x62,0xb1,0xc0,0xf9,0x6e,0xb7,0xeb,0xf5,0x7a,0xb9,
|
||||
0x5c,0xce,0xe3,0xf1,0x70,0xf0,0x39,0x8e,0x5b,0xad,0x56,0xfb,0xfd,0x5e,0x10,0x84,
|
||||
0xd9,0x6c,0x86,0x93,0xd1,0x68,0xd4,0x6c,0x36,0x2b,0x95,0x4a,0x24,0x12,0x51,0x55,
|
||||
0xf5,0xcc,0x87,0xc,0xbc,0xd7,0x27,0x84,0xc3,0x61,0xd8,0xa2,0x28,0xb6,0x5a,0x2d,
|
||||
0xe4,0x5f,0xea,0x1e,0x2d,0x9f,0xcf,0x77,0x38,0x1c,0xc0,0x87,0x42,0xe4,0x34,0x1a,
|
||||
0x8d,0xa2,0xfa,0xbd,0x3e,0x0,0xd9,0x96,0x65,0xf9,0xfd,0xfe,0xc9,0x64,0x52,0x28,
|
||||
0x14,0xea,0xf5,0xfa,0xdd,0x3d,0xce,0xcc,0x28,0x14,0x8,0x4,0xb6,0xdb,0x6d,0x28,
|
||||
0x14,0x82,0x5b,0x2a,0x95,0xc8,0x79,0xa7,0x63,0x2d,0x97,0x9b,0x2b,0x5f,0x26,0x93,
|
||||
0x71,0x67,0xf,0x87,0x43,0xc7,0x61,0xde,0x3f,0xe4,0xd7,0x97,0x37,0x5d,0x2f,0x22,
|
||||
0xf7,0xcc,0x67,0x18,0x46,0xbb,0xdd,0xae,0xd5,0x6a,0xb6,0x6d,0x13,0x7d,0xdf,0x6b,
|
||||
0xc6,0xf8,0x7c,0x60,0x39,0xfe,0xa6,0x6e,0x7,0x5,0x2c,0x8b,0x65,0x59,0x18,0x70,
|
||||
0x7f,0xd5,0x97,0xcd,0x66,0x15,0x45,0xf1,0x7a,0xbd,0x30,0xe0,0xa2,0xdb,0xe6,0x74,
|
||||
0x4a,0xb9,0xaf,0x72,0x82,0xfb,0x83,0x2c,0xcb,0x94,0xb8,0xf1,0x78,0xc,0x7d,0x64,
|
||||
0x6e,0xc9,0x64,0x72,0x30,0x18,0xd0,0xeb,0x9a,0xa6,0x9,0x7d,0xe8,0xf6,0x66,0x73,
|
||||
0xec,0x42,0x2c,0x16,0xa3,0xec,0x1,0xa0,0xeb,0x7a,0x3a,0x9d,0x46,0x1c,0x46,0xc,
|
||||
0x17,0x7b,0xc0,0xba,0x86,0x76,0xe5,0x9b,0xcf,0xe7,0xe8,0x19,0x2e,0x8b,0xe9,0x91,
|
||||
0xbe,0xf0,0x3c,0x4f,0x89,0x3,0xba,0xdd,0xae,0xe3,0x38,0x8d,0x46,0xe3,0xaf,0xbe,
|
||||
0x60,0xcf,0xb0,0x29,0xd8,0x97,0x44,0x22,0xe1,0x9e,0xdb,0xbd,0xbe,0x7c,0x3e,0x4f,
|
||||
0xda,0x76,0x99,0x1b,0x9d,0x8f,0x0,0x8b,0x89,0x6,0x11,0x7d,0x74,0x3e,0x2,0x2c,
|
||||
0x62,0xbf,0xdf,0x87,0x0,0xe8,0x93,0x44,0xe6,0xe9,0x31,0xa8,0xa9,0xcf,0xa9,0x54,
|
||||
0xd0,0xb6,0xbf,0x6e,0xe2,0xf0,0x97,0x90,0x2d,0x77,0xeb,0x43,0x10,0xde,0x3f,0x4,
|
||||
0xb,0xc6,0xcd,0x1c,0x98,0xbd,0xf5,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,
|
||||
0x42,0x60,0x82,
|
||||
// /Users/grauser/Documents/DEV/Qt/qwt-6.0.1/designer/pixmaps/qwtwidget.png
|
||||
0x0,0x0,0x4,0x36,
|
||||
0x89,
|
||||
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
|
||||
0x0,0x0,0x16,0x0,0x0,0x0,0x16,0x8,0x3,0x0,0x0,0x0,0xf3,0x6a,0x9c,0x9,
|
||||
0x0,0x0,0x0,0x7,0x74,0x49,0x4d,0x45,0x7,0xd2,0xa,0x9,0x12,0x32,0xe,0xb1,
|
||||
0xf0,0x4e,0xc7,0x0,0x0,0x0,0x9,0x70,0x48,0x59,0x73,0x0,0x0,0xb,0x12,0x0,
|
||||
0x0,0xb,0x12,0x1,0xd2,0xdd,0x7e,0xfc,0x0,0x0,0x0,0x4,0x67,0x41,0x4d,0x41,
|
||||
0x0,0x0,0xb1,0x8f,0xb,0xfc,0x61,0x5,0x0,0x0,0x3,0x0,0x50,0x4c,0x54,0x45,
|
||||
0xf7,0x0,0x0,0xf7,0x8,0x8,0xf7,0x10,0x10,0xff,0x10,0x10,0xff,0x18,0x18,0xff,
|
||||
0x21,0x21,0xff,0x29,0x29,0xff,0x31,0x31,0xff,0x39,0x39,0xff,0x42,0x42,0xff,0x52,
|
||||
0x52,0xff,0x5a,0x5a,0xff,0x63,0x63,0xff,0x6b,0x6b,0xff,0x73,0x73,0xff,0x7b,0x7b,
|
||||
0xff,0x84,0x84,0xff,0x8c,0x8c,0xff,0x94,0x94,0xff,0x9c,0x9c,0xff,0xa5,0xa5,0xff,
|
||||
0xad,0xad,0xff,0xb5,0xb5,0xff,0xbd,0xbd,0xff,0xc6,0xc6,0xff,0xce,0xce,0xff,0xd6,
|
||||
0xd6,0xff,0xde,0xde,0xff,0xe7,0xe7,0xff,0xef,0xef,0xff,0xf7,0xf7,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x21,0x6a,0xf5,0x10,0x0,0x0,0x0,0x20,0x74,0x52,0x4e,0x53,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x5c,0x5c,0x1b,0xed,
|
||||
0x0,0x0,0x0,0x8d,0x49,0x44,0x41,0x54,0x78,0xda,0xbd,0x90,0xdd,0xa,0xc3,0x20,
|
||||
0xc,0x85,0x8d,0xd0,0xfa,0x53,0xb3,0xb6,0xae,0x15,0x5b,0xd4,0xf3,0xfe,0x6f,0xb9,
|
||||
0xb8,0xab,0x6d,0xf4,0x72,0x5b,0x8,0xe4,0xf0,0x41,0x38,0x39,0x51,0xb8,0x2c,0xf5,
|
||||
0x53,0xdc,0xa2,0xd1,0xa1,0x7d,0xe2,0xe6,0xb8,0xb6,0x99,0xdf,0x20,0x43,0xad,0x93,
|
||||
0xcc,0xaa,0x5f,0x60,0x9,0x9,0xca,0xe4,0x2e,0x9,0xd0,0x94,0x61,0xf,0xc,0x22,
|
||||
0x8,0x8a,0x3a,0xcd,0xa3,0x6c,0xc,0x28,0x1a,0xad,0xf7,0x9,0xa5,0xab,0x60,0xbf,
|
||||
0x0,0x5b,0xc0,0xea,0xb1,0x33,0x92,0x15,0xcb,0x69,0x6e,0x95,0x9d,0x5c,0x12,0xf6,
|
||||
0x64,0xe3,0x61,0x2a,0xf8,0x2e,0xb8,0x38,0x1a,0xe3,0xd3,0x5e,0xc7,0x8d,0xec,0x9,
|
||||
0xdc,0x68,0xe9,0x71,0xa8,0x94,0x7a,0x91,0x92,0xc9,0x97,0xff,0x7e,0xf0,0xb,0xf8,
|
||||
0x1,0x79,0x65,0x34,0x9a,0xd3,0x83,0x54,0x7c,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,
|
||||
0x44,0xae,0x42,0x60,0x82,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned char qt_resource_name[] = {
|
||||
// pixmaps
|
||||
0x0,0x7,
|
||||
0x7,0xf,0x38,0x93,
|
||||
0x0,0x70,
|
||||
0x0,0x69,0x0,0x78,0x0,0x6d,0x0,0x61,0x0,0x70,0x0,0x73,
|
||||
// qwtslider.png
|
||||
0x0,0xd,
|
||||
0xb,0x12,0x13,0x47,
|
||||
0x0,0x71,
|
||||
0x0,0x77,0x0,0x74,0x0,0x73,0x0,0x6c,0x0,0x69,0x0,0x64,0x0,0x65,0x0,0x72,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
|
||||
// qwtdial.png
|
||||
0x0,0xb,
|
||||
0xf,0x8e,0x82,0x7,
|
||||
0x0,0x71,
|
||||
0x0,0x77,0x0,0x74,0x0,0x64,0x0,0x69,0x0,0x61,0x0,0x6c,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
|
||||
// qwtwheel.png
|
||||
0x0,0xc,
|
||||
0x4,0xa2,0x2c,0x87,
|
||||
0x0,0x71,
|
||||
0x0,0x77,0x0,0x74,0x0,0x77,0x0,0x68,0x0,0x65,0x0,0x65,0x0,0x6c,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
|
||||
// qwtplot.png
|
||||
0x0,0xb,
|
||||
0x3,0x96,0x81,0xa7,
|
||||
0x0,0x71,
|
||||
0x0,0x77,0x0,0x74,0x0,0x70,0x0,0x6c,0x0,0x6f,0x0,0x74,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
|
||||
// qwtscale.png
|
||||
0x0,0xc,
|
||||
0xb,0x3d,0x24,0x67,
|
||||
0x0,0x71,
|
||||
0x0,0x77,0x0,0x74,0x0,0x73,0x0,0x63,0x0,0x61,0x0,0x6c,0x0,0x65,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
|
||||
// qwtanalogclock.png
|
||||
0x0,0x12,
|
||||
0x3,0xcf,0x42,0x7,
|
||||
0x0,0x71,
|
||||
0x0,0x77,0x0,0x74,0x0,0x61,0x0,0x6e,0x0,0x61,0x0,0x6c,0x0,0x6f,0x0,0x67,0x0,0x63,0x0,0x6c,0x0,0x6f,0x0,0x63,0x0,0x6b,0x0,0x2e,0x0,0x70,0x0,0x6e,
|
||||
0x0,0x67,
|
||||
// qwtcounter.png
|
||||
0x0,0xe,
|
||||
0x7,0x91,0x99,0xc7,
|
||||
0x0,0x71,
|
||||
0x0,0x77,0x0,0x74,0x0,0x63,0x0,0x6f,0x0,0x75,0x0,0x6e,0x0,0x74,0x0,0x65,0x0,0x72,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
|
||||
// qwtcompass.png
|
||||
0x0,0xe,
|
||||
0x5,0xf2,0x81,0xa7,
|
||||
0x0,0x71,
|
||||
0x0,0x77,0x0,0x74,0x0,0x63,0x0,0x6f,0x0,0x6d,0x0,0x70,0x0,0x61,0x0,0x73,0x0,0x73,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
|
||||
// qwtknob.png
|
||||
0x0,0xb,
|
||||
0x5,0xa4,0x81,0x7,
|
||||
0x0,0x71,
|
||||
0x0,0x77,0x0,0x74,0x0,0x6b,0x0,0x6e,0x0,0x6f,0x0,0x62,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
|
||||
// qwtthermo.png
|
||||
0x0,0xd,
|
||||
0x9,0x19,0xb,0x27,
|
||||
0x0,0x71,
|
||||
0x0,0x77,0x0,0x74,0x0,0x74,0x0,0x68,0x0,0x65,0x0,0x72,0x0,0x6d,0x0,0x6f,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
|
||||
// qwtwidget.png
|
||||
0x0,0xd,
|
||||
0xc,0x10,0xe9,0xe7,
|
||||
0x0,0x71,
|
||||
0x0,0x77,0x0,0x74,0x0,0x77,0x0,0x69,0x0,0x64,0x0,0x67,0x0,0x65,0x0,0x74,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned char qt_resource_struct[] = {
|
||||
// :
|
||||
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
|
||||
// :/pixmaps
|
||||
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0xb,0x0,0x0,0x0,0x2,
|
||||
// :/pixmaps/qwtplot.png
|
||||
0x0,0x0,0x0,0x6e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x4,0xab,
|
||||
// :/pixmaps/qwtanalogclock.png
|
||||
0x0,0x0,0x0,0xa8,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x8,0x47,
|
||||
// :/pixmaps/qwtwheel.png
|
||||
0x0,0x0,0x0,0x50,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x3,0x7d,
|
||||
// :/pixmaps/qwtknob.png
|
||||
0x0,0x0,0x1,0x16,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x11,0xdb,
|
||||
// :/pixmaps/qwtcompass.png
|
||||
0x0,0x0,0x0,0xf4,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xd,0xf7,
|
||||
// :/pixmaps/qwtcounter.png
|
||||
0x0,0x0,0x0,0xd2,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x9,0xf1,
|
||||
// :/pixmaps/qwtthermo.png
|
||||
0x0,0x0,0x1,0x32,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x15,0x6,
|
||||
// :/pixmaps/qwtslider.png
|
||||
0x0,0x0,0x0,0x14,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
|
||||
// :/pixmaps/qwtscale.png
|
||||
0x0,0x0,0x0,0x8a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x6,0xce,
|
||||
// :/pixmaps/qwtwidget.png
|
||||
0x0,0x0,0x1,0x52,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x17,0x4e,
|
||||
// :/pixmaps/qwtdial.png
|
||||
0x0,0x0,0x0,0x34,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x1,0xc8,
|
||||
|
||||
};
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
extern Q_CORE_EXPORT bool qRegisterResourceData
|
||||
(int, const unsigned char *, const unsigned char *, const unsigned char *);
|
||||
|
||||
extern Q_CORE_EXPORT bool qUnregisterResourceData
|
||||
(int, const unsigned char *, const unsigned char *, const unsigned char *);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
||||
int QT_MANGLE_NAMESPACE(qInitResources_qwt_designer_plugin)()
|
||||
{
|
||||
QT_PREPEND_NAMESPACE(qRegisterResourceData)
|
||||
(0x01, qt_resource_struct, qt_resource_name, qt_resource_data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_qwt_designer_plugin))
|
||||
|
||||
int QT_MANGLE_NAMESPACE(qCleanupResources_qwt_designer_plugin)()
|
||||
{
|
||||
QT_PREPEND_NAMESPACE(qUnregisterResourceData)
|
||||
(0x01, qt_resource_struct, qt_resource_name, qt_resource_data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Q_DESTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qCleanupResources_qwt_designer_plugin))
|
||||
1521
qwt/doc/Doxyfile
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 16 KiB |
161
qwt/doc/qwt.dox
@@ -1,161 +0,0 @@
|
||||
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
|
||||
* Qwt Widget Library
|
||||
* Copyright (C) 1997 Josef Wilgen
|
||||
* Copyright (C) 2002 Uwe Rathmann
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the Qwt License, Version 1.0
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
This file contains NO source code, just some documentation for doxygen to
|
||||
parse.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\mainpage Qwt - Qt Widgets for Technical Applications
|
||||
|
||||
The Qwt library contains GUI Components and utility classes which are primarily
|
||||
useful for programs with a technical background. Beside a 2D plot widget
|
||||
it provides scales, sliders, dials, compasses, thermometers, wheels and knobs
|
||||
to control or display values, arrays, or ranges of type double.
|
||||
|
||||
\image html plot.png
|
||||
|
||||
\if homepage
|
||||
\section homepage Project page
|
||||
The official project page is hosted at
|
||||
<a href="http://qwt.sourceforge.net">sourceforge</a>
|
||||
\endif
|
||||
|
||||
\section license License
|
||||
|
||||
Qwt is distributed under the terms of the \ref qwtlicense.
|
||||
|
||||
\section platforms Platforms
|
||||
|
||||
Qwt 5.x might be usable in all environments where you find
|
||||
<a href="http://www.trolltech.com/products/qt">Qt</a>.
|
||||
It is compatible with Qt 3.3.x and Qt 4.x, but the documentation
|
||||
is generated for Qt 4.x.\n
|
||||
|
||||
\section screenshotsonmainpage Screenshots
|
||||
- \ref curvescreenshots\n
|
||||
- \ref scatterscreenshots\n
|
||||
- \ref spectrogramscreenshots\n
|
||||
- \ref histogramscreenshots\n
|
||||
- \ref controlscreenshots\n
|
||||
|
||||
\latexonly Screenshots are only available in the HTML docs.\endlatexonly
|
||||
|
||||
\section downloads Downloads
|
||||
Stable releases, prereleases and snapshots are available at the Qwt <a href="http://sourceforge.net/projects/qwt">project page</a>.
|
||||
|
||||
For getting a snapshot with all bugfixes for the latest 5.2 release:
|
||||
\code svn co https://qwt.svn.sourceforge.net/svnroot/qwt/branches/qwt-5.2 \endcode
|
||||
|
||||
For getting a development snapshot from the SVN repository:
|
||||
\code svn co https://qwt.svn.sourceforge.net/svnroot/qwt/trunk/qwt \endcode
|
||||
|
||||
Qwt doesn't distribute binary packages, but today all major Linux distributors
|
||||
offer one. Note, that these packages often don't include the examples.
|
||||
|
||||
\section installonmainpage Installation
|
||||
|
||||
Have a look at the qwt.pro project file. It is prepared for building
|
||||
dynamic libraries in Win32 and Unix/X11 environments.
|
||||
If you don't know what to do with it, read the file \ref qwtinstall and/or
|
||||
Trolltechs
|
||||
<a href="http://www.trolltech.com/developer/documentation/index.html">qmake</a> documentation. Once you have build the library you have to install
|
||||
all files from the lib, include and doc directories.
|
||||
|
||||
\section support Support
|
||||
- Mailing list\n
|
||||
For all kind of Qwt related questions use the Qwt <a href="http://sourceforge.net/mail/?group_id=13693">mailing list</a>.\n
|
||||
If you prefer newsgroups use the mail to news gateway of <a href="http://dir.gmane.org/gmane.comp.graphics.qwt.general">Gmane</a>.
|
||||
|
||||
- Forum\n
|
||||
<a href="http://www.qtcentre.org">Qt Centre</a> is a great resource for Qt
|
||||
related questions. It has a sub forum, that is dedicated to
|
||||
Qwt related questions.
|
||||
|
||||
- Individual support\n
|
||||
If you are looking for individual support, or need someone who implements
|
||||
your Qwt component/application contact qwt-support@tigertal.de.
|
||||
|
||||
\section relatedprojects Related Projects
|
||||
|
||||
<a href="http://qwtpolar.sourceforge.net">QwtPolar</a>, a polar plot widget.\n
|
||||
<a href="http://qwtplot3d.sourceforge.net">QwtPlot3D</a>, an OpenGL 3D plot widget.\n
|
||||
<a href="http://soft.proindependent.com/qtiplot.html">QtiPlot</a>,
|
||||
data analysis and scientific plotting tool, using QwtPlot.
|
||||
|
||||
\section languagebindings Language Bindings
|
||||
|
||||
<a href="http://pyqwt.sourceforge.net">PyQwt</a>, a set of Qwt Python bindings.\n
|
||||
<a href="http://rubyforge.org/projects/korundum/">Korundum/QtRuby</a>, including a set of Qwt Ruby bindings.\n
|
||||
|
||||
\section donations Donations
|
||||
|
||||
Sourceforge offers a <a href="http://sourceforge.net/docman/display_doc.php?docid=20244&group_id=1"> Donation System</a> via PayPal. You can use it, if you like to <a href="http://sourceforge.net/project/project_donations.php?group_id=13693">support</a> the development of Qwt.
|
||||
|
||||
\section credits Credits:
|
||||
\par Authors:
|
||||
Uwe Rathmann, Josef Wilgen ( <= Qwt 0.2 )
|
||||
\par Project admin:
|
||||
Uwe Rathmann \<rathmann@users.sourceforge.net\>
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page qwtlicense Qwt License, Version 1.0
|
||||
\include "COPYING"
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page qwtinstall INSTALL
|
||||
\include "INSTALL"
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page curvescreenshots Curve Plots
|
||||
\image html plot.png
|
||||
|
||||
\image html sinus.png
|
||||
|
||||
\image html cpuplot.png
|
||||
|
||||
\image html graph.png
|
||||
|
||||
\image html curves.png
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page scatterscreenshots Scatter Plot
|
||||
\image html scatterplot.png
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page spectrogramscreenshots Spectrogram, Contour Plot
|
||||
\image html spectrogram1.png
|
||||
|
||||
\image html spectrogram2.png
|
||||
|
||||
\image html spectrogram3.png
|
||||
|
||||
/*!
|
||||
\page histogramscreenshots Histogram
|
||||
\image html histogram.png
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page controlscreenshots Dials, Compasses, Knobs, Wheels, Sliders, Thermos
|
||||
\image html radio.png
|
||||
|
||||
\image html sliders.png
|
||||
|
||||
\image html dials1.png
|
||||
|
||||
\image html dials2.png
|
||||
|
||||
\image html sysinfo.png
|
||||
*/
|
||||
@@ -1,23 +1,23 @@
|
||||
# -*- mode: sh -*- ################################################
|
||||
################################################################
|
||||
# Qwt Widget Library
|
||||
# Copyright (C) 1997 Josef Wilgen
|
||||
# Copyright (C) 2002 Uwe Rathmann
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the Qwt License, Version 1.0
|
||||
###################################################################
|
||||
################################################################
|
||||
|
||||
include( ../examples.pri )
|
||||
include( $${PWD}/../examples.pri )
|
||||
|
||||
TARGET = bode
|
||||
QT += svg
|
||||
|
||||
HEADERS = \
|
||||
bode.h \
|
||||
bode_plot.h \
|
||||
cplx.h \
|
||||
pixmaps.h
|
||||
mainwindow.h \
|
||||
plot.h \
|
||||
complexnumber.h \
|
||||
pixmaps.h
|
||||
|
||||
SOURCES = \
|
||||
bode.cpp \
|
||||
bode_plot.cpp
|
||||
plot.cpp \
|
||||
mainwindow.cpp \
|
||||
main.cpp
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#include <qwt_plot.h>
|
||||
|
||||
class QwtPlotCurve;
|
||||
class QwtPlotMarker;
|
||||
|
||||
class BodePlot: public QwtPlot
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BodePlot(QWidget *parent);
|
||||
|
||||
public slots:
|
||||
void setDamp(double damping);
|
||||
|
||||
private:
|
||||
void showData(double *frequency, double *amplitude,
|
||||
double *phase, int count);
|
||||
void showPeak(double freq, double amplitude);
|
||||
void show3dB(double freq);
|
||||
|
||||
QwtPlotCurve *d_crv1;
|
||||
QwtPlotCurve *d_crv2;
|
||||
QwtPlotMarker *d_mrk1;
|
||||
QwtPlotMarker *d_mrk2;
|
||||
};
|
||||
83
qwt/examples/bode/complexnumber.h
Normal file
@@ -0,0 +1,83 @@
|
||||
#ifndef _COMPLEX_NUMBER_H_
|
||||
#define _COMPLEX_NUMBER_H_
|
||||
|
||||
#include <math.h>
|
||||
|
||||
class ComplexNumber
|
||||
{
|
||||
public:
|
||||
ComplexNumber() ;
|
||||
ComplexNumber(double r, double i = 0.0);
|
||||
|
||||
double real() const;
|
||||
double imag() const;
|
||||
|
||||
friend ComplexNumber operator*(
|
||||
const ComplexNumber &, const ComplexNumber &);
|
||||
|
||||
friend ComplexNumber operator+(
|
||||
const ComplexNumber &, const ComplexNumber &);
|
||||
|
||||
friend ComplexNumber operator-(
|
||||
const ComplexNumber &, const ComplexNumber &);
|
||||
friend ComplexNumber operator/(
|
||||
const ComplexNumber &, const ComplexNumber &);
|
||||
|
||||
private:
|
||||
double d_real;
|
||||
double d_imag;
|
||||
};
|
||||
|
||||
inline ComplexNumber::ComplexNumber():
|
||||
d_real(0.0),
|
||||
d_imag(-0.0)
|
||||
{
|
||||
}
|
||||
|
||||
inline ComplexNumber::ComplexNumber(double re, double im):
|
||||
d_real(re),
|
||||
d_imag(im)
|
||||
{
|
||||
}
|
||||
|
||||
inline double ComplexNumber::real() const
|
||||
{
|
||||
return d_real;
|
||||
}
|
||||
|
||||
inline double ComplexNumber::imag() const
|
||||
{
|
||||
return d_imag;
|
||||
}
|
||||
|
||||
inline ComplexNumber operator+(
|
||||
const ComplexNumber &x1, const ComplexNumber &x2)
|
||||
{
|
||||
return ComplexNumber(x1.d_real + x2.d_real, x1.d_imag + x2.d_imag);
|
||||
}
|
||||
|
||||
inline ComplexNumber operator-(
|
||||
const ComplexNumber &x1, const ComplexNumber &x2)
|
||||
{
|
||||
return ComplexNumber(x1.d_real - x2.d_real, x1.d_imag - x2.d_imag);
|
||||
}
|
||||
|
||||
inline ComplexNumber operator*(
|
||||
const ComplexNumber &x1, const ComplexNumber &x2)
|
||||
{
|
||||
return ComplexNumber(x1.d_real * x2.d_real - x1.d_imag * x2.d_imag,
|
||||
x1.d_real * x2.d_imag + x2.d_real * x1.d_imag);
|
||||
}
|
||||
|
||||
inline ComplexNumber operator/(
|
||||
const ComplexNumber &x1, const ComplexNumber &x2)
|
||||
{
|
||||
double denom = x2.d_real * x2.d_real + x2.d_imag * x2.d_imag;
|
||||
|
||||
return ComplexNumber(
|
||||
(x1.d_real * x2.d_real + x1.d_imag * x2.d_imag) / denom,
|
||||
(x1.d_imag * x2.d_real - x2.d_imag * x1.d_real) / denom
|
||||
);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,62 +0,0 @@
|
||||
#ifndef BODE_CPLX_H
|
||||
#define BODE_CPLX_H
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
||||
class cplx {
|
||||
private:
|
||||
double re,im;
|
||||
|
||||
public:
|
||||
|
||||
double real() {return re;}
|
||||
double imag() {return im;}
|
||||
|
||||
cplx() {
|
||||
re = 0.0;
|
||||
im = -0.0;
|
||||
}
|
||||
|
||||
cplx& operator= (cplx a) {
|
||||
re = a.re;
|
||||
im = a.im;
|
||||
return *this;
|
||||
}
|
||||
|
||||
cplx(double r, double i = 0.0) {
|
||||
re = r;
|
||||
im = i;
|
||||
}
|
||||
|
||||
friend cplx operator * (cplx x1, cplx x2);
|
||||
friend cplx operator + (cplx x1, cplx x2);
|
||||
friend cplx operator - (cplx x1, cplx x2);
|
||||
friend cplx operator / (cplx x1, cplx x2);
|
||||
|
||||
};
|
||||
|
||||
inline cplx operator+(cplx x1, cplx x2)
|
||||
{
|
||||
return cplx(x1.re + x2.re, x1.im + x2.im);
|
||||
}
|
||||
|
||||
inline cplx operator-(cplx x1, cplx x2)
|
||||
{
|
||||
return cplx(x1.re - x2.re, x1.im - x2.im);
|
||||
}
|
||||
|
||||
inline cplx operator*(cplx x1, cplx x2)
|
||||
{
|
||||
return cplx(x1.re * x2.re - x1.im * x2.im,
|
||||
x1.re * x2.im + x2.re * x1.im);
|
||||
}
|
||||
|
||||
inline cplx operator/(cplx x1, cplx x2)
|
||||
{
|
||||
double denom = x2.re * x2.re + x2.im * x2.im;
|
||||
return cplx( (x1.re * x2.re + x1.im * x2.im) /denom,
|
||||
(x1.im * x2.re - x2.im * x1.re) / denom);
|
||||
}
|
||||
|
||||
#endif
|
||||
13
qwt/examples/bode/main.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <qapplication.h>
|
||||
#include "mainwindow.h"
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
MainWindow w;
|
||||
w.resize(540,400);
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
#include <qregexp.h>
|
||||
#include <qapplication.h>
|
||||
#include <qtoolbar.h>
|
||||
#include <qtoolbutton.h>
|
||||
#include <qlabel.h>
|
||||
@@ -9,25 +8,19 @@
|
||||
#include <qpicture.h>
|
||||
#include <qpainter.h>
|
||||
#include <qfiledialog.h>
|
||||
#if QT_VERSION >= 0x040300
|
||||
#ifdef QT_SVG_LIB
|
||||
#include <qsvggenerator.h>
|
||||
#endif
|
||||
#endif
|
||||
#if QT_VERSION >= 0x040000
|
||||
#include <qimagewriter.h>
|
||||
#include <qprintdialog.h>
|
||||
#include <qfileinfo.h>
|
||||
#else
|
||||
#include <qwt_painter.h>
|
||||
#endif
|
||||
#include <qwt_counter.h>
|
||||
#include <qwt_picker_machine.h>
|
||||
#include <qwt_plot_zoomer.h>
|
||||
#include <qwt_plot_panner.h>
|
||||
#include <qwt_plot_renderer.h>
|
||||
#include <qwt_text.h>
|
||||
#include <qwt_math.h>
|
||||
#include "pixmaps.h"
|
||||
#include "bode_plot.h"
|
||||
#include "bode.h"
|
||||
#include "plot.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
class Zoomer: public QwtPlotZoomer
|
||||
{
|
||||
@@ -35,20 +28,14 @@ public:
|
||||
Zoomer(int xAxis, int yAxis, QwtPlotCanvas *canvas):
|
||||
QwtPlotZoomer(xAxis, yAxis, canvas)
|
||||
{
|
||||
setSelectionFlags(QwtPicker::DragSelection | QwtPicker::CornerToCorner);
|
||||
setTrackerMode(QwtPicker::AlwaysOff);
|
||||
setRubberBand(QwtPicker::NoRubberBand);
|
||||
|
||||
// RightButton: zoom out by 1
|
||||
// Ctrl+RightButton: zoom out to full size
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
setMousePattern(QwtEventPattern::MouseSelect2,
|
||||
Qt::RightButton, Qt::ControlButton);
|
||||
#else
|
||||
setMousePattern(QwtEventPattern::MouseSelect2,
|
||||
Qt::RightButton, Qt::ControlModifier);
|
||||
#endif
|
||||
setMousePattern(QwtEventPattern::MouseSelect3,
|
||||
Qt::RightButton);
|
||||
}
|
||||
@@ -64,17 +51,17 @@ public:
|
||||
//
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
MainWin::MainWin(QWidget *parent):
|
||||
MainWindow::MainWindow(QWidget *parent):
|
||||
QMainWindow(parent)
|
||||
{
|
||||
d_plot = new BodePlot(this);
|
||||
d_plot->setMargin(5);
|
||||
d_plot = new Plot(this);
|
||||
|
||||
const int margin = 5;
|
||||
d_plot->setContentsMargins( margin, margin, margin, 0 );
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
setContextMenuPolicy(Qt::NoContextMenu);
|
||||
#endif
|
||||
|
||||
d_zoomer[0] = new Zoomer( QwtPlot::xBottom, QwtPlot::yLeft,
|
||||
d_zoomer[0] = new Zoomer( QwtPlot::xBottom, QwtPlot::yLeft,
|
||||
d_plot->canvas());
|
||||
d_zoomer[0]->setRubberBand(QwtPicker::RectRubberBand);
|
||||
d_zoomer[0]->setRubberBandPen(QColor(Qt::green));
|
||||
@@ -83,14 +70,14 @@ MainWin::MainWin(QWidget *parent):
|
||||
|
||||
d_zoomer[1] = new Zoomer(QwtPlot::xTop, QwtPlot::yRight,
|
||||
d_plot->canvas());
|
||||
|
||||
|
||||
d_panner = new QwtPlotPanner(d_plot->canvas());
|
||||
d_panner->setMouseButton(Qt::MidButton);
|
||||
|
||||
d_picker = new QwtPlotPicker(QwtPlot::xBottom, QwtPlot::yLeft,
|
||||
QwtPicker::PointSelection | QwtPicker::DragSelection,
|
||||
QwtPlotPicker::CrossRubberBand, QwtPicker::AlwaysOn,
|
||||
QwtPlotPicker::CrossRubberBand, QwtPicker::AlwaysOn,
|
||||
d_plot->canvas());
|
||||
d_picker->setStateMachine(new QwtPickerDragPointMachine());
|
||||
d_picker->setRubberBandPen(QColor(Qt::green));
|
||||
d_picker->setRubberBand(QwtPicker::CrossRubberBand);
|
||||
d_picker->setTrackerPen(QColor(Qt::white));
|
||||
@@ -100,52 +87,29 @@ MainWin::MainWin(QWidget *parent):
|
||||
QToolBar *toolBar = new QToolBar(this);
|
||||
|
||||
QToolButton *btnZoom = new QToolButton(toolBar);
|
||||
#if QT_VERSION >= 0x040000
|
||||
btnZoom->setText("Zoom");
|
||||
btnZoom->setIcon(QIcon(zoom_xpm));
|
||||
btnZoom->setCheckable(true);
|
||||
btnZoom->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||
#else
|
||||
btnZoom->setTextLabel("Zoom");
|
||||
btnZoom->setPixmap(zoom_xpm);
|
||||
btnZoom->setToggleButton(true);
|
||||
btnZoom->setUsesTextLabel(true);
|
||||
#endif
|
||||
toolBar->addWidget(btnZoom);
|
||||
connect(btnZoom, SIGNAL(toggled(bool)), SLOT(enableZoomMode(bool)));
|
||||
|
||||
#ifndef QT_NO_PRINTER
|
||||
QToolButton *btnPrint = new QToolButton(toolBar);
|
||||
#if QT_VERSION >= 0x040000
|
||||
btnPrint->setText("Print");
|
||||
btnPrint->setIcon(QIcon(print_xpm));
|
||||
btnPrint->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||
#else
|
||||
btnPrint->setTextLabel("Print");
|
||||
btnPrint->setPixmap(print_xpm);
|
||||
btnPrint->setUsesTextLabel(true);
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
QToolButton *btnSVG = new QToolButton(toolBar);
|
||||
btnSVG->setTextLabel("SVG");
|
||||
btnSVG->setPixmap(print_xpm);
|
||||
btnSVG->setUsesTextLabel(true);
|
||||
#elif QT_VERSION >= 0x040300
|
||||
#ifdef QT_SVG_LIB
|
||||
QToolButton *btnSVG = new QToolButton(toolBar);
|
||||
btnSVG->setText("SVG");
|
||||
btnSVG->setIcon(QIcon(print_xpm));
|
||||
btnSVG->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
toolBar->addWidget(btnZoom);
|
||||
toolBar->addWidget(btnPrint);
|
||||
#if QT_VERSION >= 0x040300
|
||||
#ifdef QT_SVG_LIB
|
||||
toolBar->addWidget(btnSVG);
|
||||
#endif
|
||||
#endif
|
||||
connect(btnPrint, SIGNAL(clicked()), SLOT(print()));
|
||||
#endif
|
||||
|
||||
QToolButton *btnExport = new QToolButton(toolBar);
|
||||
btnExport->setText("Export");
|
||||
btnExport->setIcon(QIcon(print_xpm));
|
||||
btnExport->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||
toolBar->addWidget(btnExport);
|
||||
connect(btnExport, SIGNAL(clicked()), SLOT(exportDocument()));
|
||||
|
||||
toolBar->addSeparator();
|
||||
|
||||
QWidget *hBox = new QWidget(toolBar);
|
||||
@@ -159,14 +123,10 @@ MainWin::MainWin(QWidget *parent):
|
||||
QwtCounter *cntDamp = new QwtCounter(hBox);
|
||||
cntDamp->setRange(0.0, 5.0, 0.01);
|
||||
cntDamp->setValue(0.0);
|
||||
|
||||
|
||||
layout->addWidget(cntDamp, 0);
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
(void)toolBar->addWidget(hBox);
|
||||
#else
|
||||
toolBar->setStretchableWidget(hBox);
|
||||
#endif
|
||||
|
||||
addToolBar(toolBar);
|
||||
#ifndef QT_NO_STATUSBAR
|
||||
@@ -176,39 +136,20 @@ MainWin::MainWin(QWidget *parent):
|
||||
enableZoomMode(false);
|
||||
showInfo();
|
||||
|
||||
connect(cntDamp, SIGNAL(valueChanged(double)),
|
||||
d_plot, SLOT(setDamp(double)));
|
||||
|
||||
connect(btnPrint, SIGNAL(clicked()), SLOT(print()));
|
||||
#if QT_VERSION < 0x040000
|
||||
connect(btnSVG, SIGNAL(clicked()), SLOT(exportSVG()));
|
||||
#elif QT_VERSION >= 0x040300
|
||||
#ifdef QT_SVG_LIB
|
||||
connect(btnSVG, SIGNAL(clicked()), SLOT(exportSVG()));
|
||||
#endif
|
||||
#endif
|
||||
connect(btnZoom, SIGNAL(toggled(bool)), SLOT(enableZoomMode(bool)));
|
||||
connect(cntDamp, SIGNAL(valueChanged(double)),
|
||||
d_plot, SLOT(setDamp(double)));
|
||||
|
||||
connect(d_picker, SIGNAL(moved(const QPoint &)),
|
||||
SLOT(moved(const QPoint &)));
|
||||
connect(d_picker, SIGNAL(selected(const QwtPolygon &)),
|
||||
SLOT(selected(const QwtPolygon &)));
|
||||
connect(d_picker, SIGNAL(selected(const QPolygon &)),
|
||||
SLOT(selected(const QPolygon &)));
|
||||
}
|
||||
|
||||
void MainWin::print()
|
||||
#ifndef QT_NO_PRINTER
|
||||
|
||||
void MainWindow::print()
|
||||
{
|
||||
#if 1
|
||||
QPrinter printer;
|
||||
#else
|
||||
QPrinter printer(QPrinter::HighResolution);
|
||||
#if QT_VERSION < 0x040000
|
||||
printer.setOutputToFile(true);
|
||||
printer.setOutputFileName("/tmp/bode.ps");
|
||||
printer.setColorMode(QPrinter::Color);
|
||||
#else
|
||||
printer.setOutputFileName("/tmp/bode.pdf");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
QString docName = d_plot->title().text();
|
||||
if ( !docName.isEmpty() )
|
||||
@@ -220,71 +161,75 @@ void MainWin::print()
|
||||
printer.setCreator("Bode example");
|
||||
printer.setOrientation(QPrinter::Landscape);
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
QPrintDialog dialog(&printer);
|
||||
if ( dialog.exec() )
|
||||
{
|
||||
#else
|
||||
if (printer.setup())
|
||||
{
|
||||
#endif
|
||||
QwtPlotPrintFilter filter;
|
||||
QwtPlotRenderer renderer;
|
||||
|
||||
if ( printer.colorMode() == QPrinter::GrayScale )
|
||||
{
|
||||
int options = QwtPlotPrintFilter::PrintAll;
|
||||
options &= ~QwtPlotPrintFilter::PrintBackground;
|
||||
options |= QwtPlotPrintFilter::PrintFrameWithScales;
|
||||
filter.setOptions(options);
|
||||
renderer.setDiscardFlag(QwtPlotRenderer::DiscardCanvasBackground);
|
||||
renderer.setLayoutFlag(QwtPlotRenderer::FrameWithScales);
|
||||
}
|
||||
d_plot->print(printer, filter);
|
||||
|
||||
renderer.renderTo(d_plot, printer);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWin::exportSVG()
|
||||
#endif
|
||||
|
||||
void MainWindow::exportDocument()
|
||||
{
|
||||
QString fileName = "bode.svg";
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
#ifndef QT_NO_PRINTER
|
||||
QString fileName = "bode.pdf";
|
||||
#else
|
||||
QString fileName = "bode.png";
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
fileName = QFileDialog::getSaveFileName(
|
||||
"bode.svg", "SVG Documents (*.svg)", this);
|
||||
const QList<QByteArray> imageFormats =
|
||||
QImageWriter::supportedImageFormats();
|
||||
|
||||
QStringList filter;
|
||||
filter += "PDF Documents (*.pdf)";
|
||||
#ifndef QWT_NO_SVG
|
||||
filter += "SVG Documents (*.svg)";
|
||||
#endif
|
||||
if ( !fileName.isEmpty() )
|
||||
filter += "Postscript Documents (*.ps)";
|
||||
|
||||
if ( imageFormats.size() > 0 )
|
||||
{
|
||||
// enable workaround for Qt3 misalignments
|
||||
QwtPainter::setSVGMode(true);
|
||||
QString imageFilter("Images (");
|
||||
for ( int i = 0; i < imageFormats.size(); i++ )
|
||||
{
|
||||
if ( i > 0 )
|
||||
imageFilter += " ";
|
||||
imageFilter += "*.";
|
||||
imageFilter += imageFormats[i];
|
||||
}
|
||||
imageFilter += ")";
|
||||
|
||||
QPicture picture;
|
||||
|
||||
QPainter p(&picture);
|
||||
d_plot->print(&p, QRect(0, 0, 800, 600));
|
||||
p.end();
|
||||
|
||||
picture.save(fileName, "svg");
|
||||
filter += imageFilter;
|
||||
}
|
||||
|
||||
#elif QT_VERSION >= 0x040300
|
||||
|
||||
#ifdef QT_SVG_LIB
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
fileName = QFileDialog::getSaveFileName(
|
||||
this, "Export File Name", QString(),
|
||||
"SVG Documents (*.svg)");
|
||||
this, "Export File Name", fileName,
|
||||
filter.join(";;"), NULL, QFileDialog::DontConfirmOverwrite);
|
||||
#endif
|
||||
|
||||
if ( !fileName.isEmpty() )
|
||||
{
|
||||
QSvgGenerator generator;
|
||||
generator.setFileName(fileName);
|
||||
generator.setSize(QSize(800, 600));
|
||||
QwtPlotRenderer renderer;
|
||||
|
||||
d_plot->print(generator);
|
||||
// flags to make the document look like the widget
|
||||
renderer.setDiscardFlag(QwtPlotRenderer::DiscardBackground, false);
|
||||
renderer.setLayoutFlag(QwtPlotRenderer::KeepFrames, true);
|
||||
|
||||
renderer.renderDocument(d_plot, fileName, QSizeF(300, 200), 85);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWin::enableZoomMode(bool on)
|
||||
void MainWindow::enableZoomMode(bool on)
|
||||
{
|
||||
d_panner->setEnabled(on);
|
||||
|
||||
@@ -299,7 +244,7 @@ void MainWin::enableZoomMode(bool on)
|
||||
showInfo();
|
||||
}
|
||||
|
||||
void MainWin::showInfo(QString text)
|
||||
void MainWindow::showInfo(QString text)
|
||||
{
|
||||
if ( text == QString::null )
|
||||
{
|
||||
@@ -310,15 +255,11 @@ void MainWin::showInfo(QString text)
|
||||
}
|
||||
|
||||
#ifndef QT_NO_STATUSBAR
|
||||
#if QT_VERSION >= 0x040000
|
||||
statusBar()->showMessage(text);
|
||||
#else
|
||||
statusBar()->message(text);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWin::moved(const QPoint &pos)
|
||||
void MainWindow::moved(const QPoint &pos)
|
||||
{
|
||||
QString info;
|
||||
info.sprintf("Freq=%g, Ampl=%g, Phase=%g",
|
||||
@@ -329,22 +270,7 @@ void MainWin::moved(const QPoint &pos)
|
||||
showInfo(info);
|
||||
}
|
||||
|
||||
void MainWin::selected(const QwtPolygon &)
|
||||
void MainWindow::selected(const QPolygon &)
|
||||
{
|
||||
showInfo();
|
||||
}
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
MainWin w;
|
||||
#if QT_VERSION < 0x040000
|
||||
a.setMainWidget(&w);
|
||||
#endif
|
||||
w.resize(540,400);
|
||||
w.show();
|
||||
|
||||
int rv = a.exec();
|
||||
return rv;
|
||||
}
|
||||
@@ -1,30 +1,33 @@
|
||||
#include <qmainwindow.h>
|
||||
#include <qwt_polygon.h>
|
||||
|
||||
class QwtPlotZoomer;
|
||||
class QwtPlotPicker;
|
||||
class QwtPlotPanner;
|
||||
class BodePlot;
|
||||
class Plot;
|
||||
class QPolygon;
|
||||
|
||||
class MainWin : public QMainWindow
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWin(QWidget *parent = 0);
|
||||
MainWindow(QWidget *parent = 0);
|
||||
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void moved(const QPoint &);
|
||||
void selected(const QwtPolygon &);
|
||||
|
||||
void selected(const QPolygon &);
|
||||
|
||||
#ifndef QT_NO_PRINTER
|
||||
void print();
|
||||
void exportSVG();
|
||||
#endif
|
||||
|
||||
void exportDocument();
|
||||
void enableZoomMode(bool);
|
||||
|
||||
private:
|
||||
void showInfo(QString text = QString::null);
|
||||
|
||||
BodePlot *d_plot;
|
||||
Plot *d_plot;
|
||||
|
||||
QwtPlotZoomer *d_zoomer[2];
|
||||
QwtPlotPicker *d_picker;
|
||||
@@ -6,11 +6,17 @@
|
||||
#include <qwt_plot_curve.h>
|
||||
#include <qwt_legend.h>
|
||||
#include <qwt_text.h>
|
||||
#include "cplx.h"
|
||||
#include "bode_plot.h"
|
||||
#include <qmath.h>
|
||||
#include "complexnumber.h"
|
||||
#include "plot.h"
|
||||
|
||||
#if QT_VERSION < 0x040601
|
||||
#define qExp(x) ::exp(x)
|
||||
#define qAtan2(y, x) ::atan2(y, x)
|
||||
#endif
|
||||
|
||||
static void logSpace(double *array, int size, double xmin, double xmax)
|
||||
{
|
||||
{
|
||||
if ((xmin <= 0.0) || (xmax <= 0.0) || (size <= 0))
|
||||
return;
|
||||
|
||||
@@ -24,10 +30,10 @@ static void logSpace(double *array, int size, double xmin, double xmax)
|
||||
const double lstep = (lxmax - lxmin) / double(imax);
|
||||
|
||||
for (int i = 1; i < imax; i++)
|
||||
array[i] = exp(lxmin + double(i) * lstep);
|
||||
array[i] = qExp(lxmin + double(i) * lstep);
|
||||
}
|
||||
|
||||
BodePlot::BodePlot(QWidget *parent):
|
||||
Plot::Plot(QWidget *parent):
|
||||
QwtPlot(parent)
|
||||
{
|
||||
setAutoReplot(false);
|
||||
@@ -38,10 +44,9 @@ BodePlot::BodePlot(QWidget *parent):
|
||||
|
||||
// legend
|
||||
QwtLegend *legend = new QwtLegend;
|
||||
legend->setFrameStyle(QFrame::Box|QFrame::Sunken);
|
||||
insertLegend(legend, QwtPlot::BottomLegend);
|
||||
|
||||
// grid
|
||||
// grid
|
||||
QwtPlotGrid *grid = new QwtPlotGrid;
|
||||
grid->enableXMin(true);
|
||||
grid->setMajPen(QPen(Qt::white, 0, Qt::DotLine));
|
||||
@@ -57,53 +62,51 @@ BodePlot::BodePlot(QWidget *parent):
|
||||
setAxisMaxMajor(QwtPlot::xBottom, 6);
|
||||
setAxisMaxMinor(QwtPlot::xBottom, 10);
|
||||
setAxisScaleEngine(QwtPlot::xBottom, new QwtLog10ScaleEngine);
|
||||
|
||||
|
||||
// curves
|
||||
d_crv1 = new QwtPlotCurve("Amplitude");
|
||||
#if QT_VERSION >= 0x040000
|
||||
d_crv1->setRenderHint(QwtPlotItem::RenderAntialiased);
|
||||
#endif
|
||||
d_crv1->setPen(QPen(Qt::yellow));
|
||||
d_crv1->setYAxis(QwtPlot::yLeft);
|
||||
d_crv1->attach(this);
|
||||
d_curve1 = new QwtPlotCurve("Amplitude");
|
||||
d_curve1->setRenderHint(QwtPlotItem::RenderAntialiased);
|
||||
d_curve1->setPen(QPen(Qt::yellow));
|
||||
d_curve1->setLegendAttribute(QwtPlotCurve::LegendShowLine);
|
||||
d_curve1->setYAxis(QwtPlot::yLeft);
|
||||
d_curve1->attach(this);
|
||||
|
||||
d_curve2 = new QwtPlotCurve("Phase");
|
||||
d_curve2->setRenderHint(QwtPlotItem::RenderAntialiased);
|
||||
d_curve2->setPen(QPen(Qt::cyan));
|
||||
d_curve2->setLegendAttribute(QwtPlotCurve::LegendShowLine);
|
||||
d_curve2->setYAxis(QwtPlot::yRight);
|
||||
d_curve2->attach(this);
|
||||
|
||||
d_crv2 = new QwtPlotCurve("Phase");
|
||||
#if QT_VERSION >= 0x040000
|
||||
d_crv2->setRenderHint(QwtPlotItem::RenderAntialiased);
|
||||
#endif
|
||||
d_crv2->setPen(QPen(Qt::cyan));
|
||||
d_crv2->setYAxis(QwtPlot::yRight);
|
||||
d_crv2->attach(this);
|
||||
|
||||
// marker
|
||||
d_mrk1 = new QwtPlotMarker();
|
||||
d_mrk1->setValue(0.0, 0.0);
|
||||
d_mrk1->setLineStyle(QwtPlotMarker::VLine);
|
||||
d_mrk1->setLabelAlignment(Qt::AlignRight | Qt::AlignBottom);
|
||||
d_mrk1->setLinePen(QPen(Qt::green, 0, Qt::DashDotLine));
|
||||
d_mrk1->attach(this);
|
||||
d_marker1 = new QwtPlotMarker();
|
||||
d_marker1->setValue(0.0, 0.0);
|
||||
d_marker1->setLineStyle(QwtPlotMarker::VLine);
|
||||
d_marker1->setLabelAlignment(Qt::AlignRight | Qt::AlignBottom);
|
||||
d_marker1->setLinePen(QPen(Qt::green, 0, Qt::DashDotLine));
|
||||
d_marker1->attach(this);
|
||||
|
||||
d_mrk2 = new QwtPlotMarker();
|
||||
d_mrk2->setLineStyle(QwtPlotMarker::HLine);
|
||||
d_mrk2->setLabelAlignment(Qt::AlignRight | Qt::AlignBottom);
|
||||
d_mrk2->setLinePen(QPen(QColor(200,150,0), 0, Qt::DashDotLine));
|
||||
d_mrk2->setSymbol( QwtSymbol(QwtSymbol::Diamond,
|
||||
d_marker2 = new QwtPlotMarker();
|
||||
d_marker2->setLineStyle(QwtPlotMarker::HLine);
|
||||
d_marker2->setLabelAlignment(Qt::AlignRight | Qt::AlignBottom);
|
||||
d_marker2->setLinePen(QPen(QColor(200,150,0), 0, Qt::DashDotLine));
|
||||
d_marker2->setSymbol( new QwtSymbol(QwtSymbol::Diamond,
|
||||
QColor(Qt::yellow), QColor(Qt::green), QSize(7,7)));
|
||||
d_mrk2->attach(this);
|
||||
d_marker2->attach(this);
|
||||
|
||||
setDamp(0.0);
|
||||
|
||||
setAutoReplot(true);
|
||||
}
|
||||
|
||||
void BodePlot::showData(double *frequency, double *amplitude,
|
||||
double *phase, int count)
|
||||
void Plot::showData(const double *frequency, const double *amplitude,
|
||||
const double *phase, int count)
|
||||
{
|
||||
d_crv1->setData(frequency, amplitude, count);
|
||||
d_crv2->setData(frequency, phase, count);
|
||||
d_curve1->setSamples(frequency, amplitude, count);
|
||||
d_curve2->setSamples(frequency, phase, count);
|
||||
}
|
||||
|
||||
void BodePlot::showPeak(double freq, double amplitude)
|
||||
void Plot::showPeak(double freq, double amplitude)
|
||||
{
|
||||
QString label;
|
||||
label.sprintf("Peak: %.3g dB", amplitude);
|
||||
@@ -112,11 +115,11 @@ void BodePlot::showPeak(double freq, double amplitude)
|
||||
text.setFont(QFont("Helvetica", 10, QFont::Bold));
|
||||
text.setColor(QColor(200,150,0));
|
||||
|
||||
d_mrk2->setValue(freq, amplitude);
|
||||
d_mrk2->setLabel(text);
|
||||
d_marker2->setValue(freq, amplitude);
|
||||
d_marker2->setLabel(text);
|
||||
}
|
||||
|
||||
void BodePlot::show3dB(double freq)
|
||||
void Plot::show3dB(double freq)
|
||||
{
|
||||
QString label;
|
||||
label.sprintf("-3 dB at f = %.3g", freq);
|
||||
@@ -125,14 +128,14 @@ void BodePlot::show3dB(double freq)
|
||||
text.setFont(QFont("Helvetica", 10, QFont::Bold));
|
||||
text.setColor(Qt::green);
|
||||
|
||||
d_mrk1->setValue(freq, 0.0);
|
||||
d_mrk1->setLabel(text);
|
||||
d_marker1->setValue(freq, 0.0);
|
||||
d_marker1->setLabel(text);
|
||||
}
|
||||
|
||||
//
|
||||
// re-calculate frequency response
|
||||
//
|
||||
void BodePlot::setDamp(double damping)
|
||||
void Plot::setDamp(double damping)
|
||||
{
|
||||
const bool doReplot = autoReplot();
|
||||
setAutoReplot(false);
|
||||
@@ -149,28 +152,30 @@ void BodePlot::setDamp(double damping)
|
||||
int i3 = 1;
|
||||
double fmax = 1;
|
||||
double amax = -1000.0;
|
||||
|
||||
|
||||
for (int i = 0; i < ArraySize; i++)
|
||||
{
|
||||
double f = frequency[i];
|
||||
cplx g = cplx(1.0) / cplx(1.0 - f * f, 2.0 * damping * f);
|
||||
amplitude[i] = 20.0 * log10(sqrt( g.real()*g.real() + g.imag()*g.imag()));
|
||||
phase[i] = atan2(g.imag(), g.real()) * (180.0 / M_PI);
|
||||
const ComplexNumber g =
|
||||
ComplexNumber(1.0) / ComplexNumber(1.0 - f * f, 2.0 * damping * f);
|
||||
|
||||
if ((i3 <= 1) && (amplitude[i] < -3.0))
|
||||
amplitude[i] = 20.0 * log10(qSqrt( g.real() * g.real() + g.imag() * g.imag()));
|
||||
phase[i] = qAtan2(g.imag(), g.real()) * (180.0 / M_PI);
|
||||
|
||||
if ((i3 <= 1) && (amplitude[i] < -3.0))
|
||||
i3 = i;
|
||||
if (amplitude[i] > amax)
|
||||
{
|
||||
amax = amplitude[i];
|
||||
fmax = frequency[i];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
double f3 = frequency[i3] -
|
||||
(frequency[i3] - frequency[i3 - 1])
|
||||
|
||||
double f3 = frequency[i3] -
|
||||
(frequency[i3] - frequency[i3 - 1])
|
||||
/ (amplitude[i3] - amplitude[i3 -1]) * (amplitude[i3] + 3);
|
||||
|
||||
|
||||
showPeak(fmax, amax);
|
||||
show3dB(f3);
|
||||
showData(frequency, amplitude, phase, ArraySize);
|
||||
31
qwt/examples/bode/plot.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef _PLOT_H_
|
||||
#define _PLOT_H_
|
||||
|
||||
#include <qwt_plot.h>
|
||||
|
||||
class QwtPlotCurve;
|
||||
class QwtPlotMarker;
|
||||
|
||||
class Plot: public QwtPlot
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Plot(QWidget *parent);
|
||||
|
||||
public Q_SLOTS:
|
||||
void setDamp(double damping);
|
||||
|
||||
private:
|
||||
void showData(const double *frequency, const double *amplitude,
|
||||
const double *phase, int count);
|
||||
void showPeak(double freq, double amplitude);
|
||||
void show3dB(double freq);
|
||||
|
||||
QwtPlotCurve *d_curve1;
|
||||
QwtPlotCurve *d_curve2;
|
||||
QwtPlotMarker *d_marker1;
|
||||
QwtPlotMarker *d_marker2;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -7,9 +7,7 @@
|
||||
CpuPieMarker::CpuPieMarker()
|
||||
{
|
||||
setZ(1000);
|
||||
#if QT_VERSION >= 0x040000
|
||||
setRenderHint(QwtPlotItem::RenderAntialiased, true);
|
||||
#endif
|
||||
}
|
||||
|
||||
int CpuPieMarker::rtti() const
|
||||
@@ -17,32 +15,32 @@ int CpuPieMarker::rtti() const
|
||||
return QwtPlotItem::Rtti_PlotUserItem;
|
||||
}
|
||||
|
||||
void CpuPieMarker::draw(QPainter *p,
|
||||
void CpuPieMarker::draw(QPainter *p,
|
||||
const QwtScaleMap &, const QwtScaleMap &,
|
||||
const QRect &rect) const
|
||||
const QRectF &rect) const
|
||||
{
|
||||
const CpuPlot *cpuPlot = (CpuPlot *)plot();
|
||||
|
||||
const QwtScaleMap yMap = cpuPlot->canvasMap(QwtPlot::yLeft);
|
||||
|
||||
const int margin = 5;
|
||||
|
||||
|
||||
QRect pieRect;
|
||||
pieRect.setX(rect.x() + margin);
|
||||
pieRect.setY(rect.y() + margin);
|
||||
pieRect.setHeight(yMap.transform(80.0));
|
||||
pieRect.setWidth(pieRect.height());
|
||||
|
||||
pieRect.setHeight( qRound(yMap.transform(80.0)) );
|
||||
pieRect.setWidth( pieRect.height() );
|
||||
|
||||
const int dataType[] = { CpuPlot::User, CpuPlot::System, CpuPlot::Idle };
|
||||
|
||||
int angle = (int)(5760 * 0.75);
|
||||
for ( unsigned int i = 0;
|
||||
for ( unsigned int i = 0;
|
||||
i < sizeof(dataType) / sizeof(dataType[0]); i++ )
|
||||
{
|
||||
const QwtPlotCurve *curve = cpuPlot->cpuCurve(dataType[i]);
|
||||
if ( curve->dataSize() > 0 )
|
||||
{
|
||||
const int value = (int)(5760 * curve->y(0) / 100.0);
|
||||
const int value = (int)(5760 * curve->sample(0).y() / 100.0);
|
||||
|
||||
p->save();
|
||||
p->setBrush(QBrush(curve->pen().color(), Qt::SolidPattern));
|
||||
@@ -54,4 +52,3 @@ void CpuPieMarker::draw(QPainter *p,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,5 +14,5 @@ public:
|
||||
|
||||
virtual void draw(QPainter *p,
|
||||
const QwtScaleMap &, const QwtScaleMap &,
|
||||
const QRect &rect) const;
|
||||
const QRectF &rect) const;
|
||||
};
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <qwt_scale_widget.h>
|
||||
#include <qwt_legend.h>
|
||||
#include <qwt_legend_item.h>
|
||||
#include <qwt_plot_canvas.h>
|
||||
#include "cpupiemarker.h"
|
||||
#include "cpuplot.h"
|
||||
|
||||
@@ -42,10 +43,10 @@ public:
|
||||
|
||||
virtual void draw(QPainter *painter,
|
||||
const QwtScaleMap &, const QwtScaleMap &yMap,
|
||||
const QRect &rect) const
|
||||
const QRectF &rect) const
|
||||
{
|
||||
QColor c(Qt::white);
|
||||
QRect r = rect;
|
||||
QRectF r = rect;
|
||||
|
||||
for ( int i = 100; i > 0; i -= 10 )
|
||||
{
|
||||
@@ -64,23 +65,16 @@ public:
|
||||
CpuCurve(const QString &title):
|
||||
QwtPlotCurve(title)
|
||||
{
|
||||
#if QT_VERSION >= 0x040000
|
||||
setRenderHint(QwtPlotItem::RenderAntialiased);
|
||||
#endif
|
||||
}
|
||||
|
||||
void setColor(const QColor &color)
|
||||
{
|
||||
#if QT_VERSION >= 0x040000
|
||||
QColor c = color;
|
||||
c.setAlpha(150);
|
||||
|
||||
setPen(c);
|
||||
setBrush(c);
|
||||
#else
|
||||
setPen(color);
|
||||
setBrush(QBrush(color, Qt::Dense4Pattern));
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
@@ -90,6 +84,8 @@ CpuPlot::CpuPlot(QWidget *parent):
|
||||
{
|
||||
setAutoReplot(false);
|
||||
|
||||
canvas()->setBorderRadius( 10 );
|
||||
|
||||
plotLayout()->setAlignCanvasToScales(true);
|
||||
|
||||
QwtLegend *legend = new QwtLegend;
|
||||
@@ -97,7 +93,7 @@ CpuPlot::CpuPlot(QWidget *parent):
|
||||
insertLegend(legend, QwtPlot::RightLegend);
|
||||
|
||||
setAxisTitle(QwtPlot::xBottom, " System Uptime [h:m:s]");
|
||||
setAxisScaleDraw(QwtPlot::xBottom,
|
||||
setAxisScaleDraw(QwtPlot::xBottom,
|
||||
new TimeScaleDraw(cpuStat.upTime()));
|
||||
setAxisScale(QwtPlot::xBottom, 0, HISTORY);
|
||||
setAxisLabelRotation(QwtPlot::xBottom, -50.0);
|
||||
@@ -124,7 +120,7 @@ CpuPlot::CpuPlot(QWidget *parent):
|
||||
|
||||
CpuPieMarker *pie = new CpuPieMarker();
|
||||
pie->attach(this);
|
||||
|
||||
|
||||
CpuCurve *curve;
|
||||
|
||||
curve = new CpuCurve("System");
|
||||
@@ -177,7 +173,7 @@ void CpuPlot::timerEvent(QTimerEvent *)
|
||||
|
||||
cpuStat.statistic(data[User].data[0], data[System].data[0]);
|
||||
|
||||
data[Total].data[0] = data[User].data[0] +
|
||||
data[Total].data[0] = data[User].data[0] +
|
||||
data[System].data[0];
|
||||
data[Idle].data[0] = 100.0 - data[Total].data[0];
|
||||
|
||||
@@ -187,12 +183,12 @@ void CpuPlot::timerEvent(QTimerEvent *)
|
||||
for ( int j = 0; j < HISTORY; j++ )
|
||||
timeData[j]++;
|
||||
|
||||
setAxisScale(QwtPlot::xBottom,
|
||||
setAxisScale(QwtPlot::xBottom,
|
||||
timeData[HISTORY - 1], timeData[0]);
|
||||
|
||||
for ( int c = 0; c < NCpuData; c++ )
|
||||
{
|
||||
data[c].curve->setRawData(
|
||||
data[c].curve->setRawSamples(
|
||||
timeData, data[c].data, dataCount);
|
||||
}
|
||||
|
||||
@@ -205,24 +201,22 @@ void CpuPlot::showCurve(QwtPlotItem *item, bool on)
|
||||
QWidget *w = legend()->find(item);
|
||||
if ( w && w->inherits("QwtLegendItem") )
|
||||
((QwtLegendItem *)w)->setChecked(on);
|
||||
|
||||
|
||||
replot();
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
QApplication a(argc, argv);
|
||||
|
||||
QWidget vBox;
|
||||
#if QT_VERSION >= 0x040000
|
||||
vBox.setWindowTitle("Cpu Plot");
|
||||
#else
|
||||
vBox.setCaption("Cpu Plot");
|
||||
#endif
|
||||
|
||||
CpuPlot *plot = new CpuPlot(&vBox);
|
||||
plot->setTitle("History");
|
||||
plot->setMargin(5);
|
||||
|
||||
const int margin = 5;
|
||||
plot->setContentsMargins(margin, margin, margin, margin);
|
||||
|
||||
QString info("Press the legend to en/disable a curve");
|
||||
|
||||
@@ -232,13 +226,8 @@ int main(int argc, char **argv)
|
||||
layout->addWidget(plot);
|
||||
layout->addWidget(label);
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
a.setMainWidget(&vBox);
|
||||
#endif
|
||||
|
||||
vBox.resize(600,400);
|
||||
vBox.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
class QwtPlotCurve;
|
||||
|
||||
class CpuPlot : public QwtPlot
|
||||
class CpuPlot : public QwtPlot
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
protected:
|
||||
void timerEvent(QTimerEvent *e);
|
||||
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void showCurve(QwtPlotItem *, bool on);
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
# -*- mode: sh -*- ################################################
|
||||
################################################################
|
||||
# Qwt Widget Library
|
||||
# Copyright (C) 1997 Josef Wilgen
|
||||
# Copyright (C) 2002 Uwe Rathmann
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the Qwt License, Version 1.0
|
||||
###################################################################
|
||||
################################################################
|
||||
|
||||
include( ../examples.pri )
|
||||
include( $${PWD}/../examples.pri )
|
||||
|
||||
TARGET = cpuplot
|
||||
|
||||
HEADERS = \
|
||||
cpuplot.h \
|
||||
cpustat.h \
|
||||
cpupiemarker.h
|
||||
cpuplot.h \
|
||||
cpustat.h \
|
||||
cpupiemarker.h
|
||||
|
||||
SOURCES = \
|
||||
cpuplot.cpp \
|
||||
cpustat.cpp \
|
||||
cpupiemarker.cpp
|
||||
cpuplot.cpp \
|
||||
cpustat.cpp \
|
||||
cpupiemarker.cpp
|
||||
|
||||
@@ -41,11 +41,7 @@ void CpuStat::statistic(double &user, double &system)
|
||||
void CpuStat::lookUp(double values[NValues]) const
|
||||
{
|
||||
QFile file("/proc/stat");
|
||||
#if QT_VERSION >= 0x040000
|
||||
if ( !file.open(QIODevice::ReadOnly) )
|
||||
#else
|
||||
if ( !file.open(IO_ReadOnly) )
|
||||
#endif
|
||||
{
|
||||
static double dummyValues[][NValues] =
|
||||
{
|
||||
@@ -193,11 +189,11 @@ void CpuStat::lookUp(double values[NValues]) const
|
||||
{ 109371, 0, 24019, 827486 },
|
||||
};
|
||||
static int counter = 0;
|
||||
|
||||
|
||||
for ( int i = 0; i < NValues; i++ )
|
||||
values[i] = dummyValues[counter][i];
|
||||
|
||||
counter = (counter + 1)
|
||||
counter = (counter + 1)
|
||||
% (sizeof(dummyValues) / sizeof(dummyValues[0]));
|
||||
}
|
||||
else
|
||||
@@ -205,19 +201,11 @@ void CpuStat::lookUp(double values[NValues]) const
|
||||
QTextStream textStream(&file);
|
||||
do {
|
||||
QString line = textStream.readLine();
|
||||
#if QT_VERSION < 0x040000
|
||||
line = line.stripWhiteSpace();
|
||||
#else
|
||||
line = line.trimmed();
|
||||
#endif
|
||||
if ( line.startsWith("cpu ") )
|
||||
{
|
||||
const QStringList valueList =
|
||||
#if QT_VERSION < 0x040000
|
||||
QStringList::split(" ", line);
|
||||
#else
|
||||
line.split(" ", QString::SkipEmptyParts);
|
||||
#endif
|
||||
if ( valueList.count() >= 5 )
|
||||
{
|
||||
for ( int i = 0; i < NValues; i++ )
|
||||
@@ -225,11 +213,6 @@ void CpuStat::lookUp(double values[NValues]) const
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
#if QT_VERSION < 0x040000
|
||||
while(!textStream.eof());
|
||||
#else
|
||||
while(!textStream.atEnd());
|
||||
#endif
|
||||
} while(!textStream.atEnd());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <qdatetime.h>
|
||||
|
||||
class CpuStat
|
||||
class CpuStat
|
||||
{
|
||||
public:
|
||||
CpuStat();
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#include <qapplication.h>
|
||||
#include <qframe.h>
|
||||
|
||||
#include <qwt_scale_map.h>
|
||||
#include <qwt_plot_curve.h>
|
||||
#include <qwt_symbol.h>
|
||||
#include <qwt_math.h>
|
||||
#include <qcolor.h>
|
||||
#include <qpainter.h>
|
||||
#include <math.h>
|
||||
#include <qapplication.h>
|
||||
#include <qframe.h>
|
||||
|
||||
//------------------------------------------------------------
|
||||
// curvdemo1
|
||||
@@ -19,38 +20,32 @@
|
||||
// Array Sizes
|
||||
//
|
||||
const int Size = 27;
|
||||
#if QT_VERSION >= 0x040000
|
||||
const int CurvCnt = 6;
|
||||
#else
|
||||
const int CurvCnt = 5;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Arrays holding the values
|
||||
//
|
||||
double xval[Size];
|
||||
double yval[Size];
|
||||
QwtScaleMap xMap;
|
||||
QwtScaleMap xMap;
|
||||
QwtScaleMap yMap;
|
||||
|
||||
class MainWin : public QFrame
|
||||
class MainWin : public QFrame
|
||||
{
|
||||
public:
|
||||
MainWin();
|
||||
|
||||
|
||||
protected:
|
||||
#if QT_VERSION >= 0x040000
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
#endif
|
||||
void drawContents(QPainter *p);
|
||||
|
||||
private:
|
||||
void shiftDown(QRect &rect, int offset) const;
|
||||
|
||||
QwtPlotCurve crv[CurvCnt];
|
||||
QwtPlotCurve d_curves[CurvCnt];
|
||||
};
|
||||
|
||||
MainWin::MainWin()
|
||||
MainWin::MainWin()
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -59,7 +54,7 @@ MainWin::MainWin()
|
||||
|
||||
//
|
||||
// Frame style
|
||||
//
|
||||
//
|
||||
setFrameStyle(QFrame::Box|QFrame::Raised);
|
||||
setLineWidth(2);
|
||||
setMidLineWidth(3);
|
||||
@@ -68,54 +63,45 @@ MainWin::MainWin()
|
||||
// Calculate values
|
||||
//
|
||||
for(i=0; i<Size;i++)
|
||||
{ xval[i] = double(i) * 10.0 / double(Size - 1);
|
||||
yval[i] = sin(xval[i]) * cos(2.0 * xval[i]);
|
||||
{
|
||||
xval[i] = double(i) * 10.0 / double(Size - 1);
|
||||
yval[i] = qSin(xval[i]) * qCos(2.0 * xval[i]);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// define curve styles
|
||||
//
|
||||
QwtSymbol sym;
|
||||
//
|
||||
i = 0;
|
||||
|
||||
sym.setStyle(QwtSymbol::Cross);
|
||||
sym.setPen(QColor(Qt::black));
|
||||
sym.setSize(5);
|
||||
crv[i].setSymbol(sym);
|
||||
crv[i].setPen(QColor(Qt::darkGreen));
|
||||
crv[i].setStyle(QwtPlotCurve::Lines);
|
||||
crv[i].setCurveAttribute(QwtPlotCurve::Fitted);
|
||||
d_curves[i].setSymbol(new QwtSymbol(QwtSymbol::Cross, Qt::NoBrush,
|
||||
QPen(Qt::black), QSize(5, 5) ) );
|
||||
d_curves[i].setPen(QColor(Qt::darkGreen));
|
||||
d_curves[i].setStyle(QwtPlotCurve::Lines);
|
||||
d_curves[i].setCurveAttribute(QwtPlotCurve::Fitted);
|
||||
i++;
|
||||
|
||||
sym.setStyle(QwtSymbol::Ellipse);
|
||||
sym.setPen(QColor(Qt::blue));
|
||||
sym.setBrush(QColor(Qt::yellow));
|
||||
sym.setSize(5);
|
||||
crv[i].setSymbol(sym);
|
||||
crv[i].setPen(QColor(Qt::red));
|
||||
crv[i].setStyle(QwtPlotCurve::Sticks);
|
||||
d_curves[i].setSymbol(new QwtSymbol(QwtSymbol::Ellipse, Qt::yellow,
|
||||
QPen(Qt::blue), QSize(5, 5) ) );
|
||||
d_curves[i].setPen(QColor(Qt::red));
|
||||
d_curves[i].setStyle(QwtPlotCurve::Sticks);
|
||||
i++;
|
||||
|
||||
crv[i].setPen(QColor(Qt::darkBlue));
|
||||
crv[i].setStyle(QwtPlotCurve::Lines);
|
||||
d_curves[i].setPen(QColor(Qt::darkBlue));
|
||||
d_curves[i].setStyle(QwtPlotCurve::Lines);
|
||||
i++;
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
crv[i].setPen(QColor(Qt::darkBlue));
|
||||
crv[i].setStyle(QwtPlotCurve::Lines);
|
||||
crv[i].setRenderHint(QwtPlotItem::RenderAntialiased);
|
||||
i++;
|
||||
#endif
|
||||
|
||||
|
||||
crv[i].setPen(QColor(Qt::darkCyan));
|
||||
crv[i].setStyle(QwtPlotCurve::Steps);
|
||||
d_curves[i].setPen(QColor(Qt::darkBlue));
|
||||
d_curves[i].setStyle(QwtPlotCurve::Lines);
|
||||
d_curves[i].setRenderHint(QwtPlotItem::RenderAntialiased);
|
||||
i++;
|
||||
|
||||
sym.setStyle(QwtSymbol::XCross);
|
||||
sym.setPen(QColor(Qt::darkMagenta));
|
||||
crv[i].setSymbol(sym);
|
||||
crv[i].setStyle(QwtPlotCurve::NoCurve);
|
||||
d_curves[i].setPen(QColor(Qt::darkCyan));
|
||||
d_curves[i].setStyle(QwtPlotCurve::Steps);
|
||||
i++;
|
||||
|
||||
d_curves[i].setSymbol(new QwtSymbol(QwtSymbol::XCross, Qt::NoBrush,
|
||||
QPen(Qt::darkMagenta), QSize(5, 5) ) );
|
||||
d_curves[i].setStyle(QwtPlotCurve::NoCurve);
|
||||
i++;
|
||||
|
||||
|
||||
@@ -123,19 +109,14 @@ MainWin::MainWin()
|
||||
// attach data
|
||||
//
|
||||
for(i=0;i<CurvCnt;i++)
|
||||
crv[i].setRawData(xval,yval,Size);
|
||||
d_curves[i].setRawSamples(xval, yval, Size);
|
||||
}
|
||||
|
||||
void MainWin::shiftDown(QRect &rect, int offset) const
|
||||
{
|
||||
#if QT_VERSION < 0x040000
|
||||
rect.moveBy(0, offset);
|
||||
#else
|
||||
rect.translate(0, offset);
|
||||
#endif
|
||||
rect.translate(0, offset);
|
||||
}
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
void MainWin::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QFrame::paintEvent(event);
|
||||
@@ -144,7 +125,6 @@ void MainWin::paintEvent(QPaintEvent *event)
|
||||
painter.setClipRect(contentsRect());
|
||||
drawContents(&painter);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
@@ -168,11 +148,9 @@ void MainWin::drawContents(QPainter *painter)
|
||||
xMap.setPaintInterval(r.left(), r.right());
|
||||
yMap.setPaintInterval(r.top(), r.bottom());
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
painter->setRenderHint(QPainter::Antialiasing,
|
||||
crv[i].testRenderHint(QwtPlotItem::RenderAntialiased) );
|
||||
#endif
|
||||
crv[i].draw(painter, xMap, yMap, r);
|
||||
d_curves[i].testRenderHint(QwtPlotItem::RenderAntialiased) );
|
||||
d_curves[i].draw(painter, xMap, yMap, r);
|
||||
|
||||
shiftDown(r, deltay);
|
||||
}
|
||||
@@ -182,7 +160,7 @@ void MainWin::drawContents(QPainter *painter)
|
||||
//
|
||||
r = contentsRect(); // reset r
|
||||
painter->setFont(QFont("Helvetica", 8));
|
||||
|
||||
|
||||
const int alignment = Qt::AlignTop|Qt::AlignHCenter;
|
||||
|
||||
painter->setPen(Qt::black);
|
||||
@@ -194,22 +172,19 @@ void MainWin::drawContents(QPainter *painter)
|
||||
painter->drawText(0,r.top(),r.width(), painter->fontMetrics().height(),
|
||||
alignment, "Style: Sticks, Symbol: Ellipse");
|
||||
shiftDown(r, deltay);
|
||||
|
||||
|
||||
painter->drawText(0 ,r.top(),r.width(), painter->fontMetrics().height(),
|
||||
alignment, "Style: Lines, Symbol: None");
|
||||
shiftDown(r, deltay);
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
painter->drawText(0 ,r.top(),r.width(), painter->fontMetrics().height(),
|
||||
alignment, "Style: Lines, Symbol: None, Antialiased");
|
||||
shiftDown(r, deltay);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
painter->drawText(0, r.top(),r.width(), painter->fontMetrics().height(),
|
||||
alignment, "Style: Steps, Symbol: None");
|
||||
shiftDown(r, deltay);
|
||||
|
||||
|
||||
painter->drawText(0,r.top(),r.width(), painter->fontMetrics().height(),
|
||||
alignment, "Style: NoCurve, Symbol: XCross");
|
||||
}
|
||||
@@ -220,9 +195,6 @@ int main (int argc, char **argv)
|
||||
|
||||
MainWin w;
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
a.setMainWidget(&w);
|
||||
#endif
|
||||
w.resize(300,600);
|
||||
w.show();
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# -*- mode: sh -*- ################################################
|
||||
################################################################
|
||||
# Qwt Widget Library
|
||||
# Copyright (C) 1997 Josef Wilgen
|
||||
# Copyright (C) 2002 Uwe Rathmann
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the Qwt License, Version 1.0
|
||||
###################################################################
|
||||
################################################################
|
||||
|
||||
include( ../examples.pri )
|
||||
include( $${PWD}/../examples.pri )
|
||||
|
||||
TARGET = curvdemo1
|
||||
|
||||
SOURCES = \
|
||||
curvdemo1.cpp
|
||||
curvdemo1.cpp
|
||||
|
||||
@@ -33,27 +33,24 @@ double vval[USize];
|
||||
//
|
||||
// CONSTRUCT MAIN WINDOW
|
||||
//
|
||||
MainWin::MainWin():
|
||||
MainWin::MainWin():
|
||||
QFrame()
|
||||
{
|
||||
setFrameStyle(QFrame::Box|QFrame::Raised);
|
||||
setLineWidth(2);
|
||||
setMidLineWidth(3);
|
||||
|
||||
|
||||
const QColor bgColor(30,30,50);
|
||||
#if QT_VERSION < 0x040000
|
||||
setPaletteBackgroundColor(bgColor);
|
||||
#else
|
||||
|
||||
QPalette p = palette();
|
||||
p.setColor(backgroundRole(), bgColor);
|
||||
setPalette(p);
|
||||
#endif
|
||||
|
||||
QwtSplineCurveFitter* curveFitter;
|
||||
QwtSplineCurveFitter* curveFitter;
|
||||
|
||||
//
|
||||
// curve 1
|
||||
//
|
||||
//
|
||||
int i = 0;
|
||||
xMap[i].setScaleInterval(-1.5, 1.5);
|
||||
yMap[i].setScaleInterval(0.0, 6.28);
|
||||
@@ -65,15 +62,14 @@ MainWin::MainWin():
|
||||
curveFitter->setSplineSize(150);
|
||||
curve[i].setCurveFitter(curveFitter);
|
||||
|
||||
QwtSymbol sym;
|
||||
sym.setStyle(QwtSymbol::XCross);
|
||||
sym.setPen(QPen(Qt::yellow,2));
|
||||
sym.setSize(7);
|
||||
|
||||
curve[i].setSymbol(sym);
|
||||
QwtSymbol *symbol = new QwtSymbol(QwtSymbol::XCross);
|
||||
symbol->setPen(QPen(Qt::yellow,2));
|
||||
symbol->setSize(7);
|
||||
|
||||
curve[i].setSymbol(symbol);
|
||||
|
||||
curve[i].setRawSamples(yval,xval,Size);
|
||||
|
||||
curve[i].setRawData(yval,xval,Size);
|
||||
|
||||
//
|
||||
// curve 2
|
||||
//
|
||||
@@ -82,15 +78,15 @@ MainWin::MainWin():
|
||||
yMap[i].setScaleInterval(-3.0, 1.1);
|
||||
curve[i].setPen(QPen(QColor(200,150,50)));
|
||||
curve[i].setStyle(QwtPlotCurve::Sticks);
|
||||
curve[i].setSymbol(QwtSymbol(QwtSymbol::Ellipse,
|
||||
curve[i].setSymbol(new QwtSymbol(QwtSymbol::Ellipse,
|
||||
QColor(Qt::blue), QColor(Qt::yellow), QSize(5,5)));
|
||||
|
||||
curve[i].setRawData(xval,zval,Size);
|
||||
curve[i].setRawSamples(xval,zval,Size);
|
||||
|
||||
|
||||
|
||||
//
|
||||
// curve 3
|
||||
//
|
||||
//
|
||||
i++;
|
||||
xMap[i].setScaleInterval(-1.1, 3.0);
|
||||
yMap[i].setScaleInterval(-1.1, 3.0);
|
||||
@@ -102,7 +98,7 @@ MainWin::MainWin():
|
||||
curveFitter->setSplineSize(200);
|
||||
curve[i].setCurveFitter(curveFitter);
|
||||
|
||||
curve[i].setRawData(yval,zval,Size);
|
||||
curve[i].setRawSamples(yval,zval,Size);
|
||||
|
||||
|
||||
//
|
||||
@@ -118,18 +114,18 @@ MainWin::MainWin():
|
||||
curveFitter->setSplineSize(200);
|
||||
curve[i].setCurveFitter(curveFitter);
|
||||
|
||||
curve[i].setRawData(uval,vval,USize);
|
||||
curve[i].setRawSamples(uval,vval,USize);
|
||||
|
||||
//
|
||||
// initialize values
|
||||
//
|
||||
double base = 2.0 * M_PI / double(USize - 1);
|
||||
double toggle = 1.0;
|
||||
double toggle = 1.0;
|
||||
for (i = 0; i < USize; i++)
|
||||
{
|
||||
uval[i] = toggle * cos( double(i) * base);
|
||||
vval[i] = toggle * sin( double(i) * base);
|
||||
|
||||
uval[i] = toggle * qCos( double(i) * base);
|
||||
vval[i] = toggle * qSin( double(i) * base);
|
||||
|
||||
if (toggle == 1.0)
|
||||
toggle = 0.5;
|
||||
else
|
||||
@@ -141,10 +137,9 @@ MainWin::MainWin():
|
||||
//
|
||||
// start timer
|
||||
//
|
||||
(void)startTimer(250);
|
||||
(void)startTimer(250);
|
||||
}
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
void MainWin::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QFrame::paintEvent(event);
|
||||
@@ -153,7 +148,6 @@ void MainWin::paintEvent(QPaintEvent *event)
|
||||
painter.setClipRect(contentsRect());
|
||||
drawContents(&painter);
|
||||
}
|
||||
#endif
|
||||
|
||||
void MainWin::drawContents(QPainter *painter)
|
||||
{
|
||||
@@ -184,27 +178,27 @@ void MainWin::newValues()
|
||||
int i;
|
||||
static double phs = 0.0;
|
||||
double s,c,u;
|
||||
|
||||
|
||||
for (i=0;i<Size;i++)
|
||||
{
|
||||
xval[i] = 6.28 * double(i) / double(Size -1);
|
||||
yval[i] = sin(xval[i] - phs);
|
||||
zval[i] = cos(3.0 * (xval[i] + phs));
|
||||
yval[i] = qSin(xval[i] - phs);
|
||||
zval[i] = qCos(3.0 * (xval[i] + phs));
|
||||
}
|
||||
|
||||
s = 0.25 * sin(phs);
|
||||
c = sqrt(1.0 - s*s);
|
||||
|
||||
s = 0.25 * qSin(phs);
|
||||
c = qSqrt(1.0 - s*s);
|
||||
for (i=0; i<USize;i++)
|
||||
{
|
||||
u = uval[i];
|
||||
uval[i] = uval[i] * c - vval[i] * s;
|
||||
vval[i] = vval[i] * c + u * s;
|
||||
}
|
||||
|
||||
|
||||
phs += 0.0628;
|
||||
if (phs > 6.28)
|
||||
phs = 0.0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
int main (int argc, char **argv)
|
||||
@@ -213,9 +207,6 @@ int main (int argc, char **argv)
|
||||
|
||||
MainWin w;
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
a.setMainWidget(&w);
|
||||
#endif
|
||||
w.resize(300,300);
|
||||
w.show();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <qwt_plot_curve.h>
|
||||
#include <qwt_scale_map.h>
|
||||
|
||||
class MainWin : public QFrame
|
||||
class MainWin : public QFrame
|
||||
{
|
||||
public:
|
||||
enum { curveCount = 4 };
|
||||
@@ -13,12 +13,10 @@ public:
|
||||
|
||||
public:
|
||||
MainWin();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void timerEvent(QTimerEvent *t);
|
||||
#if QT_VERSION >= 0x040000
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
#endif
|
||||
virtual void drawContents(QPainter *);
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
# -*- mode: sh -*- ################################################
|
||||
################################################################
|
||||
# Qwt Widget Library
|
||||
# Copyright (C) 1997 Josef Wilgen
|
||||
# Copyright (C) 2002 Uwe Rathmann
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the Qwt License, Version 1.0
|
||||
###################################################################
|
||||
################################################################
|
||||
|
||||
include( ../examples.pri )
|
||||
include( $${PWD}/../examples.pri )
|
||||
|
||||
TARGET = curvdemo2
|
||||
|
||||
HEADERS = \
|
||||
curvdemo2.h
|
||||
curvdemo2.h
|
||||
|
||||
SOURCES = \
|
||||
curvdemo2.cpp
|
||||
curvdemo2.cpp
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <qwt_painter.h>
|
||||
#include <qwt_plot_canvas.h>
|
||||
#include <qwt_plot_marker.h>
|
||||
#include <qwt_plot_curve.h>
|
||||
#include <qwt_scale_widget.h>
|
||||
#include <qwt_legend.h>
|
||||
#include <qwt_scale_draw.h>
|
||||
#include <qwt_math.h>
|
||||
#include "data_plot.h"
|
||||
|
||||
//
|
||||
// Initialize main window
|
||||
//
|
||||
DataPlot::DataPlot(QWidget *parent):
|
||||
QwtPlot(parent),
|
||||
d_interval(0),
|
||||
d_timerId(-1)
|
||||
{
|
||||
// Disable polygon clipping
|
||||
QwtPainter::setDeviceClipping(false);
|
||||
|
||||
// We don't need the cache here
|
||||
canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false);
|
||||
canvas()->setPaintAttribute(QwtPlotCanvas::PaintPacked, false);
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
#ifdef Q_WS_X11
|
||||
/*
|
||||
Qt::WA_PaintOnScreen is only supported for X11, but leads
|
||||
to substantial bugs with Qt 4.2.x/Windows
|
||||
*/
|
||||
canvas()->setAttribute(Qt::WA_PaintOnScreen, true);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
alignScales();
|
||||
|
||||
// Initialize data
|
||||
for (int i = 0; i< PLOT_SIZE; i++)
|
||||
{
|
||||
d_x[i] = 0.5 * i; // time axis
|
||||
d_y[i] = 0;
|
||||
d_z[i] = 0;
|
||||
}
|
||||
|
||||
// Assign a title
|
||||
setTitle("A Test for High Refresh Rates");
|
||||
insertLegend(new QwtLegend(), QwtPlot::BottomLegend);
|
||||
|
||||
// Insert new curves
|
||||
QwtPlotCurve *cRight = new QwtPlotCurve("Data Moving Right");
|
||||
cRight->attach(this);
|
||||
|
||||
QwtPlotCurve *cLeft = new QwtPlotCurve("Data Moving Left");
|
||||
cLeft->attach(this);
|
||||
|
||||
// Set curve styles
|
||||
cRight->setPen(QPen(Qt::red));
|
||||
cLeft->setPen(QPen(Qt::blue));
|
||||
|
||||
// Attach (don't copy) data. Both curves use the same x array.
|
||||
cRight->setRawData(d_x, d_y, PLOT_SIZE);
|
||||
cLeft->setRawData(d_x, d_z, PLOT_SIZE);
|
||||
|
||||
#if 0
|
||||
// Insert zero line at y = 0
|
||||
QwtPlotMarker *mY = new QwtPlotMarker();
|
||||
mY->setLabelAlignment(Qt::AlignRight|Qt::AlignTop);
|
||||
mY->setLineStyle(QwtPlotMarker::HLine);
|
||||
mY->setYValue(0.0);
|
||||
mY->attach(this);
|
||||
#endif
|
||||
|
||||
// Axis
|
||||
setAxisTitle(QwtPlot::xBottom, "Time/seconds");
|
||||
setAxisScale(QwtPlot::xBottom, 0, 100);
|
||||
|
||||
setAxisTitle(QwtPlot::yLeft, "Values");
|
||||
setAxisScale(QwtPlot::yLeft, -1.5, 1.5);
|
||||
|
||||
setTimerInterval(0.0);
|
||||
}
|
||||
|
||||
//
|
||||
// Set a plain canvas frame and align the scales to it
|
||||
//
|
||||
void DataPlot::alignScales()
|
||||
{
|
||||
// The code below shows how to align the scales to
|
||||
// the canvas frame, but is also a good example demonstrating
|
||||
// why the spreaded API needs polishing.
|
||||
|
||||
canvas()->setFrameStyle(QFrame::Box | QFrame::Plain );
|
||||
canvas()->setLineWidth(1);
|
||||
|
||||
for ( int i = 0; i < QwtPlot::axisCnt; i++ )
|
||||
{
|
||||
QwtScaleWidget *scaleWidget = (QwtScaleWidget *)axisWidget(i);
|
||||
if ( scaleWidget )
|
||||
scaleWidget->setMargin(0);
|
||||
|
||||
QwtScaleDraw *scaleDraw = (QwtScaleDraw *)axisScaleDraw(i);
|
||||
if ( scaleDraw )
|
||||
scaleDraw->enableComponent(QwtAbstractScaleDraw::Backbone, false);
|
||||
}
|
||||
}
|
||||
|
||||
void DataPlot::setTimerInterval(double ms)
|
||||
{
|
||||
d_interval = qRound(ms);
|
||||
|
||||
if ( d_timerId >= 0 )
|
||||
{
|
||||
killTimer(d_timerId);
|
||||
d_timerId = -1;
|
||||
}
|
||||
if (d_interval >= 0 )
|
||||
d_timerId = startTimer(d_interval);
|
||||
}
|
||||
|
||||
// Generate new values
|
||||
void DataPlot::timerEvent(QTimerEvent *)
|
||||
{
|
||||
static double phase = 0.0;
|
||||
|
||||
if (phase > (M_PI - 0.0001))
|
||||
phase = 0.0;
|
||||
|
||||
// y moves from left to right:
|
||||
// Shift y array right and assign new value to y[0].
|
||||
|
||||
for ( int i = PLOT_SIZE - 1; i > 0; i-- )
|
||||
d_y[i] = d_y[i-1];
|
||||
d_y[0] = sin(phase) * (-1.0 + 2.0 * double(rand()) / double(RAND_MAX));
|
||||
|
||||
for ( int j = 0; j < PLOT_SIZE - 1; j++ )
|
||||
d_z[j] = d_z[j+1];
|
||||
|
||||
d_z[PLOT_SIZE - 1] = 0.8 - (2.0 * phase/M_PI) + 0.4 *
|
||||
double(rand()) / double(RAND_MAX);
|
||||
|
||||
// update the display
|
||||
replot();
|
||||
|
||||
phase += M_PI * 0.02;
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
#ifndef _DATA_PLOT_H
|
||||
#define _DATA_PLOT_H 1
|
||||
|
||||
#include <qwt_plot.h>
|
||||
|
||||
const int PLOT_SIZE = 201; // 0 to 200
|
||||
|
||||
class DataPlot : public QwtPlot
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DataPlot(QWidget* = NULL);
|
||||
|
||||
public slots:
|
||||
void setTimerInterval(double interval);
|
||||
|
||||
protected:
|
||||
virtual void timerEvent(QTimerEvent *e);
|
||||
|
||||
private:
|
||||
void alignScales();
|
||||
|
||||
double d_x[PLOT_SIZE];
|
||||
double d_y[PLOT_SIZE];
|
||||
double d_z[PLOT_SIZE];
|
||||
|
||||
int d_interval; // timer in ms
|
||||
int d_timerId;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,62 +0,0 @@
|
||||
#include <qapplication.h>
|
||||
#include <qmainwindow.h>
|
||||
#include <qwt_counter.h>
|
||||
#include <qtoolbar.h>
|
||||
#include <qlabel.h>
|
||||
#include <qlayout.h>
|
||||
#include "data_plot.h"
|
||||
|
||||
class MainWindow: public QMainWindow
|
||||
{
|
||||
public:
|
||||
MainWindow()
|
||||
{
|
||||
QToolBar *toolBar = new QToolBar(this);
|
||||
toolBar->setFixedHeight(80);
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
setDockEnabled(TornOff, true);
|
||||
setRightJustification(true);
|
||||
#else
|
||||
toolBar->setAllowedAreas(Qt::TopToolBarArea | Qt::BottomToolBarArea);
|
||||
#endif
|
||||
QWidget *hBox = new QWidget(toolBar);
|
||||
QLabel *label = new QLabel("Timer Interval", hBox);
|
||||
QwtCounter *counter = new QwtCounter(hBox);
|
||||
counter->setRange(-1.0, 100.0, 1.0);
|
||||
|
||||
QHBoxLayout *layout = new QHBoxLayout(hBox);
|
||||
layout->addWidget(label);
|
||||
layout->addWidget(counter);
|
||||
layout->addWidget(new QWidget(hBox), 10); // spacer);
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
toolBar->addWidget(hBox);
|
||||
#endif
|
||||
addToolBar(toolBar);
|
||||
|
||||
|
||||
DataPlot *plot = new DataPlot(this);
|
||||
setCentralWidget(plot);
|
||||
|
||||
connect(counter, SIGNAL(valueChanged(double)),
|
||||
plot, SLOT(setTimerInterval(double)) );
|
||||
|
||||
counter->setValue(20.0);
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
MainWindow mainWindow;
|
||||
#if QT_VERSION < 0x040000
|
||||
a.setMainWidget(&mainWindow);
|
||||
#endif
|
||||
|
||||
mainWindow.resize(600,400);
|
||||
mainWindow.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
@@ -1,57 +1,38 @@
|
||||
#include "attitude_indicator.h"
|
||||
#include <qwt_point_polar.h>
|
||||
#include <qevent.h>
|
||||
#include <qpainter.h>
|
||||
#include <qwt_math.h>
|
||||
#include <qwt_polygon.h>
|
||||
#include "attitude_indicator.h"
|
||||
#include <qpolygon.h>
|
||||
|
||||
AttitudeIndicatorNeedle::AttitudeIndicatorNeedle(const QColor &c)
|
||||
{
|
||||
QPalette palette;
|
||||
for ( int i = 0; i < QPalette::NColorGroups; i++ )
|
||||
{
|
||||
#if QT_VERSION < 0x040000
|
||||
palette.setColor((QPalette::ColorGroup)i,
|
||||
QColorGroup::Text, c);
|
||||
#else
|
||||
palette.setColor((QPalette::ColorGroup)i,
|
||||
QPalette::Text, c);
|
||||
#endif
|
||||
}
|
||||
setPalette(palette);
|
||||
}
|
||||
|
||||
void AttitudeIndicatorNeedle::draw(QPainter *painter, const QPoint ¢er,
|
||||
int length, double direction, QPalette::ColorGroup cg) const
|
||||
void AttitudeIndicatorNeedle::drawNeedle(QPainter *painter,
|
||||
double length, QPalette::ColorGroup colorGroup) const
|
||||
{
|
||||
direction *= M_PI / 180.0;
|
||||
int triangleSize = qRound(length * 0.1);
|
||||
double triangleSize = length * 0.1;
|
||||
double pos = length - 2.0;
|
||||
|
||||
painter->save();
|
||||
QPainterPath path;
|
||||
path.moveTo( pos, 0 );
|
||||
path.lineTo( pos - 2 * triangleSize, triangleSize );
|
||||
path.lineTo( pos - 2 * triangleSize, -triangleSize );
|
||||
path.closeSubpath();
|
||||
|
||||
const QPoint p0(QPoint(center.x() + 1, center.y() + 1));
|
||||
painter->setBrush( palette().brush(colorGroup, QPalette::Text ) );
|
||||
painter->drawPath( path );
|
||||
|
||||
const QPoint p1 = qwtPolar2Pos(p0,
|
||||
length - 2 * triangleSize - 2, direction);
|
||||
|
||||
QwtPolygon pa(3);
|
||||
pa.setPoint(0, qwtPolar2Pos(p1, 2 * triangleSize, direction));
|
||||
pa.setPoint(1, qwtPolar2Pos(p1, triangleSize, direction + M_PI_2));
|
||||
pa.setPoint(2, qwtPolar2Pos(p1, triangleSize, direction - M_PI_2));
|
||||
|
||||
const QColor color =
|
||||
#if QT_VERSION < 0x040000
|
||||
palette().color(cg, QColorGroup::Text);
|
||||
#else
|
||||
palette().color(cg, QPalette::Text);
|
||||
#endif
|
||||
painter->setBrush(color);
|
||||
painter->drawPolygon(pa);
|
||||
|
||||
painter->setPen(QPen(color, 3));
|
||||
painter->drawLine(qwtPolar2Pos(p0, length - 2, direction + M_PI_2),
|
||||
qwtPolar2Pos(p0, length - 2, direction - M_PI_2));
|
||||
|
||||
painter->restore();
|
||||
double l = length - 2;
|
||||
painter->setPen( QPen(palette().color( colorGroup, QPalette::Text ), 3) );
|
||||
painter->drawLine( 0, -l, 0, l );
|
||||
}
|
||||
|
||||
AttitudeIndicator::AttitudeIndicator(
|
||||
@@ -63,16 +44,10 @@ AttitudeIndicator::AttitudeIndicator(
|
||||
setWrapping(true);
|
||||
|
||||
setOrigin(270.0);
|
||||
setScaleOptions(ScaleTicks);
|
||||
setScaleComponents( QwtAbstractScaleDraw::Ticks );
|
||||
setScale(0, 0, 30.0);
|
||||
|
||||
const QColor color =
|
||||
#if QT_VERSION < 0x040000
|
||||
colorGroup().text();
|
||||
#else
|
||||
palette().color(QPalette::Text);
|
||||
#endif
|
||||
|
||||
const QColor color = palette().color(QPalette::Text);
|
||||
setNeedle(new AttitudeIndicatorNeedle(color));
|
||||
}
|
||||
|
||||
@@ -90,34 +65,35 @@ void AttitudeIndicator::setGradient(double gradient)
|
||||
}
|
||||
}
|
||||
|
||||
void AttitudeIndicator::drawScale(QPainter *painter, const QPoint ¢er,
|
||||
int radius, double origin, double minArc, double maxArc) const
|
||||
void AttitudeIndicator::drawScale(QPainter *painter, const QPointF ¢er,
|
||||
double radius, double origin, double minArc, double maxArc) const
|
||||
{
|
||||
double dir = (360.0 - origin) * M_PI / 180.0; // counter clockwise, radian
|
||||
// counter clockwise, radian
|
||||
|
||||
int offset = 4;
|
||||
|
||||
const QPoint p0 = qwtPolar2Pos(center, offset, dir + M_PI);
|
||||
const double dir = (360.0 - origin) * M_PI / 180.0;
|
||||
const double offset = 4.0;
|
||||
|
||||
const int w = contentsRect().width();
|
||||
const QPointF p0 = qwtPolar2Pos( center, offset, dir + M_PI );
|
||||
|
||||
QwtPolygon pa(4);
|
||||
pa.setPoint(0, qwtPolar2Pos(p0, w, dir - M_PI_2));
|
||||
pa.setPoint(1, qwtPolar2Pos(pa.point(0), 2 * w, dir + M_PI_2));
|
||||
pa.setPoint(2, qwtPolar2Pos(pa.point(1), w, dir));
|
||||
pa.setPoint(3, qwtPolar2Pos(pa.point(2), 2 * w, dir - M_PI_2));
|
||||
const double w = innerRect().width();
|
||||
|
||||
QPainterPath path;
|
||||
path.moveTo( qwtPolar2Pos( p0, w, dir - M_PI_2 ) );
|
||||
path.lineTo( qwtPolar2Pos( path.currentPosition(), 2 * w, dir + M_PI_2 ) );
|
||||
path.lineTo( qwtPolar2Pos( path.currentPosition(), w, dir ) );
|
||||
path.lineTo( qwtPolar2Pos( path.currentPosition(), w, dir - M_PI_2 ) );
|
||||
|
||||
painter->save();
|
||||
painter->setClipRegion(pa); // swallow 180 - 360 degrees
|
||||
painter->setClipPath( path ); // swallow 180 - 360 degrees
|
||||
|
||||
QwtDial::drawScale(painter, center, radius, origin,
|
||||
minArc, maxArc);
|
||||
QwtDial::drawScale(painter,
|
||||
center, radius, origin, minArc, maxArc);
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
void AttitudeIndicator::drawScaleContents(QPainter *painter,
|
||||
const QPoint &, int) const
|
||||
const QPointF &, double) const
|
||||
{
|
||||
int dir = 360 - qRound(origin() - value()); // counter clockwise
|
||||
int arc = 90 + qRound(gradient() * 90);
|
||||
@@ -126,8 +102,8 @@ void AttitudeIndicator::drawScaleContents(QPainter *painter,
|
||||
|
||||
painter->save();
|
||||
painter->setBrush(skyColor);
|
||||
painter->drawChord(scaleContentsRect(),
|
||||
(dir - arc) * 16, 2 * arc * 16 );
|
||||
painter->drawChord(scaleInnerRect(),
|
||||
(dir - arc) * 16, 2 * arc * 16 );
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
@@ -138,7 +114,7 @@ void AttitudeIndicator::keyPressEvent(QKeyEvent *e)
|
||||
case Qt::Key_Plus:
|
||||
setGradient(gradient() + 0.05);
|
||||
break;
|
||||
|
||||
|
||||
case Qt::Key_Minus:
|
||||
setGradient(gradient() - 0.05);
|
||||
break;
|
||||
|
||||
@@ -6,8 +6,9 @@ class AttitudeIndicatorNeedle: public QwtDialNeedle
|
||||
public:
|
||||
AttitudeIndicatorNeedle(const QColor &);
|
||||
|
||||
virtual void draw(QPainter *, const QPoint &, int length,
|
||||
double direction, QPalette::ColorGroup) const;
|
||||
protected:
|
||||
virtual void drawNeedle(QPainter *,
|
||||
double length, QPalette::ColorGroup) const;
|
||||
};
|
||||
|
||||
class AttitudeIndicator: public QwtDial
|
||||
@@ -20,18 +21,18 @@ public:
|
||||
double angle() const { return value(); }
|
||||
double gradient() const { return d_gradient; }
|
||||
|
||||
public slots:
|
||||
public Q_SLOTS:
|
||||
void setGradient(double);
|
||||
void setAngle(double angle) { setValue(angle); }
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
|
||||
virtual void drawScale(QPainter *, const QPoint ¢er,
|
||||
int radius, double origin, double arcMin, double arcMax) const;
|
||||
virtual void drawScale(QPainter *, const QPointF ¢er,
|
||||
double radius, double origin, double arcMin, double arcMax) const;
|
||||
|
||||
virtual void drawScaleContents(QPainter *painter,
|
||||
const QPoint ¢er, int radius) const;
|
||||
const QPointF ¢er, double radius) const;
|
||||
|
||||
private:
|
||||
double d_gradient;
|
||||
|
||||
@@ -5,18 +5,10 @@
|
||||
#include "speedo_meter.h"
|
||||
#include "cockpit_grid.h"
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
typedef QColorGroup Palette;
|
||||
#else
|
||||
typedef QPalette Palette;
|
||||
#endif
|
||||
|
||||
CockpitGrid::CockpitGrid(QWidget *parent):
|
||||
QFrame(parent)
|
||||
{
|
||||
#if QT_VERSION >= 0x040100
|
||||
setAutoFillBackground(true);
|
||||
#endif
|
||||
|
||||
setPalette(colorTheme(QColor(Qt::darkGray).dark(150)));
|
||||
|
||||
@@ -31,13 +23,8 @@ CockpitGrid::CockpitGrid(QWidget *parent):
|
||||
layout->addWidget(dial, 0, i);
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
for ( i = 0; i < layout->numCols(); i++ )
|
||||
layout->setColStretch(i, 1);
|
||||
#else
|
||||
for ( i = 0; i < layout->columnCount(); i++ )
|
||||
layout->setColumnStretch(i, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
QwtDial *CockpitGrid::createDial(int pos)
|
||||
@@ -61,7 +48,7 @@ QwtDial *CockpitGrid::createDial(int pos)
|
||||
handColor = Qt::gray;
|
||||
width = 5;
|
||||
}
|
||||
|
||||
|
||||
QwtDialSimpleNeedle *hand = new QwtDialSimpleNeedle(
|
||||
QwtDialSimpleNeedle::Arrow, true, handColor, knobColor);
|
||||
hand->setWidth(width);
|
||||
@@ -70,7 +57,7 @@ QwtDial *CockpitGrid::createDial(int pos)
|
||||
}
|
||||
|
||||
QTimer *timer = new QTimer(d_clock);
|
||||
timer->connect(timer, SIGNAL(timeout()),
|
||||
timer->connect(timer, SIGNAL(timeout()),
|
||||
d_clock, SLOT(setCurrentTime()));
|
||||
timer->start(1000);
|
||||
|
||||
@@ -84,7 +71,7 @@ QwtDial *CockpitGrid::createDial(int pos)
|
||||
d_speedo->setScale(-1, 2, 20);
|
||||
|
||||
QTimer *timer = new QTimer(d_speedo);
|
||||
timer->connect(timer, SIGNAL(timeout()),
|
||||
timer->connect(timer, SIGNAL(timeout()),
|
||||
this, SLOT(changeSpeed()));
|
||||
timer->start(50);
|
||||
|
||||
@@ -96,12 +83,12 @@ QwtDial *CockpitGrid::createDial(int pos)
|
||||
d_ai = new AttitudeIndicator(this);
|
||||
|
||||
QTimer *gradientTimer = new QTimer(d_ai);
|
||||
gradientTimer->connect(gradientTimer, SIGNAL(timeout()),
|
||||
gradientTimer->connect(gradientTimer, SIGNAL(timeout()),
|
||||
this, SLOT(changeGradient()));
|
||||
gradientTimer->start(100);
|
||||
|
||||
QTimer *angleTimer = new QTimer(d_ai);
|
||||
angleTimer->connect(angleTimer, SIGNAL(timeout()),
|
||||
angleTimer->connect(angleTimer, SIGNAL(timeout()),
|
||||
this, SLOT(changeAngle()));
|
||||
angleTimer->start(100);
|
||||
|
||||
@@ -136,13 +123,13 @@ QPalette CockpitGrid::colorTheme(const QColor &base) const
|
||||
{
|
||||
QPalette::ColorGroup cg = (QPalette::ColorGroup)i;
|
||||
|
||||
palette.setColor(cg, Palette::Base, base);
|
||||
palette.setColor(cg, Palette::Background, background);
|
||||
palette.setColor(cg, Palette::Mid, mid);
|
||||
palette.setColor(cg, Palette::Light, light);
|
||||
palette.setColor(cg, Palette::Dark, dark);
|
||||
palette.setColor(cg, Palette::Text, text);
|
||||
palette.setColor(cg, Palette::Foreground, foreground);
|
||||
palette.setColor(cg, QPalette::Base, base);
|
||||
palette.setColor(cg, QPalette::Window, background);
|
||||
palette.setColor(cg, QPalette::Mid, mid);
|
||||
palette.setColor(cg, QPalette::Light, light);
|
||||
palette.setColor(cg, QPalette::Dark, dark);
|
||||
palette.setColor(cg, QPalette::Text, text);
|
||||
palette.setColor(cg, QPalette::WindowText, foreground);
|
||||
}
|
||||
|
||||
return palette;
|
||||
@@ -154,7 +141,7 @@ void CockpitGrid::changeSpeed()
|
||||
|
||||
double speed = d_speedo->value();
|
||||
|
||||
if ( (speed < 40.0 && offset < 0.0 ) ||
|
||||
if ( (speed < 40.0 && offset < 0.0 ) ||
|
||||
(speed > 160.0 && offset > 0.0) )
|
||||
{
|
||||
offset = -offset;
|
||||
|
||||
@@ -13,7 +13,7 @@ class CockpitGrid: public QFrame
|
||||
public:
|
||||
CockpitGrid(QWidget *parent = NULL);
|
||||
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void changeSpeed();
|
||||
void changeGradient();
|
||||
void changeAngle();
|
||||
|
||||
@@ -4,26 +4,14 @@
|
||||
#include <qwt_dial_needle.h>
|
||||
#include "compass_grid.h"
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
typedef QColorGroup Palette;
|
||||
#else
|
||||
typedef QPalette Palette;
|
||||
#endif
|
||||
|
||||
CompassGrid::CompassGrid(QWidget *parent):
|
||||
QFrame(parent)
|
||||
{
|
||||
#if QT_VERSION < 0x040000
|
||||
setBackgroundColor(Qt::gray);
|
||||
#else
|
||||
QPalette p = palette();
|
||||
p.setColor(backgroundRole(), Qt::gray);
|
||||
setPalette(p);
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= 0x040100
|
||||
setAutoFillBackground(true);
|
||||
#endif
|
||||
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
layout->setSpacing(5);
|
||||
@@ -36,31 +24,22 @@ CompassGrid::CompassGrid(QWidget *parent):
|
||||
layout->addWidget(compass, i / 3, i % 3);
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
for ( i = 0; i < layout->numCols(); i++ )
|
||||
layout->setColStretch(i, 1);
|
||||
#else
|
||||
for ( i = 0; i < layout->columnCount(); i++ )
|
||||
layout->setColumnStretch(i, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
QwtCompass *CompassGrid::createCompass(int pos)
|
||||
{
|
||||
int c;
|
||||
|
||||
Palette colorGroup;
|
||||
for ( c = 0; c < Palette::NColorRoles; c++ )
|
||||
colorGroup.setColor((Palette::ColorRole)c, QColor());
|
||||
QPalette colorGroup;
|
||||
for ( c = 0; c < QPalette::NColorRoles; c++ )
|
||||
colorGroup.setColor((QPalette::ColorRole)c, QColor());
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
colorGroup.setColor(Palette::Base, backgroundColor().light(120));
|
||||
#else
|
||||
colorGroup.setColor(Palette::Base,
|
||||
colorGroup.setColor(QPalette::Base,
|
||||
palette().color(backgroundRole()).light(120));
|
||||
#endif
|
||||
colorGroup.setColor(Palette::Foreground,
|
||||
colorGroup.color(Palette::Base));
|
||||
colorGroup.setColor(QPalette::WindowText,
|
||||
colorGroup.color(QPalette::Base));
|
||||
|
||||
QwtCompass *compass = new QwtCompass(this);
|
||||
compass->setLineWidth(4);
|
||||
@@ -111,12 +90,13 @@ QwtCompass *CompassGrid::createCompass(int pos)
|
||||
a ticks for each degree.
|
||||
*/
|
||||
|
||||
colorGroup.setColor(Palette::Base, Qt::darkBlue);
|
||||
colorGroup.setColor(Palette::Foreground,
|
||||
colorGroup.setColor(QPalette::Base, Qt::darkBlue);
|
||||
colorGroup.setColor(QPalette::WindowText,
|
||||
QColor(Qt::darkBlue).dark(120));
|
||||
colorGroup.setColor(Palette::Text, Qt::white);
|
||||
colorGroup.setColor(QPalette::Text, Qt::white);
|
||||
|
||||
compass->setScaleOptions(QwtDial::ScaleTicks | QwtDial::ScaleLabel);
|
||||
compass->setScaleComponents(
|
||||
QwtAbstractScaleDraw::Ticks | QwtAbstractScaleDraw::Labels);
|
||||
compass->setScaleTicks(1, 1, 3);
|
||||
compass->setScale(36, 5, 0);
|
||||
|
||||
@@ -132,18 +112,14 @@ QwtCompass *CompassGrid::createCompass(int pos)
|
||||
A compass without a frame, showing numbers as tick labels.
|
||||
The origin is at 220.0
|
||||
*/
|
||||
#if QT_VERSION < 0x040000
|
||||
colorGroup.setColor(Palette::Base, backgroundColor());
|
||||
#else
|
||||
colorGroup.setColor(Palette::Base,
|
||||
colorGroup.setColor(QPalette::Base,
|
||||
palette().color(backgroundRole()));
|
||||
#endif
|
||||
colorGroup.setColor(Palette::Foreground, Qt::blue);
|
||||
|
||||
colorGroup.setColor(QPalette::WindowText, Qt::blue);
|
||||
|
||||
compass->setLineWidth(0);
|
||||
|
||||
compass->setScaleOptions(QwtDial::ScaleBackbone |
|
||||
QwtDial::ScaleTicks | QwtDial::ScaleLabel);
|
||||
compass->setScaleComponents( QwtAbstractScaleDraw::Backbone |
|
||||
QwtAbstractScaleDraw::Ticks | QwtAbstractScaleDraw::Labels );
|
||||
compass->setScaleTicks(0, 0, 3);
|
||||
|
||||
QMap<double, QString> map;
|
||||
@@ -157,7 +133,7 @@ QwtCompass *CompassGrid::createCompass(int pos)
|
||||
compass->setScale(36, 5, 0);
|
||||
|
||||
compass->setNeedle(new QwtDialSimpleNeedle(QwtDialSimpleNeedle::Ray,
|
||||
false, Qt::white));
|
||||
true, Qt::white));
|
||||
compass->setOrigin(220.0);
|
||||
compass->setValue(20.0);
|
||||
break;
|
||||
@@ -167,7 +143,8 @@ QwtCompass *CompassGrid::createCompass(int pos)
|
||||
/*
|
||||
A compass showing another needle
|
||||
*/
|
||||
compass->setScaleOptions(QwtDial::ScaleTicks | QwtDial::ScaleLabel);
|
||||
compass->setScaleComponents(
|
||||
QwtAbstractScaleDraw::Ticks | QwtAbstractScaleDraw::Labels );
|
||||
compass->setScaleTicks(0, 0, 3);
|
||||
|
||||
compass->setNeedle(new QwtCompassMagnetNeedle(
|
||||
@@ -180,7 +157,7 @@ QwtCompass *CompassGrid::createCompass(int pos)
|
||||
/*
|
||||
A compass with a yellow on black ray
|
||||
*/
|
||||
colorGroup.setColor(Palette::Foreground, Qt::black);
|
||||
colorGroup.setColor(QPalette::WindowText, Qt::black);
|
||||
|
||||
compass->setNeedle(new QwtDialSimpleNeedle(QwtDialSimpleNeedle::Ray,
|
||||
false, Qt::yellow));
|
||||
@@ -190,16 +167,16 @@ QwtCompass *CompassGrid::createCompass(int pos)
|
||||
}
|
||||
|
||||
QPalette newPalette = compass->palette();
|
||||
for ( c = 0; c < Palette::NColorRoles; c++ )
|
||||
for ( c = 0; c < QPalette::NColorRoles; c++ )
|
||||
{
|
||||
if ( colorGroup.color((Palette::ColorRole)c).isValid() )
|
||||
if ( colorGroup.color((QPalette::ColorRole)c).isValid() )
|
||||
{
|
||||
for ( int cg = 0; cg < QPalette::NColorGroups; cg++ )
|
||||
{
|
||||
{
|
||||
newPalette.setColor(
|
||||
(QPalette::ColorGroup)cg,
|
||||
(Palette::ColorRole)c,
|
||||
colorGroup.color((Palette::ColorRole)c));
|
||||
(QPalette::ColorGroup)cg,
|
||||
(QPalette::ColorRole)c,
|
||||
colorGroup.color((QPalette::ColorRole)c));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -208,16 +185,16 @@ QwtCompass *CompassGrid::createCompass(int pos)
|
||||
{
|
||||
QPalette::ColorGroup cg = (QPalette::ColorGroup)i;
|
||||
|
||||
const QColor light =
|
||||
newPalette.color(cg, Palette::Base).light(170);
|
||||
const QColor dark = newPalette.color(cg, Palette::Base).dark(170);
|
||||
const QColor light =
|
||||
newPalette.color(cg, QPalette::Base).light(170);
|
||||
const QColor dark = newPalette.color(cg, QPalette::Base).dark(170);
|
||||
const QColor mid = compass->frameShadow() == QwtDial::Raised
|
||||
? newPalette.color(cg, Palette::Base).dark(110)
|
||||
: newPalette.color(cg, Palette::Base).light(110);
|
||||
|
||||
newPalette.setColor(cg, Palette::Dark, dark);
|
||||
newPalette.setColor(cg, Palette::Mid, mid);
|
||||
newPalette.setColor(cg, Palette::Light, light);
|
||||
? newPalette.color(cg, QPalette::Base).dark(110)
|
||||
: newPalette.color(cg, QPalette::Base).light(110);
|
||||
|
||||
newPalette.setColor(cg, QPalette::Dark, dark);
|
||||
newPalette.setColor(cg, QPalette::Mid, mid);
|
||||
newPalette.setColor(cg, QPalette::Light, light);
|
||||
}
|
||||
compass->setPalette(newPalette);
|
||||
|
||||
|
||||
@@ -14,17 +14,10 @@ int main (int argc, char **argv)
|
||||
QApplication a(argc, argv);
|
||||
|
||||
QTabWidget tabWidget;
|
||||
#if QT_VERSION < 0x040000
|
||||
tabWidget.addTab(new CompassGrid(&tabWidget), "Compass");
|
||||
tabWidget.addTab(new CockpitGrid(&tabWidget), "Cockpit");
|
||||
a.setMainWidget(&tabWidget);
|
||||
#else
|
||||
tabWidget.addTab(new CompassGrid, "Compass");
|
||||
tabWidget.addTab(new CockpitGrid, "Cockpit");
|
||||
#endif
|
||||
|
||||
tabWidget.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# -*- mode: sh -*- ################################################
|
||||
################################################################
|
||||
# Qwt Widget Library
|
||||
# Copyright (C) 1997 Josef Wilgen
|
||||
# Copyright (C) 2002 Uwe Rathmann
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the Qwt License, Version 1.0
|
||||
###################################################################
|
||||
################################################################
|
||||
|
||||
include( ../examples.pri )
|
||||
include( $${PWD}/../examples.pri )
|
||||
|
||||
TARGET = dials
|
||||
|
||||
@@ -23,4 +23,3 @@ SOURCES = \
|
||||
cockpit_grid.cpp \
|
||||
compass_grid.cpp \
|
||||
dials.cpp
|
||||
|
||||
|
||||
@@ -14,11 +14,12 @@ SpeedoMeter::SpeedoMeter(QWidget *parent):
|
||||
scaleDraw()->setSpacing(8);
|
||||
|
||||
QwtDialSimpleNeedle *needle = new QwtDialSimpleNeedle(
|
||||
QwtDialSimpleNeedle::Arrow, true, Qt::red,
|
||||
QwtDialSimpleNeedle::Arrow, true, Qt::red,
|
||||
QColor(Qt::gray).light(130));
|
||||
setNeedle(needle);
|
||||
|
||||
setScaleOptions(ScaleTicks | ScaleLabel);
|
||||
setScaleComponents(
|
||||
QwtAbstractScaleDraw::Ticks | QwtAbstractScaleDraw::Labels);
|
||||
setScaleTicks(0, 4, 8);
|
||||
}
|
||||
|
||||
@@ -34,17 +35,12 @@ QString SpeedoMeter::label() const
|
||||
}
|
||||
|
||||
void SpeedoMeter::drawScaleContents(QPainter *painter,
|
||||
const QPoint ¢er, int radius) const
|
||||
const QPointF ¢er, double radius) const
|
||||
{
|
||||
QRect rect(0, 0, 2 * radius, 2 * radius - 10);
|
||||
QRectF rect( 0.0, 0.0, 2.0 * radius, 2.0 * radius - 10.0);
|
||||
rect.moveCenter(center);
|
||||
|
||||
const QColor color =
|
||||
#if QT_VERSION < 0x040000
|
||||
colorGroup().text();
|
||||
#else
|
||||
palette().color(QPalette::Text);
|
||||
#endif
|
||||
const QColor color = palette().color(QPalette::Text);
|
||||
painter->setPen(color);
|
||||
|
||||
const int flags = Qt::AlignBottom | Qt::AlignHCenter;
|
||||
|
||||
@@ -11,7 +11,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void drawScaleContents(QPainter *painter,
|
||||
const QPoint ¢er, int radius) const;
|
||||
const QPointF ¢er, double radius) const;
|
||||
|
||||
private:
|
||||
QString d_label;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <qwt_scale_map.h>
|
||||
#include <qwt_plot_canvas.h>
|
||||
#include <qwt_plot_curve.h>
|
||||
#include <qwt_plot_directpainter.h>
|
||||
#include "canvaspicker.h"
|
||||
|
||||
CanvasPicker::CanvasPicker(QwtPlot *plot):
|
||||
@@ -21,16 +22,9 @@ CanvasPicker::CanvasPicker(QwtPlot *plot):
|
||||
// We want the focus, but no focus rect. The
|
||||
// selected point will be highlighted instead.
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
canvas->setFocusPolicy(Qt::StrongFocus);
|
||||
#ifndef QT_NO_CURSOR
|
||||
canvas->setCursor(Qt::PointingHandCursor);
|
||||
#endif
|
||||
#else
|
||||
canvas->setFocusPolicy(QWidget::StrongFocus);
|
||||
#ifndef QT_NO_CURSOR
|
||||
canvas->setCursor(Qt::pointingHandCursor);
|
||||
#endif
|
||||
#endif
|
||||
canvas->setFocusIndicator(QwtPlotCanvas::ItemFocusIndicator);
|
||||
canvas->setFocus();
|
||||
@@ -43,11 +37,7 @@ CanvasPicker::CanvasPicker(QwtPlot *plot):
|
||||
"- Left, ´-´:\tSelect next point\n"
|
||||
"- Right, ´+´:\tSelect previous point\n"
|
||||
"- 7, 8, 9, 4, 6, 1, 2, 3:\tMove selected point";
|
||||
#if QT_VERSION >= 0x040000
|
||||
canvas->setWhatsThis(text);
|
||||
#else
|
||||
QWhatsThis::add(canvas, text);
|
||||
#endif
|
||||
|
||||
shiftCurveCursor(true);
|
||||
}
|
||||
@@ -75,19 +65,19 @@ bool CanvasPicker::eventFilter(QObject *object, QEvent *e)
|
||||
showCursor(false);
|
||||
|
||||
case QEvent::Paint:
|
||||
{
|
||||
{
|
||||
QApplication::postEvent(this, new QEvent(QEvent::User));
|
||||
break;
|
||||
}
|
||||
case QEvent::MouseButtonPress:
|
||||
{
|
||||
select(((QMouseEvent *)e)->pos());
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
case QEvent::MouseMove:
|
||||
{
|
||||
move(((QMouseEvent *)e)->pos());
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
case QEvent::KeyPress:
|
||||
{
|
||||
@@ -97,7 +87,7 @@ bool CanvasPicker::eventFilter(QObject *object, QEvent *e)
|
||||
case Qt::Key_Up:
|
||||
shiftCurveCursor(true);
|
||||
return true;
|
||||
|
||||
|
||||
case Qt::Key_Down:
|
||||
shiftCurveCursor(false);
|
||||
return true;
|
||||
@@ -120,20 +110,20 @@ bool CanvasPicker::eventFilter(QObject *object, QEvent *e)
|
||||
|
||||
// The following keys represent a direction, they are
|
||||
// organized on the keyboard.
|
||||
|
||||
case Qt::Key_1:
|
||||
|
||||
case Qt::Key_1:
|
||||
moveBy(-delta, delta);
|
||||
break;
|
||||
case Qt::Key_2:
|
||||
moveBy(0, delta);
|
||||
break;
|
||||
case Qt::Key_3:
|
||||
case Qt::Key_3:
|
||||
moveBy(delta, delta);
|
||||
break;
|
||||
case Qt::Key_4:
|
||||
moveBy(-delta, 0);
|
||||
break;
|
||||
case Qt::Key_6:
|
||||
case Qt::Key_6:
|
||||
moveBy(delta, 0);
|
||||
break;
|
||||
case Qt::Key_7:
|
||||
@@ -179,7 +169,7 @@ void CanvasPicker::select(const QPoint &pos)
|
||||
curve = c;
|
||||
index = idx;
|
||||
dist = d;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,12 +194,15 @@ void CanvasPicker::moveBy(int dx, int dy)
|
||||
if ( !d_selectedCurve )
|
||||
return;
|
||||
|
||||
const int x = plot()->transform(d_selectedCurve->xAxis(),
|
||||
d_selectedCurve->x(d_selectedPoint)) + dx;
|
||||
const int y = plot()->transform(d_selectedCurve->yAxis(),
|
||||
d_selectedCurve->y(d_selectedPoint)) + dy;
|
||||
const QPointF sample =
|
||||
d_selectedCurve->sample(d_selectedPoint);
|
||||
|
||||
move(QPoint(x, y));
|
||||
const double x = plot()->transform(
|
||||
d_selectedCurve->xAxis(), sample.x());
|
||||
const double y = plot()->transform(
|
||||
d_selectedCurve->yAxis(), sample.y());
|
||||
|
||||
move( QPoint(qRound(x + dx), qRound(y + dy)) );
|
||||
}
|
||||
|
||||
// Move the selected point
|
||||
@@ -218,25 +211,35 @@ void CanvasPicker::move(const QPoint &pos)
|
||||
if ( !d_selectedCurve )
|
||||
return;
|
||||
|
||||
QwtArray<double> xData(d_selectedCurve->dataSize());
|
||||
QwtArray<double> yData(d_selectedCurve->dataSize());
|
||||
QVector<double> xData(d_selectedCurve->dataSize());
|
||||
QVector<double> yData(d_selectedCurve->dataSize());
|
||||
|
||||
for ( int i = 0; i < d_selectedCurve->dataSize(); i++ )
|
||||
for ( int i = 0; i < (int)d_selectedCurve->dataSize(); i++ )
|
||||
{
|
||||
if ( i == d_selectedPoint )
|
||||
{
|
||||
xData[i] = plot()->invTransform(d_selectedCurve->xAxis(), pos.x());;
|
||||
yData[i] = plot()->invTransform(d_selectedCurve->yAxis(), pos.y());;
|
||||
xData[i] = plot()->invTransform(
|
||||
d_selectedCurve->xAxis(), pos.x());
|
||||
yData[i] = plot()->invTransform(
|
||||
d_selectedCurve->yAxis(), pos.y());
|
||||
}
|
||||
else
|
||||
{
|
||||
xData[i] = d_selectedCurve->x(i);
|
||||
yData[i] = d_selectedCurve->y(i);
|
||||
const QPointF sample = d_selectedCurve->sample(i);
|
||||
xData[i] = sample.x();
|
||||
yData[i] = sample.y();
|
||||
}
|
||||
}
|
||||
d_selectedCurve->setData(xData, yData);
|
||||
d_selectedCurve->setSamples(xData, yData);
|
||||
|
||||
/*
|
||||
Enable QwtPlotCanvas::ImmediatePaint, so that the canvas has been
|
||||
updated before we paint the cursor on it.
|
||||
*/
|
||||
plot()->canvas()->setPaintAttribute( QwtPlotCanvas::ImmediatePaint, true);
|
||||
plot()->replot();
|
||||
plot()->canvas()->setPaintAttribute( QwtPlotCanvas::ImmediatePaint, false);
|
||||
|
||||
showCursor(true);
|
||||
}
|
||||
|
||||
@@ -246,24 +249,20 @@ void CanvasPicker::showCursor(bool showIt)
|
||||
if ( !d_selectedCurve )
|
||||
return;
|
||||
|
||||
const QwtSymbol symbol = d_selectedCurve->symbol();
|
||||
QwtSymbol *symbol = const_cast<QwtSymbol *>( d_selectedCurve->symbol() );
|
||||
|
||||
QwtSymbol newSymbol = symbol;
|
||||
const QBrush brush = symbol->brush();
|
||||
if ( showIt )
|
||||
newSymbol.setBrush(symbol.brush().color().dark(150));
|
||||
symbol->setBrush(symbol->brush().color().dark(180));
|
||||
|
||||
const bool doReplot = plot()->autoReplot();
|
||||
QwtPlotDirectPainter directPainter;
|
||||
directPainter.drawSeries(d_selectedCurve, d_selectedPoint, d_selectedPoint);
|
||||
|
||||
plot()->setAutoReplot(false);
|
||||
d_selectedCurve->setSymbol(newSymbol);
|
||||
|
||||
d_selectedCurve->draw(d_selectedPoint, d_selectedPoint);
|
||||
|
||||
d_selectedCurve->setSymbol(symbol);
|
||||
plot()->setAutoReplot(doReplot);
|
||||
if ( showIt )
|
||||
symbol->setBrush(brush); // reset brush
|
||||
}
|
||||
|
||||
// Select the next/previous curve
|
||||
// Select the next/previous curve
|
||||
void CanvasPicker::shiftCurveCursor(bool up)
|
||||
{
|
||||
QwtPlotItemIterator it;
|
||||
@@ -304,7 +303,7 @@ void CanvasPicker::shiftCurveCursor(bool up)
|
||||
--it;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
showCursor(false);
|
||||
d_selectedPoint = 0;
|
||||
d_selectedCurve = (QwtPlotCurve *)*it;
|
||||
|
||||
@@ -11,12 +11,8 @@ ColorBar::ColorBar(Qt::Orientation o, QWidget *parent):
|
||||
d_dark(Qt::black)
|
||||
{
|
||||
#ifndef QT_NO_CURSOR
|
||||
#if QT_VERSION < 0x040000
|
||||
setCursor(Qt::pointingHandCursor);
|
||||
#else
|
||||
setCursor(Qt::PointingHandCursor);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void ColorBar::setOrientation(Qt::Orientation o)
|
||||
@@ -52,13 +48,9 @@ void ColorBar::mousePressEvent(QMouseEvent *e)
|
||||
// happened
|
||||
|
||||
const QPixmap pm = QPixmap::grabWidget(this);
|
||||
#if QT_VERSION < 0x040000
|
||||
const QRgb rgb = pm.convertToImage().pixel(e->x(), e->y());
|
||||
#else
|
||||
const QRgb rgb = pm.toImage().pixel(e->x(), e->y());
|
||||
#endif
|
||||
|
||||
emit selected(QColor(rgb));
|
||||
|
||||
Q_EMIT selected(QColor(rgb));
|
||||
e->accept();
|
||||
}
|
||||
}
|
||||
@@ -74,13 +66,8 @@ void ColorBar::drawColorBar(QPainter *painter, const QRect &rect) const
|
||||
int h1, s1, v1;
|
||||
int h2, s2, v2;
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
d_light.hsv(&h1, &s1, &v1);
|
||||
d_dark.hsv(&h2, &s2, &v2);
|
||||
#else
|
||||
d_light.getHsv(&h1, &s1, &v1);
|
||||
d_dark.getHsv(&h2, &s2, &v2);
|
||||
#endif
|
||||
|
||||
painter->save();
|
||||
painter->setClipRect(rect);
|
||||
@@ -89,7 +76,7 @@ void ColorBar::drawColorBar(QPainter *painter, const QRect &rect) const
|
||||
painter->fillRect(rect, d_dark);
|
||||
|
||||
const int sectionSize = 2;
|
||||
|
||||
|
||||
int numIntervalls;
|
||||
if ( d_orientation == Qt::Horizontal )
|
||||
numIntervalls = rect.width() / sectionSize;
|
||||
@@ -122,4 +109,3 @@ void ColorBar::drawColorBar(QPainter *painter, const QRect &rect) const
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class ColorBar: public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ColorBar(Qt::Orientation = Qt::Horizontal,
|
||||
ColorBar(Qt::Orientation = Qt::Horizontal,
|
||||
QWidget * = NULL);
|
||||
|
||||
virtual void setOrientation(Qt::Orientation o);
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
QColor light() const { return d_light; }
|
||||
QColor dark() const { return d_dark; }
|
||||
|
||||
signals:
|
||||
Q_SIGNALS:
|
||||
void selected(const QColor &);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -17,14 +17,10 @@ int main (int argc, char **argv)
|
||||
|
||||
QMainWindow mainWindow;
|
||||
QToolBar *toolBar = new QToolBar(&mainWindow);
|
||||
#if QT_VERSION >= 0x040000
|
||||
QAction *action = QWhatsThis::createAction(toolBar);
|
||||
toolBar->addAction(action);
|
||||
mainWindow.addToolBar(toolBar);
|
||||
#else
|
||||
(void)QWhatsThis::whatsThisButton(toolBar);
|
||||
#endif
|
||||
|
||||
|
||||
Plot *plot = new Plot(&mainWindow);
|
||||
|
||||
// The canvas picker handles all mouse and key
|
||||
@@ -40,9 +36,6 @@ int main (int argc, char **argv)
|
||||
plot, SLOT(insertCurve(int, double)));
|
||||
|
||||
mainWindow.setCentralWidget(plot);
|
||||
#if QT_VERSION < 0x040000
|
||||
a.setMainWidget(&mainWindow);
|
||||
#endif
|
||||
|
||||
mainWindow.resize(540, 400);
|
||||
mainWindow.show();
|
||||
@@ -51,11 +44,7 @@ int main (int argc, char **argv)
|
||||
"An useless plot to demonstrate how to use event filtering.\n\n"
|
||||
"You can click on the color bar, the scales or move the wheel.\n"
|
||||
"All points can be moved using the mouse or the keyboard.";
|
||||
#if QT_VERSION < 0x040000
|
||||
QWhatsThis::add(plot, text);
|
||||
#else
|
||||
plot->setWhatsThis(text);
|
||||
#endif
|
||||
|
||||
int rv = a.exec();
|
||||
return rv;
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
# -*- mode: sh -*- ################################################
|
||||
################################################################
|
||||
# Qwt Widget Library
|
||||
# Copyright (C) 1997 Josef Wilgen
|
||||
# Copyright (C) 2002 Uwe Rathmann
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the Qwt License, Version 1.0
|
||||
###################################################################
|
||||
################################################################
|
||||
|
||||
include( ../examples.pri )
|
||||
include( $${PWD}/../examples.pri )
|
||||
|
||||
TARGET = event_filter
|
||||
|
||||
HEADERS = \
|
||||
colorbar.h \
|
||||
scalepicker.h \
|
||||
canvaspicker.h \
|
||||
plot.h
|
||||
colorbar.h \
|
||||
scalepicker.h \
|
||||
canvaspicker.h \
|
||||
plot.h
|
||||
|
||||
SOURCES = \
|
||||
colorbar.cpp \
|
||||
scalepicker.cpp \
|
||||
canvaspicker.cpp \
|
||||
plot.cpp \
|
||||
event_filter.cpp
|
||||
colorbar.cpp \
|
||||
scalepicker.cpp \
|
||||
canvaspicker.cpp \
|
||||
plot.cpp \
|
||||
event_filter.cpp
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#include "plot.h"
|
||||
#include "colorbar.h"
|
||||
#include <qevent.h>
|
||||
#if QT_VERSION < 0x040000
|
||||
#include <qwhatsthis.h>
|
||||
#endif
|
||||
#include <qwt_plot_layout.h>
|
||||
#include <qwt_plot_canvas.h>
|
||||
#include <qwt_plot_grid.h>
|
||||
@@ -33,8 +30,7 @@ Plot::Plot(QWidget *parent):
|
||||
// appear/disappear when scrolling vertically
|
||||
|
||||
QwtScaleDraw *sd = axisScaleDraw(QwtPlot::yLeft);
|
||||
sd->setMinimumExtent( sd->extent(QPen(),
|
||||
axisWidget(QwtPlot::yLeft)->font()));
|
||||
sd->setMinimumExtent( sd->extent(axisWidget(QwtPlot::yLeft)->font()));
|
||||
|
||||
plotLayout()->setAlignCanvasToScales(true);
|
||||
|
||||
@@ -53,17 +49,13 @@ Plot::Plot(QWidget *parent):
|
||||
scaleWidget->setMargin(10); // area for the color bar
|
||||
d_colorBar = new ColorBar(Qt::Vertical, scaleWidget);
|
||||
d_colorBar->setRange(Qt::red, Qt::darkBlue);
|
||||
#if QT_VERSION >= 0x040000
|
||||
d_colorBar->setFocusPolicy( Qt::TabFocus );
|
||||
#else
|
||||
d_colorBar->setFocusPolicy( QWidget::TabFocus );
|
||||
#endif
|
||||
d_colorBar->setFocusPolicy(Qt::TabFocus);
|
||||
|
||||
connect(d_colorBar, SIGNAL(selected(const QColor &)),
|
||||
SLOT(setCanvasColor(const QColor &)));
|
||||
|
||||
// we need the resize events, to lay out the color bar
|
||||
scaleWidget->installEventFilter(this);
|
||||
scaleWidget->installEventFilter(this);
|
||||
|
||||
// ------------------------------------
|
||||
// We add a wheel to the canvas
|
||||
@@ -82,16 +74,6 @@ Plot::Plot(QWidget *parent):
|
||||
// we need the resize events, to lay out the wheel
|
||||
canvas()->installEventFilter(this);
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
QWhatsThis::add(d_colorBar,
|
||||
"Selecting a color will change the background of the plot.");
|
||||
QWhatsThis::add(scaleWidget,
|
||||
"Selecting a value at the scale will insert a new curve.");
|
||||
QWhatsThis::add(d_wheel,
|
||||
"With the wheel you can move the visible area.");
|
||||
QWhatsThis::add(axisWidget(xBottom),
|
||||
"Selecting a value at the scale will insert a new curve.");
|
||||
#else
|
||||
d_colorBar->setWhatsThis(
|
||||
"Selecting a color will change the background of the plot.");
|
||||
scaleWidget->setWhatsThis(
|
||||
@@ -100,8 +82,6 @@ Plot::Plot(QWidget *parent):
|
||||
"With the wheel you can move the visible area.");
|
||||
axisWidget(xBottom)->setWhatsThis(
|
||||
"Selecting a value at the scale will insert a new curve.");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void Plot::setCanvasColor(const QColor &c)
|
||||
@@ -158,7 +138,7 @@ void Plot::insertCurve(int axis, double base)
|
||||
o = Qt::Horizontal;
|
||||
else
|
||||
o = Qt::Vertical;
|
||||
|
||||
|
||||
QRgb rgb = (uint)rand();
|
||||
insertCurve(o, QColor(rgb), base);
|
||||
replot();
|
||||
@@ -170,7 +150,7 @@ void Plot::insertCurve(Qt::Orientation o,
|
||||
QwtPlotCurve *curve = new QwtPlotCurve();
|
||||
|
||||
curve->setPen(c);
|
||||
curve->setSymbol(QwtSymbol(QwtSymbol::Ellipse,
|
||||
curve->setSymbol(new QwtSymbol(QwtSymbol::Ellipse,
|
||||
Qt::gray, c, QSize(8, 8)));
|
||||
|
||||
double x[10];
|
||||
@@ -190,7 +170,7 @@ void Plot::insertCurve(Qt::Orientation o,
|
||||
y[i] = v;
|
||||
}
|
||||
}
|
||||
|
||||
curve->setData(x, y, sizeof(x) / sizeof(x[0]));
|
||||
|
||||
curve->setSamples(x, y, sizeof(x) / sizeof(x[0]));
|
||||
curve->attach(this);
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@ public:
|
||||
Plot(QWidget *parent = NULL);
|
||||
virtual bool eventFilter(QObject *, QEvent *);
|
||||
|
||||
public slots:
|
||||
public Q_SLOTS:
|
||||
void setCanvasColor(const QColor &);
|
||||
void insertCurve(int axis, double base);
|
||||
|
||||
private slots:
|
||||
private Q_SLOTS:
|
||||
void scrollLeftAxis(double);
|
||||
|
||||
private:
|
||||
|
||||
@@ -16,7 +16,7 @@ ScalePicker::ScalePicker(QwtPlot *plot):
|
||||
|
||||
bool ScalePicker::eventFilter(QObject *object, QEvent *e)
|
||||
{
|
||||
if ( object->inherits("QwtScaleWidget") &&
|
||||
if ( object->inherits("QwtScaleWidget") &&
|
||||
e->type() == QEvent::MouseButtonPress )
|
||||
{
|
||||
mouseClicked((const QwtScaleWidget *)object,
|
||||
@@ -27,7 +27,7 @@ bool ScalePicker::eventFilter(QObject *object, QEvent *e)
|
||||
return QObject::eventFilter(object, e);
|
||||
}
|
||||
|
||||
void ScalePicker::mouseClicked(const QwtScaleWidget *scale, const QPoint &pos)
|
||||
void ScalePicker::mouseClicked(const QwtScaleWidget *scale, const QPoint &pos)
|
||||
{
|
||||
QRect rect = scaleRect(scale);
|
||||
|
||||
@@ -37,40 +37,40 @@ void ScalePicker::mouseClicked(const QwtScaleWidget *scale, const QPoint &pos)
|
||||
|
||||
if ( rect.contains(pos) ) // No click on the title
|
||||
{
|
||||
// translate the position in a value on the scale
|
||||
// translate the position in a value on the scale
|
||||
|
||||
double value = 0.0;
|
||||
int axis = -1;
|
||||
|
||||
const QwtScaleDraw *sd = scale->scaleDraw();
|
||||
switch(scale->alignment())
|
||||
switch(scale->alignment())
|
||||
{
|
||||
case QwtScaleDraw::LeftScale:
|
||||
{
|
||||
value = sd->map().invTransform(pos.y());
|
||||
value = sd->scaleMap().invTransform(pos.y());
|
||||
axis = QwtPlot::yLeft;
|
||||
break;
|
||||
}
|
||||
case QwtScaleDraw::RightScale:
|
||||
{
|
||||
value = sd->map().invTransform(pos.y());
|
||||
value = sd->scaleMap().invTransform(pos.y());
|
||||
axis = QwtPlot::yRight;
|
||||
break;
|
||||
}
|
||||
case QwtScaleDraw::BottomScale:
|
||||
{
|
||||
value = sd->map().invTransform(pos.x());
|
||||
value = sd->scaleMap().invTransform(pos.x());
|
||||
axis = QwtPlot::xBottom;
|
||||
break;
|
||||
}
|
||||
case QwtScaleDraw::TopScale:
|
||||
{
|
||||
value = sd->map().invTransform(pos.x());
|
||||
value = sd->scaleMap().invTransform(pos.x());
|
||||
axis = QwtPlot::xTop;
|
||||
break;
|
||||
}
|
||||
}
|
||||
emit clicked(axis, value);
|
||||
Q_EMIT clicked(axis, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,12 +78,12 @@ void ScalePicker::mouseClicked(const QwtScaleWidget *scale, const QPoint &pos)
|
||||
QRect ScalePicker::scaleRect(const QwtScaleWidget *scale) const
|
||||
{
|
||||
const int bld = scale->margin();
|
||||
const int mjt = scale->scaleDraw()->majTickLength();
|
||||
const int mjt = scale->scaleDraw()->maxTickLength();
|
||||
const int sbd = scale->startBorderDist();
|
||||
const int ebd = scale->endBorderDist();
|
||||
|
||||
QRect rect;
|
||||
switch(scale->alignment())
|
||||
switch(scale->alignment())
|
||||
{
|
||||
case QwtScaleDraw::LeftScale:
|
||||
{
|
||||
@@ -99,13 +99,13 @@ QRect ScalePicker::scaleRect(const QwtScaleWidget *scale) const
|
||||
}
|
||||
case QwtScaleDraw::BottomScale:
|
||||
{
|
||||
rect.setRect(sbd, bld,
|
||||
rect.setRect(sbd, bld,
|
||||
scale->width() - sbd - ebd, mjt);
|
||||
break;
|
||||
}
|
||||
case QwtScaleDraw::TopScale:
|
||||
{
|
||||
rect.setRect(sbd, scale->height() - bld - mjt,
|
||||
rect.setRect(sbd, scale->height() - bld - mjt,
|
||||
scale->width() - sbd - ebd, mjt);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ public:
|
||||
ScalePicker(QwtPlot *plot);
|
||||
virtual bool eventFilter(QObject *, QEvent *);
|
||||
|
||||
signals:
|
||||
Q_SIGNALS:
|
||||
void clicked(int axis, double value);
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- mode: sh -*- ################################################
|
||||
################################################################
|
||||
# Qwt Widget Library
|
||||
# Copyright (C) 1997 Josef Wilgen
|
||||
# Copyright (C) 2002 Uwe Rathmann
|
||||
@@ -7,55 +7,43 @@
|
||||
# modify it under the terms of the Qwt License, Version 1.0
|
||||
###################################################################
|
||||
|
||||
QWT_ROOT = ../..
|
||||
|
||||
QWT_ROOT = $${PWD}/..
|
||||
include( $${QWT_ROOT}/qwtconfig.pri )
|
||||
|
||||
SUFFIX_STR =
|
||||
VVERSION = $$[QT_VERSION]
|
||||
isEmpty(VVERSION) {
|
||||
|
||||
# Qt 3
|
||||
debug {
|
||||
SUFFIX_STR = $${DEBUG_SUFFIX}
|
||||
}
|
||||
else {
|
||||
SUFFIX_STR = $${RELEASE_SUFFIX}
|
||||
}
|
||||
}
|
||||
else {
|
||||
CONFIG(debug, debug|release) {
|
||||
SUFFIX_STR = $${DEBUG_SUFFIX}
|
||||
}
|
||||
else {
|
||||
SUFFIX_STR = $${RELEASE_SUFFIX}
|
||||
}
|
||||
}
|
||||
include( $${QWT_ROOT}/qwtbuild.pri )
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
MOC_DIR = moc
|
||||
INCLUDEPATH += $${QWT_ROOT}/src
|
||||
DEPENDPATH += $${QWT_ROOT}/src
|
||||
OBJECTS_DIR = obj$${SUFFIX_STR}
|
||||
DESTDIR = $${QWT_ROOT}/examples/bin$${SUFFIX_STR}
|
||||
DESTDIR = $${QWT_ROOT}/examples/bin
|
||||
|
||||
QWTLIB = qwt$${SUFFIX_STR}
|
||||
QMAKE_RPATHDIR *= $${QWT_ROOT}/lib
|
||||
|
||||
win32 {
|
||||
contains(CONFIG, QwtDll) {
|
||||
DEFINES += QT_DLL QWT_DLL
|
||||
QWTLIB = $${QWTLIB}$${VER_MAJ}
|
||||
}
|
||||
contains(QWT_CONFIG, QwtFramework) {
|
||||
|
||||
win32-msvc:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib
|
||||
win32-msvc.net:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib
|
||||
win32-msvc2002:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib
|
||||
win32-msvc2003:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib
|
||||
win32-msvc2005:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib
|
||||
win32-msvc2008:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib
|
||||
win32-g++:LIBS += -L$${QWT_ROOT}/lib -l$${QWTLIB}
|
||||
LIBS += -F$${QWT_ROOT}/lib
|
||||
}
|
||||
else {
|
||||
LIBS += -L$${QWT_ROOT}/lib -l$${QWTLIB}
|
||||
|
||||
LIBS += -L$${QWT_ROOT}/lib
|
||||
}
|
||||
|
||||
IPATH = $${INCLUDEPATH}
|
||||
qtAddLibrary(qwt)
|
||||
INCLUDEPATH = $${IPATH}
|
||||
|
||||
contains(QWT_CONFIG, QwtSvg) {
|
||||
|
||||
QT += svg
|
||||
}
|
||||
else {
|
||||
|
||||
DEFINES += QWT_NO_SVG
|
||||
}
|
||||
|
||||
|
||||
win32 {
|
||||
contains(QWT_CONFIG, QwtDll) {
|
||||
DEFINES += QT_DLL QWT_DLL
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,50 +1,52 @@
|
||||
# -*- mode: sh -*- ################################################
|
||||
################################################################
|
||||
# Qwt Widget Library
|
||||
# Copyright (C) 1997 Josef Wilgen
|
||||
# Copyright (C) 2002 Uwe Rathmann
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the Qwt License, Version 1.0
|
||||
###################################################################
|
||||
################################################################
|
||||
|
||||
include( ../qwtconfig.pri )
|
||||
include( $${PWD}/../qwtconfig.pri )
|
||||
|
||||
TEMPLATE = subdirs
|
||||
|
||||
contains(CONFIG, QwtPlot) {
|
||||
|
||||
SUBDIRS += \
|
||||
cpuplot \
|
||||
curvdemo1 \
|
||||
curvdemo2 \
|
||||
many_axes \
|
||||
simple_plot \
|
||||
realtime_plot \
|
||||
spectrogram \
|
||||
histogram
|
||||
contains(QWT_CONFIG, QwtPlot) {
|
||||
|
||||
contains(CONFIG, QwtWidgets) {
|
||||
SUBDIRS += \
|
||||
cpuplot \
|
||||
curvdemo1 \
|
||||
curvdemo2 \
|
||||
friedberg \
|
||||
sinusplot \
|
||||
realtime \
|
||||
refreshtest \
|
||||
navigation \
|
||||
plotmatrix \
|
||||
spectrogram \
|
||||
rasterview \
|
||||
tvplot
|
||||
|
||||
SUBDIRS += \
|
||||
bode \
|
||||
data_plot \
|
||||
event_filter
|
||||
}
|
||||
|
||||
contains(CONFIG, QwtSVGItem) {
|
||||
contains(QWT_CONFIG, QwtWidgets) {
|
||||
|
||||
SUBDIRS += \
|
||||
svgmap
|
||||
}
|
||||
SUBDIRS += \
|
||||
bode \
|
||||
event_filter \
|
||||
oscilloscope
|
||||
}
|
||||
|
||||
contains(QWT_CONFIG, QwtSvg) {
|
||||
|
||||
SUBDIRS += \
|
||||
svgmap
|
||||
}
|
||||
}
|
||||
|
||||
contains(CONFIG, QwtWidgets) {
|
||||
contains(QWT_CONFIG, QwtWidgets) {
|
||||
|
||||
SUBDIRS += \
|
||||
sysinfo \
|
||||
radio \
|
||||
dials \
|
||||
sliders
|
||||
SUBDIRS += \
|
||||
sysinfo \
|
||||
radio \
|
||||
dials \
|
||||
sliders
|
||||
}
|
||||
|
||||
|
||||
|
||||
21
qwt/examples/friedberg/friedberg.pro
Normal file
@@ -0,0 +1,21 @@
|
||||
################################################################
|
||||
# Qwt Widget Library
|
||||
# Copyright (C) 1997 Josef Wilgen
|
||||
# Copyright (C) 2002 Uwe Rathmann
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the Qwt License, Version 1.0
|
||||
################################################################
|
||||
|
||||
include( $${PWD}/../examples.pri )
|
||||
|
||||
TARGET = friedberg
|
||||
|
||||
HEADERS = \
|
||||
plot.h \
|
||||
friedberg2007.h
|
||||
|
||||
SOURCES = \
|
||||
friedberg2007.cpp \
|
||||
plot.cpp \
|
||||
main.cpp
|
||||
384
qwt/examples/friedberg/friedberg2007.cpp
Normal file
@@ -0,0 +1,384 @@
|
||||
#include "friedberg2007.h"
|
||||
|
||||
// Temperature 2007 from Friedberg somewhere in Germany
|
||||
// See: http://wetter61169.de
|
||||
|
||||
Temperature friedberg2007[] =
|
||||
{
|
||||
/* 01.01 */ Temperature( 2.6, 9.8, 7.07862 ),
|
||||
/* 02.01 */ Temperature( 0.8, 5.8, 3.6993 ),
|
||||
/* 03.01 */ Temperature( 2, 7, 5.02388 ),
|
||||
/* 04.01 */ Temperature( 5.3, 7.8, 6.37778 ),
|
||||
/* 05.01 */ Temperature( 5.6, 7.7, 6.83149 ),
|
||||
/* 06.01 */ Temperature( 7.2, 8.9, 8.0816 ),
|
||||
/* 07.01 */ Temperature( 4.2, 9.9, 7.54704 ),
|
||||
/* 08.01 */ Temperature( 3.5, 8.9, 6.71951 ),
|
||||
/* 09.01 */ Temperature( 8.2, 12.9, 10.8594 ),
|
||||
/* 10.01 */ Temperature( 6.3, 11.9, 9.76424 ),
|
||||
/* 11.01 */ Temperature( 3.9, 9.2, 6.18223 ),
|
||||
/* 12.01 */ Temperature( 6.9, 9.7, 8.44236 ),
|
||||
/* 13.01 */ Temperature( 9, 12.3, 10.6649 ),
|
||||
/* 14.01 */ Temperature( 1.8, 10.8, 7.23438 ),
|
||||
/* 15.01 */ Temperature( -2.8, 1.8, -0.518403 ),
|
||||
/* 16.01 */ Temperature( -0.6, 4.5, 2.39479 ),
|
||||
/* 17.01 */ Temperature( 4.3, 10.2, 7.23472 ),
|
||||
/* 18.01 */ Temperature( 9.1, 13.6, 10.9316 ),
|
||||
/* 19.01 */ Temperature( 6.9, 12.4, 9.4128 ),
|
||||
/* 20.01 */ Temperature( 7.1, 13.3, 10.5083 ),
|
||||
/* 21.01 */ Temperature( 3.5, 9.6, 6.10871 ),
|
||||
/* 22.01 */ Temperature( -1.8, 6, 2.89028 ),
|
||||
/* 23.01 */ Temperature( -5.4, 1.7, -2.46678 ),
|
||||
/* 24.01 */ Temperature( -5.3, -1.3, -3.71483 ),
|
||||
/* 25.01 */ Temperature( -7.5, 3.3, -3.36736 ),
|
||||
/* 26.01 */ Temperature( -11.1, 0.3, -5.50662 ),
|
||||
/* 27.01 */ Temperature( 0.2, 3.2, 1.95345 ),
|
||||
/* 28.01 */ Temperature( 1.9, 5.2, 3.43633 ),
|
||||
/* 29.01 */ Temperature( 4.4, 9.1, 6.24236 ),
|
||||
/* 30.01 */ Temperature( 2.3, 11.5, 6.03114 ),
|
||||
/* 31.01 */ Temperature( 4.6, 10.2, 6.04192 ),
|
||||
|
||||
/* 01.02 */ Temperature( 4.8, 13.8, 7.87674 ),
|
||||
/* 02.02 */ Temperature( 5.7, 10, 7.28646 ),
|
||||
/* 03.02 */ Temperature( 2.9, 8.2, 5.71771 ),
|
||||
/* 04.02 */ Temperature( -1.5, 7.2, 4.71319 ),
|
||||
/* 05.02 */ Temperature( -2.6, 4.4, 1.23542 ),
|
||||
/* 06.02 */ Temperature( 0.3, 9.2, 2.59965 ),
|
||||
/* 07.02 */ Temperature( -0.4, 2.4, 0.641667 ),
|
||||
/* 08.02 */ Temperature( -1.7, 3.8, 0.811458 ),
|
||||
/* 09.02 */ Temperature( 0.7, 7, 3.58328 ),
|
||||
/* 10.02 */ Temperature( 1, 6, 3.51181 ),
|
||||
/* 11.02 */ Temperature( 4.7, 9.6, 6.14913 ),
|
||||
/* 12.02 */ Temperature( 5.3, 8.7, 6.80552 ),
|
||||
/* 13.02 */ Temperature( 4.4, 10.3, 6.84552 ),
|
||||
/* 14.02 */ Temperature( 2.6, 6.5, 4.58681 ),
|
||||
/* 15.02 */ Temperature( -0.8, 13.4, 6.38542 ),
|
||||
/* 16.02 */ Temperature( -3, 14.4, 4.11336 ),
|
||||
/* 17.02 */ Temperature( 0.5, 13, 5.87457 ),
|
||||
/* 18.02 */ Temperature( -2.2, 14.1, 4.36528 ),
|
||||
/* 19.02 */ Temperature( 3.9, 5.6, 4.63737 ),
|
||||
/* 20.02 */ Temperature( -0.4, 9.2, 4.37014 ),
|
||||
/* 21.02 */ Temperature( -1.9, 5.5, 1.85675 ),
|
||||
/* 22.02 */ Temperature( 1, 13.1, 5.41176 ),
|
||||
/* 23.02 */ Temperature( 1.9, 13.9, 7.74251 ),
|
||||
/* 24.02 */ Temperature( 3.8, 9.6, 7.19306 ),
|
||||
/* 25.02 */ Temperature( 5.8, 10.8, 7.80312 ),
|
||||
/* 26.02 */ Temperature( 5.2, 10.4, 6.79481 ),
|
||||
/* 27.02 */ Temperature( 3.2, 7.4, 5.22986 ),
|
||||
/* 28.02 */ Temperature( 6.4, 13.4, 9.13356 ),
|
||||
|
||||
/* 01.03 */ Temperature( 4.6, 11.4, 7.70554 ),
|
||||
/* 02.03 */ Temperature( 3.4, 10.9, 5.98408 ),
|
||||
/* 03.03 */ Temperature( 2.9, 10.5, 5.45675 ),
|
||||
/* 04.03 */ Temperature( -0.7, 16.8, 7.29585 ),
|
||||
/* 05.03 */ Temperature( 4.2, 13.4, 8.35862 ),
|
||||
/* 06.03 */ Temperature( 3, 13, 7.76644 ),
|
||||
/* 07.03 */ Temperature( 2, 13.3, 8.24618 ),
|
||||
/* 08.03 */ Temperature( -0.8, 15, 6.11765 ),
|
||||
/* 09.03 */ Temperature( -0.7, 11, 5.7568 ),
|
||||
/* 10.03 */ Temperature( 1.2, 14.4, 6.61389 ),
|
||||
/* 11.03 */ Temperature( -1.7, 18, 6.66146 ),
|
||||
/* 12.03 */ Temperature( -0.6, 21.9, 8.9816 ),
|
||||
/* 13.03 */ Temperature( -0.9, 19.6, 9.08299 ),
|
||||
/* 14.03 */ Temperature( 5.3, 18.9, 10.5562 ),
|
||||
/* 15.03 */ Temperature( 2, 20.5, 9.65156 ),
|
||||
/* 16.03 */ Temperature( 0.2, 16.7, 7.8699 ),
|
||||
/* 17.03 */ Temperature( 4.5, 10.6, 7.87535 ),
|
||||
/* 18.03 */ Temperature( 2.7, 9.7, 6.71806 ),
|
||||
/* 19.03 */ Temperature( 0.4, 10.9, 3.92404 ),
|
||||
/* 20.03 */ Temperature( -2, 12.7, 4.01359 ),
|
||||
/* 21.03 */ Temperature( 0.3, 6.8, 3.00382 ),
|
||||
/* 22.03 */ Temperature( 0.9, 4.2, 2.2816 ),
|
||||
/* 23.03 */ Temperature( 2, 5.7, 3.39233 ),
|
||||
/* 24.03 */ Temperature( 3.9, 9.3, 6.41076 ),
|
||||
/* 25.03 */ Temperature( 4.2, 19.1, 9.92182 ),
|
||||
/* 26.03 */ Temperature( 2.3, 22, 12.5716 ),
|
||||
/* 27.03 */ Temperature( 4.9, 20.6, 13.4568 ),
|
||||
/* 28.03 */ Temperature( 0.3, 22.8, 10.755 ),
|
||||
/* 29.03 */ Temperature( 1.8, 17.2, 9.43924 ),
|
||||
/* 30.03 */ Temperature( 1.9, 19.8, 10.25 ),
|
||||
/* 31.03 */ Temperature( 6.7, 17, 11.1324 ),
|
||||
|
||||
/* 01.04 */ Temperature( 5.7, 22, 12.8457 ),
|
||||
/* 02.04 */ Temperature( 6.4, 22.1, 13.3847 ),
|
||||
/* 03.04 */ Temperature( 5.8, 17.5, 10.5614 ),
|
||||
/* 04.04 */ Temperature( 2.8, 16.2, 8.06574 ),
|
||||
/* 05.04 */ Temperature( -0.6, 20.8, 9.18062 ),
|
||||
/* 06.04 */ Temperature( 2.1, 24, 13.0069 ),
|
||||
/* 07.04 */ Temperature( 5.3, 16.2, 10.2771 ),
|
||||
/* 08.04 */ Temperature( 0.1, 20.7, 9.79861 ),
|
||||
/* 09.04 */ Temperature( 0.3, 18.9, 10.0087 ),
|
||||
/* 10.04 */ Temperature( 4, 16.4, 11.4208 ),
|
||||
/* 11.04 */ Temperature( 2.3, 23.4, 13.083 ),
|
||||
/* 12.04 */ Temperature( 7, 29.4, 16.5826 ),
|
||||
/* 13.04 */ Temperature( 10.6, 31.5, 19.2249 ),
|
||||
/* 14.04 */ Temperature( 11.8, 34, 21.441 ),
|
||||
/* 15.04 */ Temperature( 11.6, 33.8, 21.0201 ),
|
||||
/* 16.04 */ Temperature( 8.7, 31.1, 18.7885 ),
|
||||
/* 17.04 */ Temperature( 5.5, 27.2, 16.1432 ),
|
||||
/* 18.04 */ Temperature( 6.1, 17.2, 10.6688 ),
|
||||
/* 19.04 */ Temperature( -0.6, 21.3, 10.4806 ),
|
||||
/* 20.04 */ Temperature( 5.9, 21.6, 12.6257 ),
|
||||
/* 21.04 */ Temperature( 2.1, 21.6, 11.0858 ),
|
||||
/* 22.04 */ Temperature( 3.9, 25.9, 14.2108 ),
|
||||
/* 23.04 */ Temperature( 3.1, 27.8, 15.7111 ),
|
||||
/* 24.04 */ Temperature( 13.7, 29, 19.6397 ),
|
||||
/* 25.04 */ Temperature( 9.8, 31.6, 19.601 ),
|
||||
/* 26.04 */ Temperature( 8.2, 32.4, 20.0389 ),
|
||||
/* 27.04 */ Temperature( 11.8, 32.1, 21.0726 ),
|
||||
/* 28.04 */ Temperature( 12.6, 33.3, 21.6993 ),
|
||||
/* 29.04 */ Temperature( 10.5, 27.4, 19.1206 ),
|
||||
/* 30.04 */ Temperature( 5.3, 26.4, 15.0972 ),
|
||||
|
||||
/* 01.05 */ Temperature( 6.9, 25.3, 15.2802 ),
|
||||
/* 02.05 */ Temperature( 4.3, 26.2, 14.8401 ),
|
||||
/* 03.05 */ Temperature( 7.1, 28.5, 17.2145 ),
|
||||
/* 04.05 */ Temperature( 11, 28.5, 18.537 ),
|
||||
/* 05.05 */ Temperature( 12, 28, 18.1672 ),
|
||||
/* 06.05 */ Temperature( 10.4, 29, 18.3844 ),
|
||||
/* 07.05 */ Temperature( 13, 18.1, 15.0028 ),
|
||||
/* 08.05 */ Temperature( 10.7, 18.3, 13.2014 ),
|
||||
/* 09.05 */ Temperature( 10.8, 14.4, 12.5208 ),
|
||||
/* 10.05 */ Temperature( 11.9, 23.5, 16.9632 ),
|
||||
/* 11.05 */ Temperature( 9.8, 16.9, 15.0795 ),
|
||||
/* 12.05 */ Temperature( 9.2, 19.6, 13.8521 ),
|
||||
/* 13.05 */ Temperature( 8.9, 26.3, 16.2028 ),
|
||||
/* 14.05 */ Temperature( 11.1, 17.5, 13.2934 ),
|
||||
/* 15.05 */ Temperature( 6.5, 17, 11.7743 ),
|
||||
/* 16.05 */ Temperature( 4.9, 13.6, 9.75625 ),
|
||||
/* 17.05 */ Temperature( 6.8, 16.6, 9.96701 ),
|
||||
/* 18.05 */ Temperature( 2.4, 21.2, 11.4311 ),
|
||||
/* 19.05 */ Temperature( 8.2, 24.4, 15.4188 ),
|
||||
/* 20.05 */ Temperature( 14.1, 31.7, 21.3303 ),
|
||||
/* 21.05 */ Temperature( 11, 30.9, 21.5359 ),
|
||||
/* 22.05 */ Temperature( 13.8, 31, 21.5177 ),
|
||||
/* 23.05 */ Temperature( 16, 27.8, 21.0271 ),
|
||||
/* 24.05 */ Temperature( 15, 34, 23.4142 ),
|
||||
/* 25.05 */ Temperature( 14.3, 31.8, 22.8903 ),
|
||||
/* 26.05 */ Temperature( 13.6, 33.1, 22.6156 ),
|
||||
/* 27.05 */ Temperature( 11.2, 23.4, 16.6192 ),
|
||||
/* 28.05 */ Temperature( 9.6, 13.1, 11.3222 ),
|
||||
/* 29.05 */ Temperature( 8.3, 11.2, 10.3529 ),
|
||||
/* 30.05 */ Temperature( 4.2, 20.8, 12.6218 ),
|
||||
/* 31.05 */ Temperature( 9.2, 23.6, 15.1073 ),
|
||||
|
||||
/* 01.06 */ Temperature( 10.8, 24.4, 16.3205 ),
|
||||
/* 02.06 */ Temperature( 13, 26.5, 18.9649 ),
|
||||
/* 03.06 */ Temperature( 14, 25.1, 18.5398 ),
|
||||
/* 04.06 */ Temperature( 13, 28, 20.2139 ),
|
||||
/* 05.06 */ Temperature( 14, 28.8, 20.438 ),
|
||||
/* 06.06 */ Temperature( 14, 30.4, 21.7821 ),
|
||||
/* 07.06 */ Temperature( 17, 34.8, 25.3087 ),
|
||||
/* 08.06 */ Temperature( 17.9, 35.7, 25.7872 ),
|
||||
/* 09.06 */ Temperature( 17.8, 31.6, 22.0788 ),
|
||||
/* 10.06 */ Temperature( 15.5, 33.4, 22.4458 ),
|
||||
/* 11.06 */ Temperature( 16.6, 28.3, 19.8797 ),
|
||||
/* 12.06 */ Temperature( 14, 27.3, 20.2566 ),
|
||||
/* 13.06 */ Temperature( 13.2, 28.2, 19.4233 ),
|
||||
/* 14.06 */ Temperature( 12.7, 30, 20.1427 ),
|
||||
/* 15.06 */ Temperature( 15.2, 22.6, 18.5917 ),
|
||||
/* 16.06 */ Temperature( 13.2, 24, 17.7014 ),
|
||||
/* 17.06 */ Temperature( 11.7, 27.9, 19.8229 ),
|
||||
/* 18.06 */ Temperature( 15.9, 27.2, 20.3358 ),
|
||||
/* 19.06 */ Temperature( 12.6, 33.7, 22.2427 ),
|
||||
/* 20.06 */ Temperature( 15.7, 30.8, 23.7507 ),
|
||||
/* 21.06 */ Temperature( 14.8, 22.6, 18.2538 ),
|
||||
/* 22.06 */ Temperature( 12.4, 21.3, 15.9969 ),
|
||||
/* 23.06 */ Temperature( 12.6, 21.6, 15.8149 ),
|
||||
/* 24.06 */ Temperature( 13, 26, 18.4176 ),
|
||||
/* 25.06 */ Temperature( 12.9, 24.4, 17.1299 ),
|
||||
/* 26.06 */ Temperature( 10.8, 18.8, 13.2913 ),
|
||||
/* 27.06 */ Temperature( 9.9, 18.8, 13.5465 ),
|
||||
/* 28.06 */ Temperature( 12, 19.8, 14.8434 ),
|
||||
/* 29.06 */ Temperature( 12, 19, 15.155 ),
|
||||
/* 30.06 */ Temperature( 12.4, 22.4, 17.1354 ),
|
||||
|
||||
/* 01.07 */ Temperature( 12.1, 24.9, 19.1639 ),
|
||||
/* 02.07 */ Temperature( 15.7, 24.3, 18.4554 ),
|
||||
/* 03.07 */ Temperature( 12.7, 17.2, 14.6564 ),
|
||||
/* 04.07 */ Temperature( 11.2, 19, 13.9529 ),
|
||||
/* 05.07 */ Temperature( 11.5, 19, 14.6422 ),
|
||||
/* 06.07 */ Temperature( 12.4, 22, 16.6146 ),
|
||||
/* 07.07 */ Temperature( 11.6, 24, 17.666 ),
|
||||
/* 08.07 */ Temperature( 9, 28, 19.1351 ),
|
||||
/* 09.07 */ Temperature( 11.3, 21.5, 16.5271 ),
|
||||
/* 10.07 */ Temperature( 11.3, 20.2, 14.2326 ),
|
||||
/* 11.07 */ Temperature( 10.2, 19.2, 14.0649 ),
|
||||
/* 12.07 */ Temperature( 13.2, 23.1, 16.6346 ),
|
||||
/* 13.07 */ Temperature( 15, 27, 19.6844 ),
|
||||
/* 14.07 */ Temperature( 13.4, 32.4, 23.845 ),
|
||||
/* 15.07 */ Temperature( 15, 38.2, 26.8559 ),
|
||||
/* 16.07 */ Temperature( 16.1, 36.5, 26.4483 ),
|
||||
/* 17.07 */ Temperature( 19.7, 30.5, 24.189 ),
|
||||
/* 18.07 */ Temperature( 14.2, 29.3, 22.1363 ),
|
||||
/* 19.07 */ Temperature( 16.4, 25.9, 19.0819 ),
|
||||
/* 20.07 */ Temperature( 16.2, 30.8, 22.151 ),
|
||||
/* 21.07 */ Temperature( 14, 24.3, 18.6573 ),
|
||||
/* 22.07 */ Temperature( 13.2, 24.5, 18.3301 ),
|
||||
/* 23.07 */ Temperature( 10.6, 23.4, 16.6903 ),
|
||||
/* 24.07 */ Temperature( 13.2, 20.8, 16.2743 ),
|
||||
/* 25.07 */ Temperature( 12.2, 25.8, 18.8267 ),
|
||||
/* 26.07 */ Temperature( 11.9, 28.9, 20.5522 ),
|
||||
/* 27.07 */ Temperature( 17.6, 25.8, 21.5691 ),
|
||||
/* 28.07 */ Temperature( 16.6, 24.6, 19.2295 ),
|
||||
/* 29.07 */ Temperature( 13, 19, 15.9021 ),
|
||||
/* 30.07 */ Temperature( 9.6, 19.7, 13.875 ),
|
||||
/* 31.07 */ Temperature( 8, 22, 14.5284 ),
|
||||
|
||||
/* 01.08 */ Temperature( 7.6, 27.5, 17.5684 ),
|
||||
/* 02.08 */ Temperature( 9.2, 22.2, 16.1035 ),
|
||||
/* 03.08 */ Temperature( 12.7, 25.3, 18.2958 ),
|
||||
/* 04.08 */ Temperature( 8.6, 31.3, 19.7941 ),
|
||||
/* 05.08 */ Temperature( 10.3, 32.7, 21.492 ),
|
||||
/* 06.08 */ Temperature( 10, 33.4, 22.4431 ),
|
||||
/* 07.08 */ Temperature( 16.8, 22.6, 19.5583 ),
|
||||
/* 08.08 */ Temperature( 13.5, 16.7, 15.0264 ),
|
||||
/* 09.08 */ Temperature( 13.2, 18.8, 15.6003 ),
|
||||
/* 10.08 */ Temperature( 14.6, 27.9, 18.8292 ),
|
||||
/* 11.08 */ Temperature( 16.3, 26.4, 20.3837 ),
|
||||
/* 12.08 */ Temperature( 12.1, 28.7, 19.9892 ),
|
||||
/* 13.08 */ Temperature( 15, 27.4, 19.7542 ),
|
||||
/* 14.08 */ Temperature( 11.3, 28.3, 20.5656 ),
|
||||
/* 15.08 */ Temperature( 18.6, 28.4, 23.1215 ),
|
||||
/* 16.08 */ Temperature( 16, 23.6, 19.491 ),
|
||||
/* 17.08 */ Temperature( 12.6, 22, 17.0437 ),
|
||||
/* 18.08 */ Temperature( 8.5, 25.7, 16.5589 ),
|
||||
/* 19.08 */ Temperature( 13.4, 25.8, 18.0543 ),
|
||||
/* 20.08 */ Temperature( 10.9, 21.5, 16.1306 ),
|
||||
/* 21.08 */ Temperature( 10.6, 19.2, 14.6177 ),
|
||||
/* 22.08 */ Temperature( 14, 24.6, 17.3841 ),
|
||||
/* 23.08 */ Temperature( 13.8, 30.4, 20.6125 ),
|
||||
/* 24.08 */ Temperature( 12.3, 30.3, 20.7622 ),
|
||||
/* 25.08 */ Temperature( 12.8, 30.2, 21.6736 ),
|
||||
/* 26.08 */ Temperature( 15, 29.3, 21.266 ),
|
||||
/* 27.08 */ Temperature( 12.9, 25.9, 18.791 ),
|
||||
/* 28.08 */ Temperature( 9.3, 24.6, 16.2833 ),
|
||||
/* 29.08 */ Temperature( 10.8, 25, 16.8459 ),
|
||||
/* 30.08 */ Temperature( 8.2, 24.4, 15.9267 ),
|
||||
/* 31.08 */ Temperature( 14.1, 20.5, 16.6128 ),
|
||||
|
||||
/* 01.09 */ Temperature( 13.4, 21.9, 16.2205 ),
|
||||
/* 02.09 */ Temperature( 12, 20.7, 16.0882 ),
|
||||
/* 03.09 */ Temperature( 10.8, 21.3, 14.7913 ),
|
||||
/* 04.09 */ Temperature( 7.8, 18.2, 12.2747 ),
|
||||
/* 05.09 */ Temperature( 8.1, 22.2, 12.9406 ),
|
||||
/* 06.09 */ Temperature( 10, 23.8, 13.8785 ),
|
||||
/* 07.09 */ Temperature( 10.7, 21.2, 15.4823 ),
|
||||
/* 08.09 */ Temperature( 12.4, 21, 15.8194 ),
|
||||
/* 09.09 */ Temperature( 12.7, 16.9, 14.7212 ),
|
||||
/* 10.09 */ Temperature( 10.3, 17.7, 12.9271 ),
|
||||
/* 11.09 */ Temperature( 10.6, 20.8, 14.4788 ),
|
||||
/* 12.09 */ Temperature( 10.8, 21.9, 15.0184 ),
|
||||
/* 13.09 */ Temperature( 6.9, 24.6, 14.5222 ),
|
||||
/* 14.09 */ Temperature( 8.1, 24, 15.6583 ),
|
||||
/* 15.09 */ Temperature( 8.8, 22.8, 15.941 ),
|
||||
/* 16.09 */ Temperature( 3.1, 24.5, 14.1486 ),
|
||||
/* 17.09 */ Temperature( 12.4, 21.2, 16.0497 ),
|
||||
/* 18.09 */ Temperature( 7.8, 16.1, 12.024 ),
|
||||
/* 19.09 */ Temperature( 5.3, 18.1, 10.3003 ),
|
||||
/* 20.09 */ Temperature( 6.4, 20.3, 12.3177 ),
|
||||
/* 21.09 */ Temperature( 6, 23.8, 13.6247 ),
|
||||
/* 22.09 */ Temperature( 5.7, 27, 14.6847 ),
|
||||
/* 23.09 */ Temperature( 7.8, 28, 16.6238 ),
|
||||
/* 24.09 */ Temperature( 9.6, 24.9, 16.7191 ),
|
||||
/* 25.09 */ Temperature( 8.4, 17.6, 12.636 ),
|
||||
/* 26.09 */ Temperature( 4.3, 18.9, 10.0809 ),
|
||||
/* 27.09 */ Temperature( 9.4, 11.2, 10.3344 ),
|
||||
/* 28.09 */ Temperature( 7.7, 12.6, 10.5337 ),
|
||||
/* 29.09 */ Temperature( 9.8, 15.3, 11.9306 ),
|
||||
/* 30.09 */ Temperature( 9.6, 21.1, 13.6635 ),
|
||||
|
||||
/* 01.10 */ Temperature( 8.9, 24.5, 14.8163 ),
|
||||
/* 02.10 */ Temperature( 13.5, 20.2, 16.1628 ),
|
||||
/* 03.10 */ Temperature( 12.5, 18, 15.4691 ),
|
||||
/* 04.10 */ Temperature( 13.8, 25, 17.2073 ),
|
||||
/* 05.10 */ Temperature( 9.1, 23.2, 14.6181 ),
|
||||
/* 06.10 */ Temperature( 6.4, 23.4, 12.8625 ),
|
||||
/* 07.10 */ Temperature( 4.6, 22.1, 11.0052 ),
|
||||
/* 08.10 */ Temperature( 2, 22.2, 10.1677 ),
|
||||
/* 09.10 */ Temperature( 7.8, 21.6, 12.2139 ),
|
||||
/* 10.10 */ Temperature( 7.1, 22.7, 13.0115 ),
|
||||
/* 11.10 */ Temperature( 6.1, 21.2, 11.4333 ),
|
||||
/* 12.10 */ Temperature( 4.3, 15.2, 10.6104 ),
|
||||
/* 13.10 */ Temperature( 5.8, 23, 12.8875 ),
|
||||
/* 14.10 */ Temperature( 1, 23, 9.72986 ),
|
||||
/* 15.10 */ Temperature( 1, 19.3, 9.33021 ),
|
||||
/* 16.10 */ Temperature( 8.5, 20.4, 13.2639 ),
|
||||
/* 17.10 */ Temperature( 6.8, 17.3, 11.8174 ),
|
||||
/* 18.10 */ Temperature( 5.2, 15.6, 9.06076 ),
|
||||
/* 19.10 */ Temperature( 2.7, 13.5, 7.1309 ),
|
||||
/* 20.10 */ Temperature( -0.2, 15.8, 6.01667 ),
|
||||
/* 21.10 */ Temperature( 2.6, 6.1, 4.9441 ),
|
||||
/* 22.10 */ Temperature( -0.8, 13.2, 4.50694 ),
|
||||
/* 23.10 */ Temperature( -0.4, 13.3, 4.71007 ),
|
||||
/* 24.10 */ Temperature( 2.9, 8.1, 5.96979 ),
|
||||
/* 25.10 */ Temperature( 6.3, 10.5, 8.01206 ),
|
||||
/* 26.10 */ Temperature( 7, 10.8, 8.14965 ),
|
||||
/* 27.10 */ Temperature( 6.6, 9.7, 7.7809 ),
|
||||
/* 28.10 */ Temperature( 1.7, 10.8, 6.95728 ),
|
||||
/* 29.10 */ Temperature( 2.2, 9.9, 6.62917 ),
|
||||
/* 30.10 */ Temperature( 5.8, 15, 8.76181 ),
|
||||
/* 31.10 */ Temperature( 0.7, 15, 6.01528 ),
|
||||
|
||||
/* 01.11 */ Temperature( -0.2, 9.7, 3.75842 ),
|
||||
/* 02.11 */ Temperature( 6.4, 9.6, 8.00138 ),
|
||||
/* 03.11 */ Temperature( 8.7, 13.1, 10.5676 ),
|
||||
/* 04.11 */ Temperature( 8, 11.8, 9.54306 ),
|
||||
/* 05.11 */ Temperature( 5.8, 15.9, 8.52345 ),
|
||||
/* 06.11 */ Temperature( 5.5, 10.8, 7.16493 ),
|
||||
/* 07.11 */ Temperature( 5.5, 8.9, 7.30172 ),
|
||||
/* 08.11 */ Temperature( 7, 11.7, 8.96701 ),
|
||||
/* 09.11 */ Temperature( 2.5, 8.4, 4.86528 ),
|
||||
/* 10.11 */ Temperature( 3.7, 9, 5.20828 ),
|
||||
/* 11.11 */ Temperature( 2.8, 10.6, 6.80756 ),
|
||||
/* 12.11 */ Temperature( 2.7, 9.5, 5.07647 ),
|
||||
/* 13.11 */ Temperature( 0.1, 5.4, 3.3945 ),
|
||||
/* 14.11 */ Temperature( -0.7, 7.9, 2.02234 ),
|
||||
/* 15.11 */ Temperature( -1.8, 6.5, 1.07778 ),
|
||||
/* 16.11 */ Temperature( -4.4, 5.1, -0.693772 ),
|
||||
/* 17.11 */ Temperature( -0.3, 3.4, 1.33229 ),
|
||||
/* 18.11 */ Temperature( -0.4, 4.3, 2.4622 ),
|
||||
/* 19.11 */ Temperature( 1.8, 3.6, 2.78282 ),
|
||||
/* 20.11 */ Temperature( 1.3, 5.6, 2.95979 ),
|
||||
/* 21.11 */ Temperature( 1.6, 5.7, 3.62284 ),
|
||||
/* 22.11 */ Temperature( 3.1, 7.3, 5.60277 ),
|
||||
/* 23.11 */ Temperature( 4.2, 7.7, 6.28166 ),
|
||||
/* 24.11 */ Temperature( -0.5, 11.5, 3.25931 ),
|
||||
/* 25.11 */ Temperature( -1, 8.8, 2.86505 ),
|
||||
/* 26.11 */ Temperature( 1.2, 6.8, 3.09414 ),
|
||||
/* 27.11 */ Temperature( -0.8, 7.5, 3.17805 ),
|
||||
/* 28.11 */ Temperature( -2.8, 3.1, -0.920139 ),
|
||||
/* 29.11 */ Temperature( -2.6, 1.7, -0.491696 ),
|
||||
/* 30.11 */ Temperature( 1.3, 6.5, 3.85 ),
|
||||
|
||||
/* 01.12 */ Temperature( 4.1, 8.7, 5.88924 ),
|
||||
/* 02.12 */ Temperature( 4.8, 9, 6.81667 ),
|
||||
/* 03.12 */ Temperature( 3.5, 8.5, 6.23633 ),
|
||||
/* 04.12 */ Temperature( 2.7, 6.6, 4.63045 ),
|
||||
/* 05.12 */ Temperature( 4.3, 8.6, 6.85993 ),
|
||||
/* 06.12 */ Temperature( 5.5, 9.3, 7.79201 ),
|
||||
/* 07.12 */ Temperature( 3.1, 13.4, 8.79444 ),
|
||||
/* 08.12 */ Temperature( 2.6, 6.3, 4.67093 ),
|
||||
/* 09.12 */ Temperature( 3, 10.4, 5.75724 ),
|
||||
/* 10.12 */ Temperature( 4.1, 6.8, 5.31834 ),
|
||||
/* 11.12 */ Temperature( 4.1, 7.4, 5.28993 ),
|
||||
/* 12.12 */ Temperature( 3.9, 6.4, 4.64479 ),
|
||||
/* 13.12 */ Temperature( 1.7, 9.1, 4.15363 ),
|
||||
/* 14.12 */ Temperature( 0.4, 1.8, 0.934602 ),
|
||||
/* 15.12 */ Temperature( -4.5, 2.1, -1.17292 ),
|
||||
/* 16.12 */ Temperature( -5, 4.8, -2.17431 ),
|
||||
/* 17.12 */ Temperature( -5.6, 6.1, -1.35448 ),
|
||||
/* 18.12 */ Temperature( -4.9, 6.4, -1.25502 ),
|
||||
/* 19.12 */ Temperature( -4.4, 6.6, -1.02396 ),
|
||||
/* 20.12 */ Temperature( -7.3, 5.2, -2.63854 ),
|
||||
/* 21.12 */ Temperature( -8.5, 5.7, -3.58333 ),
|
||||
/* 22.12 */ Temperature( -7.9, -5.3, -6.13438 ),
|
||||
/* 23.12 */ Temperature( -6.1, -4.4, -5.23472 ),
|
||||
/* 24.12 */ Temperature( -4.6, -3.3, -3.84291 ),
|
||||
/* 25.12 */ Temperature( -4.9, -2.8, -3.9066 ),
|
||||
/* 26.12 */ Temperature( -4.7, -1.9, -3.10379 ),
|
||||
/* 27.12 */ Temperature( -1.9, -0.2, -0.679791 ),
|
||||
/* 28.12 */ Temperature( -1.8, 0.5, -0.521875 ),
|
||||
/* 29.12 */ Temperature( -2.2, 2.3, -0.430796 ),
|
||||
/* 30.12 */ Temperature( 0.9, 5.2, 2.83437 ),
|
||||
/* 31.12 */ Temperature( -1, 8.3, 2.27093 )
|
||||
};
|
||||
28
qwt/examples/friedberg/friedberg2007.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef _FRIEDBERG_2007_H_
|
||||
#define _FRIEDBERG_2007_H_
|
||||
|
||||
class Temperature
|
||||
{
|
||||
public:
|
||||
Temperature():
|
||||
minValue( 0.0 ),
|
||||
maxValue( 0.0 ),
|
||||
averageValue( 0.0 )
|
||||
{
|
||||
}
|
||||
|
||||
Temperature( double min, double max, double average ):
|
||||
minValue( min ),
|
||||
maxValue( max ),
|
||||
averageValue( average )
|
||||
{
|
||||
}
|
||||
|
||||
double minValue;
|
||||
double maxValue;
|
||||
double averageValue;
|
||||
};
|
||||
|
||||
extern Temperature friedberg2007[];
|
||||
|
||||
#endif
|
||||
57
qwt/examples/friedberg/main.cpp
Normal file
@@ -0,0 +1,57 @@
|
||||
#include <qapplication.h>
|
||||
#include <qmainwindow.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtextstream.h>
|
||||
#include <qtoolbar.h>
|
||||
#include <qtoolbutton.h>
|
||||
#include "plot.h"
|
||||
|
||||
class MainWindow: public QMainWindow
|
||||
{
|
||||
public:
|
||||
MainWindow( QWidget * = NULL );
|
||||
|
||||
private:
|
||||
Plot *d_plot;
|
||||
};
|
||||
|
||||
MainWindow::MainWindow( QWidget *parent ):
|
||||
QMainWindow( parent )
|
||||
{
|
||||
d_plot = new Plot( this );
|
||||
setCentralWidget( d_plot );
|
||||
|
||||
QToolBar *toolBar = new QToolBar( this );
|
||||
|
||||
QComboBox *typeBox = new QComboBox( toolBar );
|
||||
typeBox->addItem( "Bars" );
|
||||
typeBox->addItem( "Tube" );
|
||||
typeBox->setCurrentIndex( 1 );
|
||||
typeBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
||||
|
||||
QToolButton *btnExport = new QToolButton( toolBar );
|
||||
btnExport->setText( "Export" );
|
||||
btnExport->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
|
||||
connect( btnExport, SIGNAL( clicked() ), d_plot, SLOT( exportPlot() ) );
|
||||
|
||||
toolBar->addWidget( typeBox );
|
||||
toolBar->addWidget( btnExport );
|
||||
addToolBar( toolBar );
|
||||
|
||||
d_plot->setMode( typeBox->currentIndex() );
|
||||
connect( typeBox, SIGNAL( currentIndexChanged( int ) ),
|
||||
d_plot, SLOT( setMode( int ) ) );
|
||||
}
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
QApplication a( argc, argv );
|
||||
|
||||
MainWindow w;
|
||||
w.setObjectName( "MainWindow" );
|
||||
w.resize( 600, 400 );
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
252
qwt/examples/friedberg/plot.cpp
Normal file
@@ -0,0 +1,252 @@
|
||||
#include "plot.h"
|
||||
#include "friedberg2007.h"
|
||||
#include <qwt_plot_zoomer.h>
|
||||
#include <qwt_plot_panner.h>
|
||||
#include <qwt_plot_marker.h>
|
||||
#include <qwt_plot_grid.h>
|
||||
#include <qwt_plot_curve.h>
|
||||
#include <qwt_plot_intervalcurve.h>
|
||||
#include <qwt_legend.h>
|
||||
#include <qwt_interval_symbol.h>
|
||||
#include <qwt_symbol.h>
|
||||
#include <qwt_series_data.h>
|
||||
#include <qwt_text.h>
|
||||
#include <qwt_scale_draw.h>
|
||||
#include <qwt_plot_renderer.h>
|
||||
#include <qdatetime.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qimagewriter.h>
|
||||
#include <qprintdialog.h>
|
||||
#include <qfileinfo.h>
|
||||
|
||||
class Grid: public QwtPlotGrid
|
||||
{
|
||||
public:
|
||||
Grid()
|
||||
{
|
||||
enableXMin( true );
|
||||
setMajPen( QPen( Qt::white, 0, Qt::DotLine ) );
|
||||
setMinPen( QPen( Qt::gray, 0 , Qt::DotLine ) );
|
||||
}
|
||||
|
||||
virtual void updateScaleDiv( const QwtScaleDiv &xMap,
|
||||
const QwtScaleDiv &yMap )
|
||||
{
|
||||
QList<double> ticks[QwtScaleDiv::NTickTypes];
|
||||
|
||||
ticks[QwtScaleDiv::MajorTick] =
|
||||
xMap.ticks( QwtScaleDiv::MediumTick );
|
||||
ticks[QwtScaleDiv::MinorTick] =
|
||||
xMap.ticks( QwtScaleDiv::MinorTick );
|
||||
|
||||
QwtPlotGrid::updateScaleDiv(
|
||||
QwtScaleDiv( xMap.lowerBound(), xMap.upperBound(), ticks ),
|
||||
yMap );
|
||||
}
|
||||
};
|
||||
|
||||
class YearScaleDraw: public QwtScaleDraw
|
||||
{
|
||||
public:
|
||||
YearScaleDraw()
|
||||
{
|
||||
setTickLength( QwtScaleDiv::MajorTick, 0 );
|
||||
setTickLength( QwtScaleDiv::MinorTick, 0 );
|
||||
setTickLength( QwtScaleDiv::MediumTick, 6 );
|
||||
|
||||
setLabelRotation( -60.0 );
|
||||
setLabelAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||
|
||||
setSpacing( 15 );
|
||||
}
|
||||
|
||||
virtual QwtText label( double value ) const
|
||||
{
|
||||
return QDate::longMonthName( int( value / 30 ) + 1 );
|
||||
}
|
||||
};
|
||||
|
||||
Plot::Plot( QWidget *parent ):
|
||||
QwtPlot( parent )
|
||||
{
|
||||
setObjectName( "FriedbergPlot" );
|
||||
setTitle( "Temperature of Friedberg/Germany" );
|
||||
|
||||
setAxisTitle( QwtPlot::xBottom, "2007" );
|
||||
setAxisScaleDiv( QwtPlot::xBottom, yearScaleDiv() );
|
||||
setAxisScaleDraw( QwtPlot::xBottom, new YearScaleDraw() );
|
||||
|
||||
setAxisTitle( QwtPlot::yLeft,
|
||||
QString( "Temperature [%1C]" ).arg( QChar( 0x00B0 ) ) );
|
||||
|
||||
// grid
|
||||
QwtPlotGrid *grid = new Grid;
|
||||
grid->attach( this );
|
||||
|
||||
insertLegend( new QwtLegend(), QwtPlot::RightLegend );
|
||||
|
||||
const int numDays = 365;
|
||||
QVector<QPointF> averageData( numDays );
|
||||
QVector<QwtIntervalSample> rangeData( numDays );
|
||||
|
||||
for ( int i = 0; i < numDays; i++ )
|
||||
{
|
||||
const Temperature &t = friedberg2007[i];
|
||||
averageData[i] = QPointF( double( i ), t.averageValue );
|
||||
rangeData[i] = QwtIntervalSample( double( i ),
|
||||
QwtInterval( t.minValue, t.maxValue ) );
|
||||
}
|
||||
|
||||
insertCurve( "Average", averageData, Qt::black );
|
||||
insertErrorBars( "Range", rangeData, Qt::blue );
|
||||
|
||||
// LeftButton for the zooming
|
||||
// MidButton for the panning
|
||||
// RightButton: zoom out by 1
|
||||
// Ctrl+RighButton: zoom out to full size
|
||||
|
||||
QwtPlotZoomer* zoomer = new QwtPlotZoomer( canvas() );
|
||||
zoomer->setRubberBandPen( QColor( Qt::black ) );
|
||||
zoomer->setTrackerPen( QColor( Qt::black ) );
|
||||
zoomer->setMousePattern( QwtEventPattern::MouseSelect2,
|
||||
Qt::RightButton, Qt::ControlModifier );
|
||||
zoomer->setMousePattern( QwtEventPattern::MouseSelect3,
|
||||
Qt::RightButton );
|
||||
|
||||
QwtPlotPanner *panner = new QwtPlotPanner( canvas() );
|
||||
panner->setMouseButton( Qt::MidButton );
|
||||
|
||||
canvas()->setPalette( Qt::darkGray );
|
||||
canvas()->setBorderRadius( 10 );
|
||||
}
|
||||
|
||||
QwtScaleDiv Plot::yearScaleDiv() const
|
||||
{
|
||||
const int days[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
|
||||
QList<double> ticks[QwtScaleDiv::NTickTypes];
|
||||
|
||||
QList<double> &mediumTicks = ticks[QwtScaleDiv::MediumTick];
|
||||
mediumTicks += 0.0;
|
||||
for ( uint i = 0; i < sizeof( days ) / sizeof( days[0] ); i++ )
|
||||
mediumTicks += mediumTicks.last() + days[i];
|
||||
|
||||
QList<double> &minorTicks = ticks[QwtScaleDiv::MinorTick];
|
||||
for ( int i = 1; i <= 365; i += 7 )
|
||||
minorTicks += i;
|
||||
|
||||
QList<double> &majorTicks = ticks[QwtScaleDiv::MajorTick];
|
||||
for ( int i = 0; i < 12; i++ )
|
||||
majorTicks += i * 30 + 15;
|
||||
|
||||
QwtScaleDiv scaleDiv( mediumTicks.first(), mediumTicks.last() + 1, ticks );
|
||||
return scaleDiv;
|
||||
}
|
||||
|
||||
void Plot::insertCurve( const QString& title,
|
||||
const QVector<QPointF>& samples, const QColor &color )
|
||||
{
|
||||
d_curve = new QwtPlotCurve( title );
|
||||
d_curve->setRenderHint( QwtPlotItem::RenderAntialiased );
|
||||
d_curve->setStyle( QwtPlotCurve::NoCurve );
|
||||
d_curve->setLegendAttribute( QwtPlotCurve::LegendShowSymbol );
|
||||
|
||||
QwtSymbol *symbol = new QwtSymbol( QwtSymbol::XCross );
|
||||
symbol->setSize( 4 );
|
||||
symbol->setPen( QPen( color ) );
|
||||
d_curve->setSymbol( symbol );
|
||||
|
||||
d_curve->setSamples( samples );
|
||||
d_curve->attach( this );
|
||||
}
|
||||
|
||||
void Plot::insertErrorBars(
|
||||
const QString &title,
|
||||
const QVector<QwtIntervalSample>& samples,
|
||||
const QColor &color )
|
||||
{
|
||||
d_intervalCurve = new QwtPlotIntervalCurve( title );
|
||||
d_intervalCurve->setRenderHint( QwtPlotItem::RenderAntialiased );
|
||||
d_intervalCurve->setPen( QPen( Qt::white ) );
|
||||
|
||||
QColor bg( color );
|
||||
bg.setAlpha( 150 );
|
||||
d_intervalCurve->setBrush( QBrush( bg ) );
|
||||
d_intervalCurve->setStyle( QwtPlotIntervalCurve::Tube );
|
||||
|
||||
d_intervalCurve->setSamples( samples );
|
||||
d_intervalCurve->attach( this );
|
||||
}
|
||||
|
||||
void Plot::setMode( int style )
|
||||
{
|
||||
if ( style == Tube )
|
||||
{
|
||||
d_intervalCurve->setStyle( QwtPlotIntervalCurve::Tube );
|
||||
d_intervalCurve->setSymbol( NULL );
|
||||
d_intervalCurve->setRenderHint( QwtPlotItem::RenderAntialiased, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
d_intervalCurve->setStyle( QwtPlotIntervalCurve::NoCurve );
|
||||
|
||||
QColor c( d_intervalCurve->brush().color().rgb() ); // skip alpha
|
||||
|
||||
QwtIntervalSymbol *errorBar =
|
||||
new QwtIntervalSymbol( QwtIntervalSymbol::Bar );
|
||||
errorBar->setWidth( 8 ); // should be something even
|
||||
errorBar->setPen( c );
|
||||
|
||||
d_intervalCurve->setSymbol( errorBar );
|
||||
d_intervalCurve->setRenderHint( QwtPlotItem::RenderAntialiased, false );
|
||||
}
|
||||
|
||||
replot();
|
||||
}
|
||||
|
||||
void Plot::exportPlot()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
QString fileName = "friedberg.pdf";
|
||||
#else
|
||||
QString fileName = "friedberg.png";
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_FILEDIALOG
|
||||
const QList<QByteArray> imageFormats =
|
||||
QImageWriter::supportedImageFormats();
|
||||
|
||||
QStringList filter;
|
||||
filter += "PDF Documents (*.pdf)";
|
||||
#ifndef QWT_NO_SVG
|
||||
filter += "SVG Documents (*.svg)";
|
||||
#endif
|
||||
filter += "Postscript Documents (*.ps)";
|
||||
|
||||
if ( imageFormats.size() > 0 )
|
||||
{
|
||||
QString imageFilter("Images (");
|
||||
for ( int i = 0; i < imageFormats.size(); i++ )
|
||||
{
|
||||
if ( i > 0 )
|
||||
imageFilter += " ";
|
||||
imageFilter += "*.";
|
||||
imageFilter += imageFormats[i];
|
||||
}
|
||||
imageFilter += ")";
|
||||
|
||||
filter += imageFilter;
|
||||
}
|
||||
|
||||
fileName = QFileDialog::getSaveFileName(
|
||||
this, "Export File Name", fileName,
|
||||
filter.join(";;"), NULL, QFileDialog::DontConfirmOverwrite);
|
||||
#endif
|
||||
if ( !fileName.isEmpty() )
|
||||
{
|
||||
QwtPlotRenderer renderer;
|
||||
renderer.setDiscardFlag(QwtPlotRenderer::DiscardBackground, false);
|
||||
|
||||
renderer.renderDocument(this, fileName, QSizeF(300, 200), 85);
|
||||
}
|
||||
}
|
||||
43
qwt/examples/friedberg/plot.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef _PLOT_H_
|
||||
#define _PLOT_H_
|
||||
|
||||
#include <qwt_plot.h>
|
||||
#include <qwt_scale_div.h>
|
||||
#include <qwt_series_data.h>
|
||||
|
||||
class QwtPlotCurve;
|
||||
class QwtPlotIntervalCurve;
|
||||
|
||||
class Plot: public QwtPlot
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Mode
|
||||
{
|
||||
Bars,
|
||||
Tube
|
||||
};
|
||||
|
||||
Plot( QWidget * = NULL );
|
||||
|
||||
public Q_SLOTS:
|
||||
void setMode( int );
|
||||
void exportPlot();
|
||||
|
||||
private:
|
||||
void insertCurve( const QString &title,
|
||||
const QVector<QPointF> &, const QColor & );
|
||||
|
||||
void insertErrorBars( const QString &title,
|
||||
const QVector<QwtIntervalSample> &,
|
||||
const QColor &color );
|
||||
|
||||
|
||||
QwtScaleDiv yearScaleDiv() const;
|
||||
|
||||
QwtPlotIntervalCurve *d_intervalCurve;
|
||||
QwtPlotCurve *d_curve;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,283 +0,0 @@
|
||||
#include <qstring.h>
|
||||
#include <qpainter.h>
|
||||
#include <qwt_plot.h>
|
||||
#include <qwt_interval_data.h>
|
||||
#include <qwt_painter.h>
|
||||
#include <qwt_scale_map.h>
|
||||
#include "histogram_item.h"
|
||||
|
||||
class HistogramItem::PrivateData
|
||||
{
|
||||
public:
|
||||
int attributes;
|
||||
QwtIntervalData data;
|
||||
QColor color;
|
||||
double reference;
|
||||
};
|
||||
|
||||
HistogramItem::HistogramItem(const QwtText &title):
|
||||
QwtPlotItem(title)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
HistogramItem::HistogramItem(const QString &title):
|
||||
QwtPlotItem(QwtText(title))
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
HistogramItem::~HistogramItem()
|
||||
{
|
||||
delete d_data;
|
||||
}
|
||||
|
||||
void HistogramItem::init()
|
||||
{
|
||||
d_data = new PrivateData();
|
||||
d_data->reference = 0.0;
|
||||
d_data->attributes = HistogramItem::Auto;
|
||||
|
||||
setItemAttribute(QwtPlotItem::AutoScale, true);
|
||||
setItemAttribute(QwtPlotItem::Legend, true);
|
||||
|
||||
setZ(20.0);
|
||||
}
|
||||
|
||||
void HistogramItem::setBaseline(double reference)
|
||||
{
|
||||
if ( d_data->reference != reference )
|
||||
{
|
||||
d_data->reference = reference;
|
||||
itemChanged();
|
||||
}
|
||||
}
|
||||
|
||||
double HistogramItem::baseline() const
|
||||
{
|
||||
return d_data->reference;
|
||||
}
|
||||
|
||||
void HistogramItem::setData(const QwtIntervalData &data)
|
||||
{
|
||||
d_data->data = data;
|
||||
itemChanged();
|
||||
}
|
||||
|
||||
const QwtIntervalData &HistogramItem::data() const
|
||||
{
|
||||
return d_data->data;
|
||||
}
|
||||
|
||||
void HistogramItem::setColor(const QColor &color)
|
||||
{
|
||||
if ( d_data->color != color )
|
||||
{
|
||||
d_data->color = color;
|
||||
itemChanged();
|
||||
}
|
||||
}
|
||||
|
||||
QColor HistogramItem::color() const
|
||||
{
|
||||
return d_data->color;
|
||||
}
|
||||
|
||||
QwtDoubleRect HistogramItem::boundingRect() const
|
||||
{
|
||||
QwtDoubleRect rect = d_data->data.boundingRect();
|
||||
if ( !rect.isValid() )
|
||||
return rect;
|
||||
|
||||
if ( d_data->attributes & Xfy )
|
||||
{
|
||||
rect = QwtDoubleRect( rect.y(), rect.x(),
|
||||
rect.height(), rect.width() );
|
||||
|
||||
if ( rect.left() > d_data->reference )
|
||||
rect.setLeft( d_data->reference );
|
||||
else if ( rect.right() < d_data->reference )
|
||||
rect.setRight( d_data->reference );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( rect.bottom() < d_data->reference )
|
||||
rect.setBottom( d_data->reference );
|
||||
else if ( rect.top() > d_data->reference )
|
||||
rect.setTop( d_data->reference );
|
||||
}
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
|
||||
int HistogramItem::rtti() const
|
||||
{
|
||||
return QwtPlotItem::Rtti_PlotHistogram;
|
||||
}
|
||||
|
||||
void HistogramItem::setHistogramAttribute(HistogramAttribute attribute, bool on)
|
||||
{
|
||||
if ( bool(d_data->attributes & attribute) == on )
|
||||
return;
|
||||
|
||||
if ( on )
|
||||
d_data->attributes |= attribute;
|
||||
else
|
||||
d_data->attributes &= ~attribute;
|
||||
|
||||
itemChanged();
|
||||
}
|
||||
|
||||
bool HistogramItem::testHistogramAttribute(HistogramAttribute attribute) const
|
||||
{
|
||||
return d_data->attributes & attribute;
|
||||
}
|
||||
|
||||
void HistogramItem::draw(QPainter *painter, const QwtScaleMap &xMap,
|
||||
const QwtScaleMap &yMap, const QRect &) const
|
||||
{
|
||||
const QwtIntervalData &iData = d_data->data;
|
||||
|
||||
painter->setPen(QPen(d_data->color));
|
||||
|
||||
const int x0 = xMap.transform(baseline());
|
||||
const int y0 = yMap.transform(baseline());
|
||||
|
||||
for ( int i = 0; i < (int)iData.size(); i++ )
|
||||
{
|
||||
if ( d_data->attributes & HistogramItem::Xfy )
|
||||
{
|
||||
const int x2 = xMap.transform(iData.value(i));
|
||||
if ( x2 == x0 )
|
||||
continue;
|
||||
|
||||
int y1 = yMap.transform( iData.interval(i).minValue());
|
||||
int y2 = yMap.transform( iData.interval(i).maxValue());
|
||||
if ( y1 > y2 )
|
||||
qSwap(y1, y2);
|
||||
|
||||
if ( i < (int)iData.size() - 2 )
|
||||
{
|
||||
const int yy1 = yMap.transform(iData.interval(i+1).minValue());
|
||||
const int yy2 = yMap.transform(iData.interval(i+1).maxValue());
|
||||
|
||||
if ( y2 == qwtMin(yy1, yy2) )
|
||||
{
|
||||
const int xx2 = xMap.transform(
|
||||
iData.interval(i+1).minValue());
|
||||
if ( xx2 != x0 && ( (xx2 < x0 && x2 < x0) ||
|
||||
(xx2 > x0 && x2 > x0) ) )
|
||||
{
|
||||
// One pixel distance between neighboured bars
|
||||
y2++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
drawBar(painter, Qt::Horizontal,
|
||||
QRect(x0, y1, x2 - x0, y2 - y1));
|
||||
}
|
||||
else
|
||||
{
|
||||
const int y2 = yMap.transform(iData.value(i));
|
||||
if ( y2 == y0 )
|
||||
continue;
|
||||
|
||||
int x1 = xMap.transform(iData.interval(i).minValue());
|
||||
int x2 = xMap.transform(iData.interval(i).maxValue());
|
||||
if ( x1 > x2 )
|
||||
qSwap(x1, x2);
|
||||
|
||||
if ( i < (int)iData.size() - 2 )
|
||||
{
|
||||
const int xx1 = xMap.transform(iData.interval(i+1).minValue());
|
||||
const int xx2 = xMap.transform(iData.interval(i+1).maxValue());
|
||||
|
||||
if ( x2 == qwtMin(xx1, xx2) )
|
||||
{
|
||||
const int yy2 = yMap.transform(iData.value(i+1));
|
||||
if ( yy2 != y0 && ( (yy2 < y0 && y2 < y0) ||
|
||||
(yy2 > y0 && y2 > y0) ) )
|
||||
{
|
||||
// One pixel distance between neighboured bars
|
||||
x2--;
|
||||
}
|
||||
}
|
||||
}
|
||||
drawBar(painter, Qt::Vertical,
|
||||
QRect(x1, y0, x2 - x1, y2 - y0) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HistogramItem::drawBar(QPainter *painter,
|
||||
Qt::Orientation, const QRect& rect) const
|
||||
{
|
||||
painter->save();
|
||||
|
||||
const QColor color(painter->pen().color());
|
||||
#if QT_VERSION >= 0x040000
|
||||
const QRect r = rect.normalized();
|
||||
#else
|
||||
const QRect r = rect.normalize();
|
||||
#endif
|
||||
|
||||
const int factor = 125;
|
||||
const QColor light(color.light(factor));
|
||||
const QColor dark(color.dark(factor));
|
||||
|
||||
painter->setBrush(color);
|
||||
painter->setPen(Qt::NoPen);
|
||||
QwtPainter::drawRect(painter, r.x() + 1, r.y() + 1,
|
||||
r.width() - 2, r.height() - 2);
|
||||
painter->setBrush(Qt::NoBrush);
|
||||
|
||||
painter->setPen(QPen(light, 2));
|
||||
#if QT_VERSION >= 0x040000
|
||||
QwtPainter::drawLine(painter,
|
||||
r.left() + 1, r.top() + 2, r.right() + 1, r.top() + 2);
|
||||
#else
|
||||
QwtPainter::drawLine(painter,
|
||||
r.left(), r.top() + 2, r.right() + 1, r.top() + 2);
|
||||
#endif
|
||||
|
||||
painter->setPen(QPen(dark, 2));
|
||||
#if QT_VERSION >= 0x040000
|
||||
QwtPainter::drawLine(painter,
|
||||
r.left() + 1, r.bottom(), r.right() + 1, r.bottom());
|
||||
#else
|
||||
QwtPainter::drawLine(painter,
|
||||
r.left(), r.bottom(), r.right() + 1, r.bottom());
|
||||
#endif
|
||||
|
||||
painter->setPen(QPen(light, 1));
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
QwtPainter::drawLine(painter,
|
||||
r.left(), r.top() + 1, r.left(), r.bottom());
|
||||
QwtPainter::drawLine(painter,
|
||||
r.left() + 1, r.top() + 2, r.left() + 1, r.bottom() - 1);
|
||||
#else
|
||||
QwtPainter::drawLine(painter,
|
||||
r.left(), r.top() + 1, r.left(), r.bottom() + 1);
|
||||
QwtPainter::drawLine(painter,
|
||||
r.left() + 1, r.top() + 2, r.left() + 1, r.bottom());
|
||||
#endif
|
||||
|
||||
painter->setPen(QPen(dark, 1));
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
QwtPainter::drawLine(painter,
|
||||
r.right() + 1, r.top() + 1, r.right() + 1, r.bottom());
|
||||
QwtPainter::drawLine(painter,
|
||||
r.right(), r.top() + 2, r.right(), r.bottom() - 1);
|
||||
#else
|
||||
QwtPainter::drawLine(painter,
|
||||
r.right() + 1, r.top() + 1, r.right() + 1, r.bottom() + 1);
|
||||
QwtPainter::drawLine(painter,
|
||||
r.right(), r.top() + 2, r.right(), r.bottom());
|
||||
#endif
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
|
||||
* Qwt Widget Library
|
||||
* Copyright (C) 1997 Josef Wilgen
|
||||
* Copyright (C) 2002 Uwe Rathmann
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the Qwt License, Version 1.0
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef HISTOGRAM_ITEM_H
|
||||
#define HISTOGRAM_ITEM_H
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <qcolor.h>
|
||||
|
||||
#include "qwt_plot_item.h"
|
||||
|
||||
class QwtIntervalData;
|
||||
class QString;
|
||||
|
||||
class HistogramItem: public QwtPlotItem
|
||||
{
|
||||
public:
|
||||
explicit HistogramItem(const QString &title = QString::null);
|
||||
explicit HistogramItem(const QwtText &title);
|
||||
virtual ~HistogramItem();
|
||||
|
||||
void setData(const QwtIntervalData &data);
|
||||
const QwtIntervalData &data() const;
|
||||
|
||||
void setColor(const QColor &);
|
||||
QColor color() const;
|
||||
|
||||
virtual QwtDoubleRect boundingRect() const;
|
||||
|
||||
virtual int rtti() const;
|
||||
|
||||
virtual void draw(QPainter *, const QwtScaleMap &xMap,
|
||||
const QwtScaleMap &yMap, const QRect &) const;
|
||||
|
||||
void setBaseline(double reference);
|
||||
double baseline() const;
|
||||
|
||||
enum HistogramAttribute
|
||||
{
|
||||
Auto = 0,
|
||||
Xfy = 1
|
||||
};
|
||||
|
||||
void setHistogramAttribute(HistogramAttribute, bool on = true);
|
||||
bool testHistogramAttribute(HistogramAttribute) const;
|
||||
|
||||
protected:
|
||||
virtual void drawBar(QPainter *,
|
||||
Qt::Orientation o, const QRect &) const;
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
||||
class PrivateData;
|
||||
PrivateData *d_data;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,60 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <qapplication.h>
|
||||
#include <qpen.h>
|
||||
#include <qwt_plot.h>
|
||||
#include <qwt_plot_grid.h>
|
||||
#include <qwt_plot_marker.h>
|
||||
#include <qwt_interval_data.h>
|
||||
#include "histogram_item.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
QwtPlot plot;
|
||||
plot.setCanvasBackground(QColor(Qt::white));
|
||||
plot.setTitle("Histogram");
|
||||
|
||||
QwtPlotGrid *grid = new QwtPlotGrid;
|
||||
grid->enableXMin(true);
|
||||
grid->enableYMin(true);
|
||||
grid->setMajPen(QPen(Qt::black, 0, Qt::DotLine));
|
||||
grid->setMinPen(QPen(Qt::gray, 0 , Qt::DotLine));
|
||||
grid->attach(&plot);
|
||||
|
||||
HistogramItem *histogram = new HistogramItem();
|
||||
histogram->setColor(Qt::darkCyan);
|
||||
|
||||
const int numValues = 20;
|
||||
|
||||
QwtArray<QwtDoubleInterval> intervals(numValues);
|
||||
QwtArray<double> values(numValues);
|
||||
|
||||
double pos = 0.0;
|
||||
for ( int i = 0; i < (int)intervals.size(); i++ )
|
||||
{
|
||||
const int width = 5 + rand() % 15;
|
||||
const int value = rand() % 100;
|
||||
|
||||
intervals[i] = QwtDoubleInterval(pos, pos + double(width));
|
||||
values[i] = value;
|
||||
|
||||
pos += width;
|
||||
}
|
||||
|
||||
histogram->setData(QwtIntervalData(intervals, values));
|
||||
histogram->attach(&plot);
|
||||
|
||||
plot.setAxisScale(QwtPlot::yLeft, 0.0, 100.0);
|
||||
plot.setAxisScale(QwtPlot::xBottom, 0.0, pos);
|
||||
plot.replot();
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
a.setMainWidget(&plot);
|
||||
#endif
|
||||
|
||||
plot.resize(600,400);
|
||||
plot.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
#include <qcheckbox.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qsignalmapper.h>
|
||||
#include "plot.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
MainWindow::MainWindow()
|
||||
{
|
||||
QFrame *w = new QFrame(this);
|
||||
|
||||
// create the box of checkboxes
|
||||
|
||||
QGroupBox *panel = new QGroupBox("Axes", w);
|
||||
QVBoxLayout *vLayout = new QVBoxLayout(panel);
|
||||
|
||||
QStringList list;
|
||||
list << "yLeft" << "yLeft1" << "yLeft2" << "yLeft3";
|
||||
list << "yRight" << "yRight1" << "yRight2" << "yRight3";
|
||||
|
||||
QSignalMapper* signalMapper = new QSignalMapper(this);
|
||||
|
||||
QCheckBox* checkBox;
|
||||
for(int i = 0; i < 8; i++)
|
||||
{
|
||||
checkBox = new QCheckBox(list[i], panel);
|
||||
checkBox->setChecked(true);
|
||||
connect(checkBox, SIGNAL(clicked()), signalMapper, SLOT(map()));
|
||||
signalMapper->setMapping(checkBox, i);
|
||||
vLayout->addWidget(checkBox);
|
||||
}
|
||||
|
||||
connect(signalMapper, SIGNAL(mapped(int)),
|
||||
this, SLOT(axisCheckBoxToggled(int)));
|
||||
|
||||
vLayout->addStretch(10);
|
||||
|
||||
// create the plot widget
|
||||
|
||||
d_plot = new Plot(w);
|
||||
d_plot->replot();
|
||||
|
||||
// put the widgets in a horizontal box
|
||||
|
||||
QHBoxLayout *hLayout = new QHBoxLayout(w);
|
||||
hLayout->setMargin(0);
|
||||
hLayout->addWidget(panel, 10);
|
||||
hLayout->addWidget(d_plot, 10);
|
||||
|
||||
setCentralWidget(w);
|
||||
}
|
||||
|
||||
void MainWindow::axisCheckBoxToggled(int axis)
|
||||
{
|
||||
d_plot->enableAxis(axis, !d_plot->axisEnabled(axis));
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
#ifndef _MAINWINDOW_H_
|
||||
#define _MAINWINDOW_H_
|
||||
|
||||
#include <qmainwindow.h>
|
||||
|
||||
class Plot;
|
||||
|
||||
class MainWindow: public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow();
|
||||
|
||||
private slots:
|
||||
void axisCheckBoxToggled(int axis);
|
||||
|
||||
private:
|
||||
Plot *d_plot;
|
||||
};
|
||||
|
||||
#endif // _MAINWINDOW_H_
|
||||
@@ -1,17 +0,0 @@
|
||||
#include <qapplication.h>
|
||||
#include "mainwindow.h"
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
// many_axes.cpp
|
||||
//
|
||||
// An example that demonstrates a plot with many axes.
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
MainWindow mainWindow;
|
||||
mainWindow.show();
|
||||
return a.exec();
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
#ifndef _PLOT_H_
|
||||
#define _PLOT_H_
|
||||
|
||||
#include <qwt_plot.h>
|
||||
#include <qwt_plot_marker.h>
|
||||
#include <qwt_plot_curve.h>
|
||||
#include <qwt_legend.h>
|
||||
#include <qwt_data.h>
|
||||
#include <qwt_text.h>
|
||||
|
||||
/*class FunctionData: public QwtSyntheticPointData
|
||||
{
|
||||
public:
|
||||
FunctionData(double(*y)(double)):
|
||||
QwtSyntheticPointData(100),
|
||||
d_y(y)
|
||||
{
|
||||
}
|
||||
|
||||
virtual QwtSeriesData<QwtDoublePoint> *copy() const
|
||||
{
|
||||
return new FunctionData(d_y);
|
||||
}
|
||||
|
||||
virtual double y(double x) const
|
||||
{
|
||||
return d_y(x);
|
||||
}
|
||||
|
||||
private:
|
||||
double(*d_y)(double);
|
||||
};*/
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
// simple.cpp
|
||||
//
|
||||
// A simple example which shows how to use QwtPlot and QwtData
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
class SimpleData: public QwtData
|
||||
{
|
||||
// The x values depend on its index and the y values
|
||||
// can be calculated from the corresponding x value.
|
||||
// So we don´t need to store the values.
|
||||
// Such an implementation is slower because every point
|
||||
// has to be recalculated for every replot, but it demonstrates how
|
||||
// QwtData can be used.
|
||||
|
||||
public:
|
||||
SimpleData(double(*y)(double), size_t size):
|
||||
d_size(size),
|
||||
d_y(y)
|
||||
{
|
||||
}
|
||||
|
||||
virtual QwtData *copy() const
|
||||
{
|
||||
return new SimpleData(d_y, d_size);
|
||||
}
|
||||
|
||||
virtual size_t size() const
|
||||
{
|
||||
return d_size;
|
||||
}
|
||||
|
||||
virtual double x(size_t i) const
|
||||
{
|
||||
return 0.1 * i;
|
||||
}
|
||||
|
||||
virtual double y(size_t i) const
|
||||
{
|
||||
return d_y(x(i));
|
||||
}
|
||||
private:
|
||||
size_t d_size;
|
||||
double(*d_y)(double);
|
||||
};
|
||||
|
||||
class Plot : public QwtPlot
|
||||
{
|
||||
public:
|
||||
Plot(QWidget* widget) :
|
||||
QwtPlot(widget)
|
||||
{
|
||||
setTitle("A Simple QwtPlot Demonstration");
|
||||
insertLegend(new QwtLegend(), QwtPlot::RightLegend);
|
||||
|
||||
// Set axes
|
||||
setAxisTitle(xBottom, "xBottom");
|
||||
setAxisScale(xBottom, 0.0, 10.0);
|
||||
|
||||
setAxisTitle(yLeft, "yLeft");
|
||||
setAxisScale(yLeft, -1.0, 1.0);
|
||||
enableAxis(yLeft1);
|
||||
setAxisTitle(yLeft1, "yLeft1");
|
||||
enableAxis(yLeft2);
|
||||
setAxisTitle(yLeft2, "yLeft2");
|
||||
enableAxis(yLeft3);
|
||||
setAxisTitle(yLeft3, "yLeft3");
|
||||
enableAxis(yRight);
|
||||
setAxisTitle(yRight, "yRight");
|
||||
enableAxis(yRight1);
|
||||
setAxisTitle(yRight1, "yRight1");
|
||||
enableAxis(yRight2);
|
||||
setAxisTitle(yRight2, "yRight2");
|
||||
enableAxis(yRight3);
|
||||
setAxisTitle(yRight3, "yRight3");
|
||||
|
||||
// Insert new curves
|
||||
QwtPlotCurve *cSin = new QwtPlotCurve("y = sin(x)");
|
||||
#if QT_VERSION >= 0x040000
|
||||
cSin->setRenderHint(QwtPlotItem::RenderAntialiased);
|
||||
#endif
|
||||
cSin->setPen(QPen(Qt::red));
|
||||
cSin->attach(this);
|
||||
//cSin->setAxis(QwtPlot::xBottom, QwtPlot::yLeft);
|
||||
|
||||
QwtPlotCurve *cCos = new QwtPlotCurve("y = cos(x)");
|
||||
#if QT_VERSION >= 0x040000
|
||||
cCos->setRenderHint(QwtPlotItem::RenderAntialiased);
|
||||
#endif
|
||||
cCos->setPen(QPen(Qt::blue));
|
||||
cCos->attach(this);
|
||||
//cCos->setAxis(QwtPlot::xBottom, QwtPlot::yRight);
|
||||
|
||||
// Create sin and cos data
|
||||
const int nPoints = 100;
|
||||
cSin->setData(SimpleData(::sin, nPoints));
|
||||
cCos->setData(SimpleData(::cos, nPoints));
|
||||
|
||||
// Insert markers
|
||||
|
||||
// ...a horizontal line at y = 0...
|
||||
QwtPlotMarker *mY = new QwtPlotMarker();
|
||||
mY->setLabel(QString::fromLatin1("y = 0"));
|
||||
mY->setLabelAlignment(Qt::AlignRight|Qt::AlignTop);
|
||||
mY->setLineStyle(QwtPlotMarker::HLine);
|
||||
mY->setYValue(0.0);
|
||||
mY->attach(this);
|
||||
|
||||
// ...a vertical line at x = 2 * pi
|
||||
QwtPlotMarker *mX = new QwtPlotMarker();
|
||||
mX->setLabel(QString::fromLatin1("x = 2 pi"));
|
||||
mX->setLabelAlignment(Qt::AlignRight|Qt::AlignTop);
|
||||
mX->setLineStyle(QwtPlotMarker::VLine);
|
||||
mX->setXValue(6.284);
|
||||
mX->attach(this);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _PLOT_H_
|
||||
14
qwt/examples/navigation/main.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <qapplication.h>
|
||||
#include "mainwindow.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
MainWindow mainWindow;
|
||||
|
||||
mainWindow.resize(800,600);
|
||||
mainWindow.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
183
qwt/examples/navigation/mainwindow.cpp
Normal file
@@ -0,0 +1,183 @@
|
||||
#include <cstdlib>
|
||||
#include <qgroupbox.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qstatusbar.h>
|
||||
#include <qlabel.h>
|
||||
#include <qwt_plot.h>
|
||||
#include <qwt_plot_rescaler.h>
|
||||
#include <qwt_scale_div.h>
|
||||
#include "plot.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
MainWindow::MainWindow()
|
||||
{
|
||||
QFrame *w = new QFrame(this);
|
||||
|
||||
QWidget *panel = createPanel(w);
|
||||
panel->setFixedWidth(2 * panel->sizeHint().width());
|
||||
d_plot = createPlot(w);
|
||||
|
||||
QHBoxLayout *layout = new QHBoxLayout(w);
|
||||
layout->setMargin(0);
|
||||
layout->addWidget(panel, 0);
|
||||
layout->addWidget(d_plot, 10);
|
||||
|
||||
setCentralWidget(w);
|
||||
|
||||
setRescaleMode(0);
|
||||
setMouseMode(0);
|
||||
|
||||
(void)statusBar();
|
||||
}
|
||||
|
||||
QWidget *MainWindow::createPanel(QWidget *parent)
|
||||
{
|
||||
QGroupBox *panel = new QGroupBox("Navigation Panel", parent);
|
||||
|
||||
QComboBox *navigationBox = new QComboBox(panel);
|
||||
navigationBox->setEditable(false);
|
||||
navigationBox->insertItem(Tracking, "Tracking");
|
||||
navigationBox->insertItem(Zooming, "Zooming");
|
||||
navigationBox->insertItem(Panning, "Panning");
|
||||
|
||||
connect(navigationBox, SIGNAL(activated(int)), SLOT(setMouseMode(int)));
|
||||
|
||||
d_navigationInfo = new QLabel(panel);
|
||||
d_navigationInfo->setSizePolicy(
|
||||
QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
d_navigationInfo->setWordWrap(true);
|
||||
|
||||
QComboBox *rescaleBox = new QComboBox(panel);
|
||||
rescaleBox->setEditable(false);
|
||||
rescaleBox->insertItem(KeepScales, "None");
|
||||
rescaleBox->insertItem(Fixed, "Fixed");
|
||||
rescaleBox->insertItem(Expanding, "Expanding");
|
||||
rescaleBox->insertItem(Fitting, "Fitting");
|
||||
|
||||
connect(rescaleBox, SIGNAL(activated(int)), SLOT(setRescaleMode(int)));
|
||||
|
||||
d_rescaleInfo = new QLabel(panel);
|
||||
d_rescaleInfo->setSizePolicy(
|
||||
QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
d_rescaleInfo->setWordWrap(true);
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(panel);
|
||||
layout->addWidget(navigationBox);
|
||||
layout->addWidget(d_navigationInfo);
|
||||
layout->addWidget(rescaleBox);
|
||||
layout->addWidget(d_rescaleInfo);
|
||||
layout->addStretch(10);
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
Plot *MainWindow::createPlot(QWidget *parent)
|
||||
{
|
||||
Plot *plot = new Plot(parent, QwtInterval(0.0, 1000.0));
|
||||
plot->replot();
|
||||
|
||||
d_rescaler = new QwtPlotRescaler(plot->canvas());
|
||||
d_rescaler->setReferenceAxis(QwtPlot::xBottom);
|
||||
d_rescaler->setAspectRatio(QwtPlot::yLeft, 1.0);
|
||||
d_rescaler->setAspectRatio(QwtPlot::yRight, 0.0);
|
||||
d_rescaler->setAspectRatio(QwtPlot::xTop, 0.0);
|
||||
|
||||
for ( int axis = 0; axis < QwtPlot::axisCnt; axis++ )
|
||||
d_rescaler->setIntervalHint(axis, QwtInterval(0.0, 1000.0));
|
||||
|
||||
connect(plot, SIGNAL(resized(double, double)),
|
||||
SLOT(showRatio(double, double)));
|
||||
return plot;
|
||||
}
|
||||
|
||||
void MainWindow::setMouseMode(int mode)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
case Tracking:
|
||||
{
|
||||
d_navigationInfo->setText("Tracking");
|
||||
break;
|
||||
}
|
||||
case Zooming:
|
||||
{
|
||||
d_navigationInfo->setText("Zooming");
|
||||
break;
|
||||
}
|
||||
case Panning:
|
||||
{
|
||||
d_navigationInfo->setText("Panning");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::setRescaleMode(int mode)
|
||||
{
|
||||
bool doEnable = true;
|
||||
QString info;
|
||||
QRectF rectOfInterest;
|
||||
QwtPlotRescaler::ExpandingDirection direction = QwtPlotRescaler::ExpandUp;
|
||||
|
||||
switch(mode)
|
||||
{
|
||||
case KeepScales:
|
||||
{
|
||||
doEnable = false;
|
||||
info = "All scales remain unchanged, when the plot is resized";
|
||||
break;
|
||||
}
|
||||
case Fixed:
|
||||
{
|
||||
d_rescaler->setRescalePolicy(QwtPlotRescaler::Fixed);
|
||||
info = "The scale of the bottom axis remains unchanged, "
|
||||
"when the plot is resized. All other scales are changed, "
|
||||
"so that a pixel on screen means the same distance for"
|
||||
"all scales.";
|
||||
break;
|
||||
}
|
||||
case Expanding:
|
||||
{
|
||||
d_rescaler->setRescalePolicy(QwtPlotRescaler::Expanding);
|
||||
info = "The scales of all axis are shrinked/expanded, when "
|
||||
"resizing the plot, keeping the distance that is represented "
|
||||
"by one pixel.";
|
||||
d_rescaleInfo->setText("Expanding");
|
||||
break;
|
||||
}
|
||||
case Fitting:
|
||||
{
|
||||
d_rescaler->setRescalePolicy(QwtPlotRescaler::Fitting);
|
||||
const QwtInterval xIntv =
|
||||
d_rescaler->intervalHint(QwtPlot::xBottom);
|
||||
const QwtInterval yIntv =
|
||||
d_rescaler->intervalHint(QwtPlot::yLeft);
|
||||
|
||||
rectOfInterest = QRectF( xIntv.minValue(), yIntv.minValue(),
|
||||
xIntv.width(), yIntv.width());
|
||||
direction = QwtPlotRescaler::ExpandBoth;
|
||||
|
||||
info = "Fitting";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
d_plot->setRectOfInterest(rectOfInterest);
|
||||
|
||||
d_rescaleInfo->setText(info);
|
||||
d_rescaler->setEnabled(doEnable);
|
||||
for ( int axis = 0; axis < QwtPlot::axisCnt; axis++ )
|
||||
d_rescaler->setExpandingDirection(direction);
|
||||
|
||||
if ( doEnable )
|
||||
d_rescaler->rescale();
|
||||
else
|
||||
d_plot->replot();
|
||||
}
|
||||
|
||||
void MainWindow::showRatio(double xRatio, double yRatio)
|
||||
{
|
||||
const QString msg = QString("%1, %2").arg(xRatio).arg(yRatio);
|
||||
statusBar()->showMessage(msg);
|
||||
}
|
||||
49
qwt/examples/navigation/mainwindow.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#ifndef _MAINWINDOW_H_
|
||||
#define _MAINWINDOW_H_ 1
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qmainwindow.h>
|
||||
|
||||
class QwtPlotRescaler;
|
||||
class QLabel;
|
||||
class Plot;
|
||||
|
||||
class MainWindow: public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum MouseMode
|
||||
{
|
||||
Tracking,
|
||||
Zooming,
|
||||
Panning
|
||||
};
|
||||
|
||||
enum RescaleMode
|
||||
{
|
||||
KeepScales,
|
||||
Fixed,
|
||||
Expanding,
|
||||
Fitting
|
||||
};
|
||||
|
||||
MainWindow();
|
||||
|
||||
private Q_SLOTS:
|
||||
void setMouseMode(int);
|
||||
void setRescaleMode(int);
|
||||
void showRatio(double, double);
|
||||
|
||||
private:
|
||||
QWidget *createPanel(QWidget *);
|
||||
Plot *createPlot(QWidget *);
|
||||
|
||||
QwtPlotRescaler *d_rescaler;
|
||||
QLabel *d_navigationInfo;
|
||||
QLabel *d_rescaleInfo;
|
||||
|
||||
Plot *d_plot;
|
||||
};
|
||||
|
||||
#endif
|
||||
21
qwt/examples/navigation/navigation.pro
Normal file
@@ -0,0 +1,21 @@
|
||||
################################################################
|
||||
# Qwt Widget Library
|
||||
# Copyright (C) 1997 Josef Wilgen
|
||||
# Copyright (C) 2002 Uwe Rathmann
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the Qwt License, Version 1.0
|
||||
################################################################
|
||||
|
||||
include( $${PWD}/../examples.pri )
|
||||
|
||||
TARGET = navigation
|
||||
|
||||
HEADERS = \
|
||||
mainwindow.h \
|
||||
plot.h
|
||||
|
||||
SOURCES = \
|
||||
mainwindow.cpp \
|
||||
plot.cpp \
|
||||
main.cpp
|
||||
146
qwt/examples/navigation/plot.cpp
Normal file
@@ -0,0 +1,146 @@
|
||||
#include "plot.h"
|
||||
#include <qglobal.h>
|
||||
#include <qpainter.h>
|
||||
#include <qwt_plot_grid.h>
|
||||
#include <qwt_plot_canvas.h>
|
||||
#include <qwt_plot_layout.h>
|
||||
#include <qwt_interval.h>
|
||||
#include <qwt_painter.h>
|
||||
#include <qwt_plot_item.h>
|
||||
|
||||
class RectItem: public QwtPlotItem
|
||||
{
|
||||
public:
|
||||
enum Type
|
||||
{
|
||||
Rect,
|
||||
Ellipse
|
||||
};
|
||||
|
||||
RectItem(Type type):
|
||||
d_type(type)
|
||||
{
|
||||
}
|
||||
|
||||
void setPen(const QPen &pen)
|
||||
{
|
||||
if ( pen != d_pen )
|
||||
{
|
||||
d_pen = pen;
|
||||
itemChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void setBrush(const QBrush &brush)
|
||||
{
|
||||
if ( brush != d_brush )
|
||||
{
|
||||
d_brush = brush;
|
||||
itemChanged();
|
||||
}
|
||||
}
|
||||
void setRect(const QRectF &rect)
|
||||
{
|
||||
if ( d_rect != rect )
|
||||
{
|
||||
d_rect = rect;
|
||||
itemChanged();
|
||||
}
|
||||
}
|
||||
|
||||
virtual QRectF boundingRect() const
|
||||
{
|
||||
return d_rect;
|
||||
}
|
||||
|
||||
virtual void draw(QPainter *painter,
|
||||
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
|
||||
const QRectF &) const
|
||||
{
|
||||
if ( d_rect.isValid() )
|
||||
{
|
||||
const QRectF rect = QwtScaleMap::transform(
|
||||
xMap, yMap, d_rect);
|
||||
painter->setPen(d_pen);
|
||||
painter->setBrush(d_brush);
|
||||
if ( d_type == Ellipse )
|
||||
QwtPainter::drawEllipse(painter, rect);
|
||||
else
|
||||
QwtPainter::drawRect(painter, rect);
|
||||
}
|
||||
}
|
||||
private:
|
||||
QPen d_pen;
|
||||
QBrush d_brush;
|
||||
QRectF d_rect;
|
||||
Type d_type;
|
||||
};
|
||||
|
||||
Plot::Plot(QWidget *parent, const QwtInterval &interval):
|
||||
QwtPlot(parent)
|
||||
{
|
||||
for ( int axis = 0; axis < QwtPlot::axisCnt; axis ++ )
|
||||
setAxisScale(axis, interval.minValue(), interval.maxValue());
|
||||
|
||||
setCanvasBackground(QColor(Qt::darkBlue));
|
||||
plotLayout()->setAlignCanvasToScales(true);
|
||||
|
||||
// grid
|
||||
QwtPlotGrid *grid = new QwtPlotGrid;
|
||||
//grid->enableXMin(true);
|
||||
grid->setMajPen(QPen(Qt::white, 0, Qt::DotLine));
|
||||
grid->setMinPen(QPen(Qt::gray, 0 , Qt::DotLine));
|
||||
grid->attach(this);
|
||||
|
||||
const int numEllipses = 10;
|
||||
|
||||
for ( int i = 0; i < numEllipses; i++ )
|
||||
{
|
||||
const double x = interval.minValue() +
|
||||
qrand() % qRound(interval.width());
|
||||
const double y = interval.minValue() +
|
||||
qrand() % qRound(interval.width());
|
||||
const double r = interval.minValue() +
|
||||
qrand() % qRound(interval.width() / 6);
|
||||
|
||||
const QRectF area(x - r, y - r , 2 * r, 2 * r);
|
||||
|
||||
RectItem *item = new RectItem(RectItem::Ellipse);
|
||||
item->setRenderHint(QwtPlotItem::RenderAntialiased, true);
|
||||
item->setRect(area);
|
||||
item->setPen(QPen(Qt::yellow));
|
||||
item->attach(this);
|
||||
}
|
||||
|
||||
|
||||
d_rectOfInterest = new RectItem(RectItem::Rect);
|
||||
d_rectOfInterest->setPen(Qt::NoPen);
|
||||
QColor c = Qt::gray;
|
||||
c.setAlpha(100);
|
||||
d_rectOfInterest->setBrush(QBrush(c));
|
||||
d_rectOfInterest->attach(this);
|
||||
}
|
||||
|
||||
void Plot::updateLayout()
|
||||
{
|
||||
QwtPlot::updateLayout();
|
||||
|
||||
const QwtScaleMap xMap = canvasMap(QwtPlot::xBottom);
|
||||
const QwtScaleMap yMap = canvasMap(QwtPlot::yLeft);
|
||||
|
||||
const QRect cr = canvas()->contentsRect();
|
||||
const double x1 = xMap.invTransform(cr.left());
|
||||
const double x2 = xMap.invTransform(cr.right());
|
||||
const double y1 = yMap.invTransform(cr.bottom());
|
||||
const double y2 = yMap.invTransform(cr.top());
|
||||
|
||||
const double xRatio = (x2 - x1) / cr.width();
|
||||
const double yRatio = (y2 - y1) / cr.height();
|
||||
|
||||
Q_EMIT resized(xRatio, yRatio);
|
||||
}
|
||||
|
||||
void Plot::setRectOfInterest(const QRectF &rect)
|
||||
{
|
||||
d_rectOfInterest->setRect(rect);
|
||||
}
|
||||
26
qwt/examples/navigation/plot.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef _PLOT_H_
|
||||
#define _PLOT_H_ 1
|
||||
|
||||
#include <qwt_plot.h>
|
||||
|
||||
class RectItem;
|
||||
class QwtInterval;
|
||||
|
||||
class Plot: public QwtPlot
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Plot(QWidget *parent, const QwtInterval &);
|
||||
virtual void updateLayout();
|
||||
|
||||
void setRectOfInterest(const QRectF &);
|
||||
|
||||
Q_SIGNALS:
|
||||
void resized(double xRatio, double yRatio);
|
||||
|
||||
private:
|
||||
RectItem *d_rectOfInterest;
|
||||
};
|
||||
|
||||
#endif
|
||||
27
qwt/examples/oscilloscope/curvedata.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "curvedata.h"
|
||||
#include "signaldata.h"
|
||||
|
||||
const SignalData &CurveData::values() const
|
||||
{
|
||||
return SignalData::instance();
|
||||
}
|
||||
|
||||
SignalData &CurveData::values()
|
||||
{
|
||||
return SignalData::instance();
|
||||
}
|
||||
|
||||
QPointF CurveData::sample(size_t i) const
|
||||
{
|
||||
return SignalData::instance().value(i);
|
||||
}
|
||||
|
||||
size_t CurveData::size() const
|
||||
{
|
||||
return SignalData::instance().size();
|
||||
}
|
||||
|
||||
QRectF CurveData::boundingRect() const
|
||||
{
|
||||
return SignalData::instance().boundingRect();
|
||||
}
|
||||
16
qwt/examples/oscilloscope/curvedata.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <qwt_series_data.h>
|
||||
#include <qpointer.h>
|
||||
|
||||
class SignalData;
|
||||
|
||||
class CurveData: public QwtSeriesData<QPointF>
|
||||
{
|
||||
public:
|
||||
const SignalData &values() const;
|
||||
SignalData &values();
|
||||
|
||||
virtual QPointF sample(size_t i) const;
|
||||
virtual size_t size() const;
|
||||
|
||||
virtual QRectF boundingRect() const;
|
||||
};
|
||||
86
qwt/examples/oscilloscope/knob.cpp
Normal file
@@ -0,0 +1,86 @@
|
||||
#include "knob.h"
|
||||
#include <qwt_math.h>
|
||||
#include <qpen.h>
|
||||
#include <qwt_knob.h>
|
||||
#include <qwt_round_scale_draw.h>
|
||||
#include <qwt_scale_engine.h>
|
||||
#include <qlabel.h>
|
||||
#include <qevent.h>
|
||||
|
||||
Knob::Knob(const QString &title, double min, double max, QWidget *parent):
|
||||
QWidget(parent)
|
||||
{
|
||||
QFont font("Helvetica", 10);
|
||||
|
||||
d_knob = new QwtKnob(this);
|
||||
d_knob->setFont(font);
|
||||
d_knob->setRange(min, max);
|
||||
|
||||
QwtScaleDiv scaleDiv =
|
||||
d_knob->scaleEngine()->divideScale(min, max, 5, 3);
|
||||
|
||||
QList<double> ticks = scaleDiv.ticks(QwtScaleDiv::MajorTick);
|
||||
if ( ticks.size() > 0 && ticks[0] > min )
|
||||
{
|
||||
if ( ticks.first() > min )
|
||||
ticks.prepend(min);
|
||||
if ( ticks.last() < max )
|
||||
ticks.append(max);
|
||||
}
|
||||
scaleDiv.setTicks(QwtScaleDiv::MajorTick, ticks);
|
||||
d_knob->setScale(scaleDiv);
|
||||
|
||||
d_knob->setKnobWidth(50);
|
||||
|
||||
font.setBold(true);
|
||||
d_label = new QLabel(title, this);
|
||||
d_label->setFont(font);
|
||||
d_label->setAlignment(Qt::AlignTop | Qt::AlignHCenter);
|
||||
|
||||
setSizePolicy(QSizePolicy::MinimumExpanding,
|
||||
QSizePolicy::MinimumExpanding);
|
||||
|
||||
connect(d_knob, SIGNAL(valueChanged(double)),
|
||||
this, SIGNAL(valueChanged(double)));
|
||||
}
|
||||
|
||||
QSize Knob::sizeHint() const
|
||||
{
|
||||
QSize sz1 = d_knob->sizeHint();
|
||||
QSize sz2 = d_label->sizeHint();
|
||||
|
||||
const int w = qMax(sz1.width(), sz2.width());
|
||||
const int h = sz1.height() + sz2.height();
|
||||
|
||||
int off = d_knob->scaleDraw()->extent(d_knob->font());
|
||||
off -= 10; // spacing
|
||||
|
||||
return QSize(w, h - off);
|
||||
}
|
||||
|
||||
void Knob::setValue(double value)
|
||||
{
|
||||
d_knob->setValue(value);
|
||||
}
|
||||
|
||||
double Knob::value() const
|
||||
{
|
||||
return d_knob->value();
|
||||
}
|
||||
|
||||
void Knob::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
const QSize sz = e->size();
|
||||
|
||||
int h = d_label->sizeHint().height();
|
||||
|
||||
d_label->setGeometry(0, sz.height() - h,
|
||||
sz.width(), h);
|
||||
|
||||
h = d_knob->sizeHint().height();
|
||||
int off = d_knob->scaleDraw()->extent(d_knob->font());
|
||||
off -= 10; // spacing
|
||||
|
||||
d_knob->setGeometry(0, d_label->pos().y() - h + off,
|
||||
sz.width(), h);
|
||||
}
|
||||