diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt.h b/Code/qtiplot/3rdparty/qwt/src/qwt.h deleted file mode 100644 index 7d7634d1c8554e2e9d0693d2b6983ffddbbf9b2b..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt.h +++ /dev/null @@ -1,22 +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_H -#define QWT_H - -#include "qwt_global.h" - -/*! - Some constants for use within Qwt. -*/ -namespace Qwt -{ -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_abstract_scale.h b/Code/qtiplot/3rdparty/qwt/src/qwt_abstract_scale.h deleted file mode 100644 index cc1cc538f8c7e2e0521d3b5780f6eec1039f39c9..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_abstract_scale.h +++ /dev/null @@ -1,70 +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_ABSTRACT_SCALE_H -#define QWT_ABSTRACT_SCALE_H - -#include "qwt_global.h" - -class QwtScaleEngine; -class QwtAbstractScaleDraw; -class QwtScaleDiv; -class QwtScaleMap; -class QwtDoubleInterval; - -/*! - \brief An abstract base class for classes containing a scale - - QwtAbstractScale is used to provide classes with a QwtScaleDraw, - and a QwtScaleDiv. The QwtScaleDiv might be set explicitely - or calculated by a QwtScaleEngine. -*/ - -class QWT_EXPORT QwtAbstractScale -{ -public: - QwtAbstractScale(); - virtual ~QwtAbstractScale(); - - void setScale(double vmin, double vmax, double step = 0.0); - void setScale(const QwtDoubleInterval &, double step = 0.0); - void setScale(const QwtScaleDiv &s); - - void setAutoScale(); - bool autoScale() const; - - void setScaleMaxMajor( int ticks); - int scaleMaxMinor() const; - - void setScaleMaxMinor( int ticks); - int scaleMaxMajor() const; - - void setScaleEngine(QwtScaleEngine *); - const QwtScaleEngine *scaleEngine() const; - QwtScaleEngine *scaleEngine(); - - const QwtScaleMap &scaleMap() const; - -protected: - void rescale(double vmin, double vmax, double step = 0.0); - - void setAbstractScaleDraw(QwtAbstractScaleDraw *); - const QwtAbstractScaleDraw *abstractScaleDraw() const; - QwtAbstractScaleDraw *abstractScaleDraw(); - - virtual void scaleChange(); - -private: - void updateScaleDraw(); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_abstract_scale_draw.h b/Code/qtiplot/3rdparty/qwt/src/qwt_abstract_scale_draw.h deleted file mode 100644 index 2e2fb7cbf8b1239d4a7ad0703a5211654087e675..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_abstract_scale_draw.h +++ /dev/null @@ -1,146 +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_ABSTRACT_SCALE_DRAW_H -#define QWT_ABSTRACT_SCALE_DRAW_H - -#include "qwt_global.h" -#include "qwt_scale_div.h" -#include "qwt_text.h" - - -#if QT_VERSION < 0x040000 -class QColorGroup; -#else -class QPalette; -#endif -class QPainter; -class QFont; -class QwtScaleTransformation; -class QwtScaleMap; - -/*! - \brief A abstract base class for drawing scales - - QwtAbstractScaleDraw can be used to draw linear or logarithmic scales. - - After a scale division has been specified as a QwtScaleDiv object - using QwtAbstractScaleDraw::setScaleDiv(const QwtScaleDiv &s), - the scale can be drawn with the QwtAbstractScaleDraw::draw() member. -*/ -class QWT_EXPORT QwtAbstractScaleDraw -{ -public: - - /*! - Components of a scale - - - Backbone - - Ticks - - Labels - - \sa QwtAbstractScaleDraw::enableComponent, - QwtAbstractScaleDraw::hasComponent - */ - - enum ScaleComponent - { - Backbone = 1, - Ticks = 2, - Labels = 4 - }; - - QwtAbstractScaleDraw(); - QwtAbstractScaleDraw( const QwtAbstractScaleDraw & ); - virtual ~QwtAbstractScaleDraw(); - - QwtAbstractScaleDraw &operator=(const QwtAbstractScaleDraw &); - - void setScaleDiv(const QwtScaleDiv &s); - const QwtScaleDiv& scaleDiv() const; - - void setTransformation(QwtScaleTransformation *); - const QwtScaleMap &map() const; - - void enableComponent(ScaleComponent, bool enable = true); - bool hasComponent(ScaleComponent) const; - - void setTickLength(QwtScaleDiv::TickType, int length); - int tickLength(QwtScaleDiv::TickType) const; - int majTickLength() const; - - void setSpacing(int margin); - int spacing() const; - -#if QT_VERSION < 0x040000 - virtual void draw(QPainter *, const QColorGroup &) const; -#else - virtual void draw(QPainter *, const QPalette &) const; -#endif - - virtual QwtText label(double) const; - - /*! - Calculate the extent - - The extent is the distcance from the baseline to the outermost - pixel of the scale draw in opposite to its orientation. - It is at least minimumExtent() pixels. - - \sa setMinimumExtent(), minimumExtent() - */ - virtual int extent(const QPen &, const QFont &) const = 0; - - void setMinimumExtent(int); - int minimumExtent() const; - - QwtScaleMap &scaleMap(); - -protected: - /*! - Draw a tick - - \param painter Painter - \param value Value of the tick - \param len Lenght of the tick - - \sa drawBackbone(), drawLabel() - */ - virtual void drawTick(QPainter *painter, double value, int len) const = 0; - - /*! - Draws the baseline of the scale - \param painter Painter - - \sa drawTick(), drawLabel() - */ - virtual void drawBackbone(QPainter *painter) const = 0; - - /*! - Draws the label for a major scale tick - - \param painter Painter - \param value Value - - \sa drawTick, drawBackbone - */ - virtual void drawLabel(QPainter *painter, double value) const = 0; - - void invalidateCache(); - const QwtText &tickLabel(const QFont &, double value) const; - -private: - int operator==(const QwtAbstractScaleDraw &) const; - int operator!=(const QwtAbstractScaleDraw &) const; - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_abstract_slider.h b/Code/qtiplot/3rdparty/qwt/src/qwt_abstract_slider.h deleted file mode 100644 index 42b36aaa94bfeb76a1efaee690e90f8eed9b21ff..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_abstract_slider.h +++ /dev/null @@ -1,192 +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_ABSTRACT_SLIDER_H -#define QWT_ABSTRACT_SLIDER_H - -#include <qwidget.h> -#include "qwt_global.h" -#include "qwt_double_range.h" - -/*! - \brief An abstract base class for slider widgets - - QwtAbstractSlider is a base class for - slider widgets. It handles mouse events - and updates the slider's value accordingly. Derived classes - only have to implement the getValue() and - getScrollMode() members, and should react to a - valueChange(), which normally requires repainting. -*/ - -class QWT_EXPORT QwtAbstractSlider : public QWidget, public QwtDoubleRange -{ - Q_OBJECT - Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly ) - Q_PROPERTY( bool valid READ isValid WRITE setValid ) - Q_PROPERTY( double mass READ mass WRITE setMass ) -#ifndef Q_MOC_RUN // Qt3 moc -#define QWT_PROPERTY Q_PROPERTY - Q_PROPERTY( Orientation orientation - READ orientation WRITE setOrientation ) -#else // Qt4 moc -// MOC_SKIP_BEGIN - Q_PROPERTY( Qt::Orientation orientation - READ orientation WRITE setOrientation ) -// MOC_SKIP_END -#endif - -public: - /*! - Scroll mode - \sa getScrollMode() - */ - enum ScrollMode - { - ScrNone, - ScrMouse, - ScrTimer, - ScrDirect, - ScrPage - }; - - explicit QwtAbstractSlider(Qt::Orientation, QWidget *parent = NULL); - virtual ~QwtAbstractSlider(); - - void setUpdateTime(int t); - void stopMoving(); - void setTracking(bool enable); - - virtual void setMass(double val); - virtual double mass() const; - -#if QT_VERSION >= 0x040000 - virtual void setOrientation(Qt::Orientation o); - Qt::Orientation orientation() const; -#else - virtual void setOrientation(Orientation o); - Orientation orientation() const; -#endif - - bool isReadOnly() const; - - /* - Wrappers for QwtDblRange::isValid/QwtDblRange::setValid made - to be available as Q_PROPERTY in the designer. - */ - - /*! - \sa QwtDblRange::isValid - */ - bool isValid() const { return QwtDoubleRange::isValid(); } - - /*! - \sa QwtDblRange::isValid - */ - void setValid(bool valid) { QwtDoubleRange::setValid(valid); } - -public slots: - virtual void setValue(double val); - virtual void fitValue(double val); - virtual void incValue(int steps); - - virtual void setReadOnly(bool); - -signals: - - /*! - \brief Notify a change of value. - - In the default setting - (tracking enabled), this signal will be emitted every - time the value changes ( see setTracking() ). - \param value new value - */ - void valueChanged(double value); - - /*! - This signal is emitted when the user presses the - movable part of the slider (start ScrMouse Mode). - */ - void sliderPressed(); - - /*! - This signal is emitted when the user releases the - movable part of the slider. - */ - - void sliderReleased(); - /*! - This signal is emitted when the user moves the - slider with the mouse. - \param value new value - */ - void sliderMoved(double value); - -protected: - virtual void setPosition(const QPoint &); - virtual void valueChange(); - - virtual void timerEvent(QTimerEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void keyPressEvent(QKeyEvent *e); - virtual void wheelEvent(QWheelEvent *e); - - /*! - \brief Determine the value corresponding to a specified poind - - This is an abstract virtual function which is called when - the user presses or releases a mouse button or moves the - mouse. It has to be implemented by the derived class. - \param p point - */ - virtual double getValue(const QPoint & p) = 0; - /*! - \brief Determine what to do when the user presses a mouse button. - - This function is abstract and has to be implemented by derived classes. - It is called on a mousePress event. The derived class can determine - what should happen next in dependence of the position where the mouse - was pressed by returning scrolling mode and direction. QwtAbstractSlider - knows the following modes:<dl> - <dt>QwtAbstractSlider::ScrNone - <dd>Scrolling switched off. Don't change the value. - <dt>QwtAbstractSlider::ScrMouse - <dd>Change the value while the user keeps the - button pressed and moves the mouse. - <dt>QwtAbstractSlider::ScrTimer - <dd>Automatic scrolling. Increment the value - in the specified direction as long as - the user keeps the button pressed. - <dt>QwtAbstractSlider::ScrPage - <dd>Automatic scrolling. Same as ScrTimer, but - increment by page size.</dl> - - \param p point where the mouse was pressed - \retval scrollMode The scrolling mode - \retval direction direction: 1, 0, or -1. - */ - virtual void getScrollMode( const QPoint &p, - int &scrollMode, int &direction) = 0; - - void setMouseOffset(double); - double mouseOffset() const; - - int scrollMode() const; - -private: - void buttonReleased(); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_analog_clock.h b/Code/qtiplot/3rdparty/qwt/src/qwt_analog_clock.h deleted file mode 100644 index 519bc7d747d6c9f4857d377bdf73593d6606c0de..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_analog_clock.h +++ /dev/null @@ -1,94 +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_ANALOG_CLOCK_H -#define QWT_ANALOG_CLOCK_H - -#include <qdatetime.h> -#include "qwt_global.h" -#include "qwt_dial.h" -#include "qwt_dial_needle.h" - -/*! - \brief An analog clock - - \image html analogclock.png - - \par Example - \verbatim #include <qwt_analog_clock.h> - - QwtAnalogClock *clock = new QwtAnalogClock(...); - clock->scaleDraw()->setPenWidth(3); - clock->setLineWidth(6); - clock->setFrameShadow(QwtDial::Sunken); - clock->setTime(); - - // update the clock every second - QTimer *timer = new QTimer(clock); - timer->connect(timer, SIGNAL(timeout()), clock, SLOT(setCurrentTime())); - timer->start(1000); - - \endverbatim - - Qwt is missing a set of good looking hands. - Contributions are very welcome. - - \note The examples/dials example shows how to use QwtAnalogClock. -*/ - -class QWT_EXPORT QwtAnalogClock: public QwtDial -{ - Q_OBJECT - -public: - /*! - Hand type - \sa setHand(), hand() - */ - - enum Hand - { - SecondHand, - MinuteHand, - HourHand, - - NHands - }; - - explicit QwtAnalogClock(QWidget* parent = NULL); -#if QT_VERSION < 0x040000 - explicit QwtAnalogClock(QWidget* parent, const char *name); -#endif - virtual ~QwtAnalogClock(); - - virtual void setHand(Hand, QwtDialNeedle *); - const QwtDialNeedle *hand(Hand) const; - QwtDialNeedle *hand(Hand); - -public slots: - void setCurrentTime(); - void setTime(const QTime & = QTime::currentTime()); - -protected: - virtual QwtText scaleLabel(double) const; - - virtual void drawNeedle(QPainter *, const QPoint &, - int radius, double direction, QPalette::ColorGroup) const; - - virtual void drawHand(QPainter *, Hand, const QPoint &, - int radius, double direction, QPalette::ColorGroup) const; - -private: - virtual void setNeedle(QwtDialNeedle *); - void initClock(); - - QwtDialNeedle *d_hand[NHands]; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_array.h b/Code/qtiplot/3rdparty/qwt/src/qwt_array.h deleted file mode 100644 index c5209cfb931a638dc2426791f1633b341515c244..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_array.h +++ /dev/null @@ -1,29 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_ARRAY_H -#define QWT_ARRAY_H - -#include "qwt_global.h" - -/*! - \def QwtArray - */ - -#if QT_VERSION < 0x040000 -#include <qmemarray.h> -#define QwtArray QMemArray -#else -#include <qvector.h> -#define QwtArray QVector -#endif - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_arrow_button.h b/Code/qtiplot/3rdparty/qwt/src/qwt_arrow_button.h deleted file mode 100644 index 9d1a7829b3f714aa26df218a88d422113a49aba3..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_arrow_button.h +++ /dev/null @@ -1,54 +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_ARROW_BUTTON_H -#define QWT_ARROW_BUTTON_H - -#include <qpushbutton.h> -#include "qwt_global.h" - -/*! - \brief Arrow Button - - A push button with one or more filled triangles on its front. - An Arrow button can have 1 to 3 arrows in a row, pointing - up, down, left or right. -*/ -class QWT_EXPORT QwtArrowButton : public QPushButton -{ -public: - explicit QwtArrowButton (int num, Qt::ArrowType, QWidget *parent = NULL); - virtual ~QwtArrowButton(); - - Qt::ArrowType arrowType() const; - int num() const; - - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; - -protected: -#if QT_VERSION >= 0x040000 - virtual void paintEvent(QPaintEvent *event); -#endif - - virtual void drawButtonLabel(QPainter *p); - virtual void drawArrow(QPainter *, - const QRect &, Qt::ArrowType) const; - virtual QRect labelRect() const; - virtual QSize arrowSize(Qt::ArrowType, - const QSize &boundingSize) const; - - virtual void keyPressEvent(QKeyEvent *); - -private: - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_clipper.h b/Code/qtiplot/3rdparty/qwt/src/qwt_clipper.h deleted file mode 100644 index 5f17834f7fff9e1b9d695edf38900d758f2937b4..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_clipper.h +++ /dev/null @@ -1,37 +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_CLIPPER_H -#define QWT_CLIPPER_H - -#include "qwt_global.h" -#include "qwt_array.h" -#include "qwt_polygon.h" -#include "qwt_double_rect.h" -#include "qwt_double_interval.h" - -class QRect; - -/*! - \brief Some clipping algos -*/ - -class QWT_EXPORT QwtClipper -{ -public: - static QwtPolygon clipPolygon(const QRect &, const QwtPolygon &); - static QwtPolygonF clipPolygonF(const QwtDoubleRect &, const QwtPolygonF &); - -#if QT_VERSION >= 0x040000 - static QwtArray<QwtDoubleInterval> clipCircle( - const QwtDoubleRect &, const QwtDoublePoint &, double radius); -#endif -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_color_map.h b/Code/qtiplot/3rdparty/qwt/src/qwt_color_map.h deleted file mode 100644 index 4ec94ae2925f33417ffa635c2041aa9c17dd58c9..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_color_map.h +++ /dev/null @@ -1,221 +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_COLOR_MAP_H -#define QWT_COLOR_MAP_H - -#include <qglobal.h> -#include <qcolor.h> -#if QT_VERSION < 0x040000 -#include <qvaluevector.h> -#else -#include <qvector.h> -#endif -#include "qwt_array.h" -#include "qwt_double_interval.h" - -#if defined(QWT_TEMPLATEDLL) -// MOC_SKIP_BEGIN -template class QWT_EXPORT QwtArray<double>; -// MOC_SKIP_END -#endif - -/*! - \brief QwtColorMap is used to map values into colors. - - For displaying 3D data on a 2D plane the 3rd dimension is often - displayed using colors, like f.e in a spectrogram. - - Each color map is optimized to return colors for only one of the - following image formats: - - - QImage::Format_Indexed8\n - - QImage::Format_ARGB32\n - - \sa QwtPlotSpectrogram, QwtScaleWidget -*/ - -class QWT_EXPORT QwtColorMap -{ -public: - /*! - - RGB\n - The map is intended to map into QRgb values. - - Indexed\n - The map is intended to map into 8 bit values, that - are indices into the color table. - - \sa rgb(), colorIndex(), colorTable() - */ - - enum Format - { - RGB, - Indexed - }; - - QwtColorMap(Format = QwtColorMap::RGB ); - virtual ~QwtColorMap(); - - inline Format format() const; - - //! Clone the color map - virtual QwtColorMap *copy() const = 0; - - /*! - Map a value of a given interval into a rgb value. - \param interval Range for the values - \param value Value - \return rgb value, corresponding to value - */ - virtual QRgb rgb( - const QwtDoubleInterval &interval, double value) const = 0; - - /*! - Map a value of a given interval into a color index - \param interval Range for the values - \param value Value - \return color index, corresponding to value - */ - virtual unsigned char colorIndex( - const QwtDoubleInterval &interval, double value) const = 0; - - QColor color(const QwtDoubleInterval &, double value) const; -#if QT_VERSION < 0x040000 - virtual QValueVector<QRgb> colorTable(const QwtDoubleInterval &) const; -#else - virtual QVector<QRgb> colorTable(const QwtDoubleInterval &) const; -#endif - -private: - Format d_format; -}; - - -/*! - \brief QwtLinearColorMap builds a color map from color stops. - - A color stop is a color at a specific position. The valid - range for the positions is [0.0, 1.0]. When mapping a value - into a color it is translated into this interval. If - mode() == FixedColors the color is calculated from the next lower - color stop. If mode() == ScaledColors the color is calculated - by interpolating the colors of the adjacent stops. -*/ -class QWT_EXPORT QwtLinearColorMap: public QwtColorMap -{ -public: - /*! - Mode of color map - \sa setMode(), mode() - */ - enum Mode - { - FixedColors, - ScaledColors - }; - - QwtLinearColorMap(QwtColorMap::Format = QwtColorMap::RGB); - QwtLinearColorMap( const QColor &from, const QColor &to, - QwtColorMap::Format = QwtColorMap::RGB); - - QwtLinearColorMap(const QwtLinearColorMap &); - - virtual ~QwtLinearColorMap(); - - QwtLinearColorMap &operator=(const QwtLinearColorMap &); - - virtual QwtColorMap *copy() const; - - void setMode(Mode); - Mode mode() const; - - void setColorInterval(const QColor &color1, const QColor &color2); - void addColorStop(double value, const QColor&); - QwtArray<double> colorStops() const; - - QColor color1() const; - QColor color2() const; - - virtual QRgb rgb(const QwtDoubleInterval &, double value) const; - virtual unsigned char colorIndex( - const QwtDoubleInterval &, double value) const; - - class ColorStops; - -private: - class PrivateData; - PrivateData *d_data; -}; - -/*! - \brief QwtAlphaColorMap variies the alpha value of a color -*/ -class QWT_EXPORT QwtAlphaColorMap: public QwtColorMap -{ -public: - QwtAlphaColorMap(const QColor & = QColor(Qt::gray)); - QwtAlphaColorMap(const QwtAlphaColorMap &); - - virtual ~QwtAlphaColorMap(); - - QwtAlphaColorMap &operator=(const QwtAlphaColorMap &); - - virtual QwtColorMap *copy() const; - - void setColor(const QColor &); - QColor color() const; - - virtual QRgb rgb(const QwtDoubleInterval &, double value) const; - -private: - virtual unsigned char colorIndex( - const QwtDoubleInterval &, double value) const; - - class PrivateData; - PrivateData *d_data; -}; - - -/*! - Map a value into a color - - \param interval Valid interval for values - \param value Value - - \return Color corresponding to value - - \warning This method is slow for Indexed color maps. If it is - necessary to map many values, its better to get the - color table once and find the color using colorIndex(). -*/ -inline QColor QwtColorMap::color( - const QwtDoubleInterval &interval, double value) const -{ - if ( d_format == RGB ) - { - return QColor( rgb(interval, value) ); - } - else - { - const unsigned int index = colorIndex(interval, value); - return colorTable(interval)[index]; // slow - } -} - -/*! - \return Intended format of the color map - \sa Format -*/ -inline QwtColorMap::Format QwtColorMap::format() const -{ - return d_format; -} - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_compass.h b/Code/qtiplot/3rdparty/qwt/src/qwt_compass.h deleted file mode 100644 index 68b94296441700c7b031cf9eaf7b0d38963724fa..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_compass.h +++ /dev/null @@ -1,85 +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_COMPASS_H -#define QWT_COMPASS_H 1 - -#include <qstring.h> -#include <qmap.h> -#include "qwt_dial.h" - -#if defined(QWT_TEMPLATEDLL) - -#if defined(QT_NO_STL) || QT_VERSION < 0x040000 || QT_VERSION > 0x040001 -/* - Unfortunately Qt 4.0.0/Qt 4.0.1 contains uncompilable - code in the STL adaptors of qmap.h. The declaration below - instantiates this code resulting in compiler errors. - If you really need the map to be exported, remove the condition above - and fix the qmap.h -*/ -// MOC_SKIP_BEGIN -template class QWT_EXPORT QMap<double, QString>; -// MOC_SKIP_END -#endif - -#endif - - -class QwtCompassRose; - -/*! - \brief A Compass Widget - - QwtCompass is a widget to display and enter directions. It consists - of a scale, an optional needle and rose. - - \image html dials1.png - - \note The examples/dials example shows how to use QwtCompass. -*/ - -class QWT_EXPORT QwtCompass: public QwtDial -{ - Q_OBJECT - -public: - explicit QwtCompass( QWidget* parent = NULL); -#if QT_VERSION < 0x040000 - explicit QwtCompass(QWidget* parent, const char *name); -#endif - virtual ~QwtCompass(); - - void setRose(QwtCompassRose *rose); - const QwtCompassRose *rose() const; - QwtCompassRose *rose(); - - const QMap<double, QString> &labelMap() const; - QMap<double, QString> &labelMap(); - void setLabelMap(const QMap<double, QString> &map); - -protected: - virtual QwtText scaleLabel(double value) const; - - virtual void drawRose(QPainter *, const QPoint ¢er, - int radius, double north, QPalette::ColorGroup) const; - - virtual void drawScaleContents(QPainter *, - const QPoint ¢er, int radius) const; - - virtual void keyPressEvent(QKeyEvent *); - -private: - void initCompass(); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_compass_rose.h b/Code/qtiplot/3rdparty/qwt/src/qwt_compass_rose.h deleted file mode 100644 index aaf4b0d8542db466fc3a16c9b620f53bfe2658bd..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_compass_rose.h +++ /dev/null @@ -1,85 +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_COMPASS_ROSE_H -#define QWT_COMPASS_ROSE_H 1 - -#include <qpalette.h> -#include "qwt_global.h" - -class QPainter; - -/*! - \brief Abstract base class for a compass rose -*/ -class QWT_EXPORT QwtCompassRose -{ -public: - virtual ~QwtCompassRose() {}; - - virtual void setPalette(const QPalette &p) { d_palette = p; } - const QPalette &palette() const { return d_palette; } - - /*! - Draw the rose - - \param painter Painter - \param center Center point - \param radius Radius of the rose - \param north Position - \param colorGroup Color group - */ - virtual void draw(QPainter *painter, const QPoint ¢er, - int radius, double north, - QPalette::ColorGroup colorGroup = QPalette::Active) const = 0; - -private: - QPalette d_palette; -}; - -/*! - \brief A simple rose for QwtCompass -*/ -class QWT_EXPORT QwtSimpleCompassRose: public QwtCompassRose -{ -public: - QwtSimpleCompassRose(int numThorns = 8, int numThornLevels = -1); - - void setWidth(double w); - double width() const { return d_width; } - - void setNumThorns(int count); - int numThorns() const; - - void setNumThornLevels(int count); - int numThornLevels() const; - - void setShrinkFactor(double factor) { d_shrinkFactor = factor; } - double shrinkFactor() const { return d_shrinkFactor; } - - virtual void draw(QPainter *, const QPoint ¢er, int radius, - double north, QPalette::ColorGroup = QPalette::Active) const; - - static void drawRose(QPainter *, -#if QT_VERSION < 0x040000 - const QColorGroup &, -#else - const QPalette &, -#endif - const QPoint ¢er, int radius, double origin, double width, - int numThorns, int numThornLevels, double shrinkFactor); - -private: - double d_width; - int d_numThorns; - int d_numThornLevels; - double d_shrinkFactor; -}; - -#endif // QWT_COMPASS_ROSE_H diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_counter.h b/Code/qtiplot/3rdparty/qwt/src/qwt_counter.h deleted file mode 100644 index e92e2fc918f1cc89d79ac8349b789535bedba83c..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_counter.h +++ /dev/null @@ -1,157 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_COUNTER_H -#define QWT_COUNTER_H - -#include <qwidget.h> -#include "qwt_global.h" -#include "qwt_double_range.h" - -/*! - \brief The Counter Widget - - A Counter consists of a label displaying a number and - one ore more (up to three) push buttons on each side - of the label which can be used to increment or decrement - the counter's value. - - A Counter has a range from a minimum value to a maximum value - and a step size. The range can be specified using - QwtDblRange::setRange(). - The counter's value is an integer multiple of the step size. - The number of steps by which a button increments or decrements - the value can be specified using QwtCounter::setIncSteps(). - The number of buttons can be changed with - QwtCounter::setNumButtons(). - - Holding the space bar down with focus on a button is the - fastest method to step through the counter values. - When the counter underflows/overflows, the focus is set - to the smallest up/down button and counting is disabled. - Counting is re-enabled on a button release event (mouse or - space bar). - - Example: -\code -#include "../include/qwt_counter.h> - -QwtCounter *cnt; - -cnt = new QwtCounter(parent, name); - -cnt->setRange(0.0, 100.0, 1.0); // From 0.0 to 100, step 1.0 -cnt->setNumButtons(2); // Two buttons each side -cnt->setIncSteps(QwtCounter::Button1, 1); // Button 1 increments 1 step -cnt->setIncSteps(QwtCounter::Button2, 20); // Button 2 increments 20 steps - -connect(cnt, SIGNAL(valueChanged(double)), my_class, SLOT(newValue(double))); -\endcode - */ - -class QWT_EXPORT QwtCounter : public QWidget, public QwtDoubleRange -{ - Q_OBJECT - - Q_PROPERTY( int numButtons READ numButtons WRITE setNumButtons ) - Q_PROPERTY( double basicstep READ step WRITE setStep ) - Q_PROPERTY( double minValue READ minVal WRITE setMinValue ) - Q_PROPERTY( double maxValue READ maxVal WRITE setMaxValue ) - Q_PROPERTY( int stepButton1 READ stepButton1 WRITE setStepButton1 ) - Q_PROPERTY( int stepButton2 READ stepButton2 WRITE setStepButton2 ) - Q_PROPERTY( int stepButton3 READ stepButton3 WRITE setStepButton3 ) - Q_PROPERTY( double value READ value WRITE setValue ) - Q_PROPERTY( bool editable READ editable WRITE setEditable ) - -public: - /*! - Button index - */ - - enum Button - { - Button1, - Button2, - Button3, - ButtonCnt - }; - - explicit QwtCounter(QWidget *parent = NULL); -#if QT_VERSION < 0x040000 - explicit QwtCounter(QWidget *parent, const char *name); -#endif - virtual ~QwtCounter(); - - bool editable() const; - void setEditable(bool); - - void setNumButtons(int n); - int numButtons() const; - - void setIncSteps(QwtCounter::Button btn, int nSteps); - int incSteps(QwtCounter::Button btn) const; - - virtual void setValue(double); - virtual QSize sizeHint() const; - - virtual void polish(); - - // a set of dummies to help the designer - - double step() const; - void setStep(double s); - double minVal() const; - void setMinValue(double m); - double maxVal() const; - void setMaxValue(double m); - void setStepButton1(int nSteps); - int stepButton1() const; - void setStepButton2(int nSteps); - int stepButton2() const; - void setStepButton3(int nSteps); - int stepButton3() const; - virtual double value() const; - -signals: - /*! - This signal is emitted when a button has been released - \param value The new value - */ - void buttonReleased (double value); - - /*! - This signal is emitted when the counter's value has changed - \param value The new value - */ - void valueChanged (double value); - -protected: - virtual bool event(QEvent *); - virtual void wheelEvent(QWheelEvent *); - virtual void keyPressEvent(QKeyEvent *); - virtual void rangeChange(); - -private slots: - void btnReleased(); - void btnClicked(); - void textChanged(); - -private: - void initCounter(); - void updateButtons(); - void showNum(double); - virtual void valueChange(); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_curve_fitter.h b/Code/qtiplot/3rdparty/qwt/src/qwt_curve_fitter.h deleted file mode 100644 index 773e1736a1cc99d38df72993819964e80722bcec..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_curve_fitter.h +++ /dev/null @@ -1,110 +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_CURVE_FITTER_H -#define QWT_CURVE_FITTER_H - -#include "qwt_global.h" -#include "qwt_double_rect.h" - -class QwtSpline; - -#if QT_VERSION >= 0x040000 -#include <QPolygonF> -#else -#include "qwt_array.h" -#endif - -// MOC_SKIP_BEGIN - -#if defined(QWT_TEMPLATEDLL) - -#if QT_VERSION < 0x040000 -#ifndef QWTARRAY_TEMPLATE_QWTDOUBLEPOINT // by mjo3 -#define QWTARRAY_TEMPLATE_QWTDOUBLEPOINT -template class QWT_EXPORT QwtArray<QwtDoublePoint>; -#endif //end of QWTARRAY_TEMPLATE_QWTDOUBLEPOINT -#endif - -#endif - -// MOC_SKIP_END - -/*! - \brief Abstract base class for a curve fitter -*/ -class QWT_EXPORT QwtCurveFitter -{ -public: - virtual ~QwtCurveFitter(); - -#if QT_VERSION < 0x040000 - virtual QwtArray<QwtDoublePoint> fitCurve( - const QwtArray<QwtDoublePoint>&) const = 0; -#else - virtual QPolygonF fitCurve(const QPolygonF &) const = 0; -#endif - -protected: - QwtCurveFitter(); - -private: - QwtCurveFitter( const QwtCurveFitter & ); - QwtCurveFitter &operator=( const QwtCurveFitter & ); -}; - -/*! - \brief A curve fitter using cubic splines -*/ -class QWT_EXPORT QwtSplineCurveFitter: public QwtCurveFitter -{ -public: - enum FitMode - { - Auto, - Spline, - ParametricSpline - }; - - QwtSplineCurveFitter(); - virtual ~QwtSplineCurveFitter(); - - void setFitMode(FitMode); - FitMode fitMode() const; - - void setSpline(const QwtSpline&); - const QwtSpline &spline() const; - QwtSpline &spline(); - - void setSplineSize(int size); - int splineSize() const; - -#if QT_VERSION < 0x040000 - virtual QwtArray<QwtDoublePoint> fitCurve( - const QwtArray<QwtDoublePoint> &) const; -#else - virtual QPolygonF fitCurve(const QPolygonF &) const; -#endif - -private: -#if QT_VERSION < 0x040000 - QwtArray<QwtDoublePoint> fitSpline( - const QwtArray<QwtDoublePoint> &) const; - QwtArray<QwtDoublePoint> fitParametric( - const QwtArray<QwtDoublePoint> &) const; -#else - QPolygonF fitSpline(const QPolygonF &) const; - QPolygonF fitParametric(const QPolygonF &) const; -#endif - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_data.h b/Code/qtiplot/3rdparty/qwt/src/qwt_data.h deleted file mode 100644 index 03b90bf7092efe08638f041390e92933c4619656..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_data.h +++ /dev/null @@ -1,166 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_DATA_H -#define QWT_DATA_H 1 - -#include "qwt_global.h" -#include "qwt_array.h" -#include "qwt_double_rect.h" -#if QT_VERSION >= 0x040000 -#include <QPolygonF> -#endif - -// MOC_SKIP_BEGIN - -#if defined(QWT_TEMPLATEDLL) - -template class QWT_EXPORT QwtArray<double>; - -#if QT_VERSION < 0x040000 -#ifndef QWTARRAY_TEMPLATE_QWTDOUBLEPOINT // by mjo3 -#define QWTARRAY_TEMPLATE_QWTDOUBLEPOINT -template class QWT_EXPORT QwtArray<QwtDoublePoint>; -#endif //end of QWTARRAY_TEMPLATE_QWTDOUBLEPOINT -#endif - -#endif - -// MOC_SKIP_END - -/*! - \brief QwtData defines an interface to any type of curve data. - - Classes, derived from QwtData may: - - store the data in almost any type of container - - calculate the data on the fly instead of storing it - */ - -class QWT_EXPORT QwtData -{ -public: - QwtData(); - virtual ~QwtData(); - - //! \return Pointer to a copy (virtual copy constructor) - virtual QwtData *copy() const = 0; - - //! \return Size of the data set - virtual size_t size() const = 0; - - /*! - Return the x value of data point i - \param i Index - \return x X value of data point i - */ - virtual double x(size_t i) const = 0; - /*! - Return the y value of data point i - \param i Index - \return y Y value of data point i - */ - virtual double y(size_t i) const = 0; - - virtual QwtDoubleRect boundingRect() const; - -protected: - /*! - Assignment operator (virtualized) - */ - QwtData &operator=(const QwtData &); -}; - - -/*! - \brief Data class containing a single QwtArray<QwtDoublePoint> object. - */ -class QWT_EXPORT QwtPolygonFData: public QwtData -{ -public: -#if QT_VERSION < 0x040000 - QwtPolygonFData(const QwtArray<QwtDoublePoint> &); -#else - QwtPolygonFData(const QPolygonF &); -#endif - - QwtPolygonFData &operator=(const QwtPolygonFData &); - virtual QwtData *copy() const; - - virtual size_t size() const; - virtual double x(size_t i) const; - virtual double y(size_t i) const; - -#if QT_VERSION < 0x040000 - const QwtArray<QwtDoublePoint> &data() const; -#else - const QPolygonF &data() const; -#endif - -private: -#if QT_VERSION < 0x040000 - QwtArray<QwtDoublePoint> d_data; -#else - QPolygonF d_data; -#endif -}; - -/*! - \brief Data class containing two QwtArray<double> objects. - */ - -class QWT_EXPORT QwtArrayData: public QwtData -{ -public: - QwtArrayData(const QwtArray<double> &x, const QwtArray<double> &y); - QwtArrayData(const double *x, const double *y, size_t size); - QwtArrayData &operator=(const QwtArrayData &); - virtual QwtData *copy() const; - - virtual size_t size() const; - virtual double x(size_t i) const; - virtual double y(size_t i) const; - - const QwtArray<double> &xData() const; - const QwtArray<double> &yData() const; - - virtual QwtDoubleRect boundingRect() const; - -private: - QwtArray<double> d_x; - QwtArray<double> d_y; -}; - -/*! - \brief Data class containing two pointers to memory blocks of doubles. - */ -class QWT_EXPORT QwtCPointerData: public QwtData -{ -public: - QwtCPointerData(const double *x, const double *y, size_t size); - QwtCPointerData &operator=(const QwtCPointerData &); - virtual QwtData *copy() const; - - virtual size_t size() const; - virtual double x(size_t i) const; - virtual double y(size_t i) const; - - const double *xData() const; - const double *yData() const; - - virtual QwtDoubleRect boundingRect() const; - -private: - const double *d_x; - const double *d_y; - size_t d_size; -}; - -#endif // !QWT_DATA diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_dial.h b/Code/qtiplot/3rdparty/qwt/src/qwt_dial.h deleted file mode 100644 index a0bfc7dccca15fa00745d995e69f7ef8072beb81..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_dial.h +++ /dev/null @@ -1,214 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_DIAL_H -#define QWT_DIAL_H 1 - -#include <qframe.h> -#include <qpalette.h> -#include "qwt_global.h" -#include "qwt_abstract_slider.h" -#include "qwt_round_scale_draw.h" - -class QwtDialNeedle; -class QwtDial; - -/*! - \brief A special scale draw made for QwtDial - - \sa QwtDial, QwtCompass -*/ -class QWT_EXPORT QwtDialScaleDraw: public QwtRoundScaleDraw -{ -public: - explicit QwtDialScaleDraw(QwtDial *); - virtual QwtText label(double value) const; - - void setPenWidth(uint); - uint penWidth() const; - -private: - QwtDial *d_parent; - int d_penWidth; -}; - -/*! - \brief QwtDial class provides a rounded range control. - - QwtDial is intended as base class for dial widgets like - speedometers, compass widgets, clocks ... - - \image html dials2.png - - A dial contains a scale and a needle indicating the current value - of the dial. Depending on Mode one of them is fixed and the - other is rotating. If not isReadOnly() the - dial can be rotated by dragging the mouse or using keyboard inputs - (see keyPressEvent()). A dial might be wrapping, what means - a rotation below/above one limit continues on the other limit (f.e compass). - The scale might cover any arc of the dial, its values are related to - the origin() of the dial. - - Qwt is missing a set of good looking needles (QwtDialNeedle). - Contributions are very welcome. - - \sa QwtCompass, QwtAnalogClock, QwtDialNeedle - \note The examples/dials example shows different types of dials. -*/ - -class QWT_EXPORT QwtDial: public QwtAbstractSlider -{ - Q_OBJECT - - Q_ENUMS(Shadow) - Q_ENUMS(Mode) - - Q_PROPERTY(bool visibleBackground READ hasVisibleBackground WRITE showBackground) - Q_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth) - Q_PROPERTY(Shadow frameShadow READ frameShadow WRITE setFrameShadow) - Q_PROPERTY(Mode mode READ mode WRITE setMode) - Q_PROPERTY(double origin READ origin WRITE setOrigin) - Q_PROPERTY(bool wrapping READ wrapping WRITE setWrapping) - - friend class QwtDialScaleDraw; -public: - - /*! - \brief Frame shadow - - Unfortunately it is not possible to use QFrame::Shadow - as a property of a widget that is not derived from QFrame. - The following enum is made for the designer only. It is safe - to use QFrame::Shadow instead. - */ - enum Shadow - { - Plain = QFrame::Plain, - Raised = QFrame::Raised, - Sunken = QFrame::Sunken - }; - - //! see QwtDial::setScaleOptions - enum ScaleOptions - { - ScaleBackbone = 1, - ScaleTicks = 2, - ScaleLabel = 4 - }; - - /*! - In case of RotateNeedle the needle is rotating, in case of - RotateScale, the needle points to origin() - and the scale is rotating. - */ - enum Mode - { - RotateNeedle, - RotateScale - }; - - explicit QwtDial( QWidget *parent = NULL); -#if QT_VERSION < 0x040000 - explicit QwtDial( QWidget *parent, const char *name); -#endif - - virtual ~QwtDial(); - - void setFrameShadow(Shadow); - Shadow frameShadow() const; - - bool hasVisibleBackground() const; - void showBackground(bool); - - void setLineWidth(int); - int lineWidth() const; - - void setMode(Mode); - Mode mode() const; - - virtual void setWrapping(bool); - bool wrapping() const; - - virtual void setScale(int maxMajIntv, int maxMinIntv, double step = 0.0); - - void setScaleArc(double min, double max); - void setScaleOptions(int); - void setScaleTicks(int minLen, int medLen, int majLen, int penWidth = 1); - - double minScaleArc() const; - double maxScaleArc() const; - - virtual void setOrigin(double); - double origin() const; - - virtual void setNeedle(QwtDialNeedle *); - const QwtDialNeedle *needle() const; - QwtDialNeedle *needle(); - - QRect boundingRect() const; - QRect contentsRect() const; - virtual QRect scaleContentsRect() const; - - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; - - virtual void setScaleDraw(QwtDialScaleDraw *); - - QwtDialScaleDraw *scaleDraw(); - const QwtDialScaleDraw *scaleDraw() const; - -protected: - virtual void paintEvent(QPaintEvent *); - virtual void resizeEvent(QResizeEvent *); - virtual void keyPressEvent(QKeyEvent *); - - virtual void updateMask(); - - virtual void drawFrame(QPainter *p); - virtual void drawContents(QPainter *) const; - virtual void drawFocusIndicator(QPainter *) const; - - virtual void drawScale(QPainter *, const QPoint ¢er, - int radius, double origin, double arcMin, double arcMax) const; - - /*! - Draw the contents inside the scale - - Paints nothing. - - \param painter Painter - \param center Center of the contents circle - \param radius Radius of the contents circle - */ - virtual void drawScaleContents(QPainter *painter, const QPoint ¢er, - int radius) const; - - virtual void drawNeedle(QPainter *, const QPoint &, - int radius, double direction, QPalette::ColorGroup) const; - - virtual QwtText scaleLabel(double) const; - void updateScale(); - - virtual void rangeChange(); - virtual void valueChange(); - - virtual double getValue(const QPoint &); - virtual void getScrollMode(const QPoint &, - int &scrollMode, int &direction); - -private: - void initDial(); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_dial_needle.h b/Code/qtiplot/3rdparty/qwt/src/qwt_dial_needle.h deleted file mode 100644 index b8dba4e419539cded5f69fff6fab8656ccd29df5..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_dial_needle.h +++ /dev/null @@ -1,198 +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_DIAL_NEEDLE_H -#define QWT_DIAL_NEEDLE_H 1 - -#include <qpalette.h> -#include "qwt_global.h" - -class QPainter; -class QPoint; - -/*! - \brief Base class for needles that can be used in a QwtDial. - - QwtDialNeedle is a pointer that indicates a value by pointing - to a specific direction. - - Qwt is missing a set of good looking needles. - Contributions are very welcome. - - \sa QwtDial, QwtCompass -*/ - -class QWT_EXPORT QwtDialNeedle -{ -public: - QwtDialNeedle(); - virtual ~QwtDialNeedle(); - - /*! - Draw the needle - - \param painter Painter - \param center Center of the dial, start position for the needle - \param length Length of the needle - \param direction Direction of the needle, in degrees counter clockwise - \param cg Color group, used for painting - */ - virtual void draw(QPainter *painter, const QPoint ¢er, - int length, double direction, - QPalette::ColorGroup cg = QPalette::Active) const = 0; - - virtual void setPalette(const QPalette &); - const QPalette &palette() const; - -protected: - static void drawKnob(QPainter *, const QPoint &pos, - int width, const QBrush &, bool sunken); - -private: - QPalette d_palette; -}; - -/*! - \brief A needle for dial widgets - - The following colors are used: - - QColorGroup::Mid\n - Pointer - - QColorGroup::base\n - Knob - - \sa QwtDial, QwtCompass -*/ - -class QWT_EXPORT QwtDialSimpleNeedle: public QwtDialNeedle -{ -public: - //! Style of the needle - enum Style - { - Arrow, - Ray - }; - - QwtDialSimpleNeedle(Style, bool hasKnob = true, - const QColor &mid = Qt::gray, const QColor &base = Qt::darkGray); - - virtual void draw(QPainter *, const QPoint &, int length, - double direction, QPalette::ColorGroup = QPalette::Active) const; - - static void drawArrowNeedle(QPainter *, - const QPalette&, QPalette::ColorGroup, - const QPoint &, int length, int width, double direction, - bool hasKnob); - - static void drawRayNeedle(QPainter *, - const QPalette&, QPalette::ColorGroup, - const QPoint &, int length, int width, double direction, - bool hasKnob); - - void setWidth(int width); - int width() const; - -private: - Style d_style; - bool d_hasKnob; - int d_width; -}; - -/*! - \brief A magnet needle for compass widgets - - A magnet needle points to two opposite directions indicating - north and south. - - The following colors are used: - - QColorGroup::Light\n - Used for pointing south - - QColorGroup::Dark\n - Used for pointing north - - QColorGroup::Base\n - Knob (ThinStyle only) - - \sa QwtDial, QwtCompass -*/ - -class QWT_EXPORT QwtCompassMagnetNeedle: public QwtDialNeedle -{ -public: - //! Style of the needle - enum Style - { - TriangleStyle, - ThinStyle - }; - QwtCompassMagnetNeedle(Style = TriangleStyle, - const QColor &light = Qt::white, const QColor &dark = Qt::red); - - virtual void draw(QPainter *, const QPoint &, int length, - double direction, QPalette::ColorGroup = QPalette::Active) const; - - static void drawTriangleNeedle(QPainter *, - const QPalette &, QPalette::ColorGroup, - const QPoint &, int length, double direction); - - static void drawThinNeedle(QPainter *, - const QPalette &, QPalette::ColorGroup, - const QPoint &, int length, double direction); - -protected: - static void drawPointer(QPainter *painter, const QBrush &brush, - int colorOffset, const QPoint ¢er, - int length, int width, double direction); - -private: - Style d_style; -}; - -/*! - \brief An indicator for the wind direction - - QwtCompassWindArrow shows the direction where the wind comes from. - - - QColorGroup::Light\n - Used for Style1, or the light half of Style2 - - QColorGroup::Dark\n - Used for the dark half of Style2 - - \sa QwtDial, QwtCompass -*/ - -class QWT_EXPORT QwtCompassWindArrow: public QwtDialNeedle -{ -public: - //! Style of the arrow - enum Style - { - Style1, - Style2 - }; - - QwtCompassWindArrow(Style, const QColor &light = Qt::white, - const QColor &dark = Qt::gray); - - virtual void draw(QPainter *, const QPoint &, int length, - double direction, QPalette::ColorGroup = QPalette::Active) const; - - static void drawStyle1Needle(QPainter *, - const QPalette &, QPalette::ColorGroup, - const QPoint &, int length, double direction); - - static void drawStyle2Needle(QPainter *, - const QPalette &, QPalette::ColorGroup, - const QPoint &, int length, double direction); - -private: - Style d_style; -}; - -#endif // QWT_DIAL_NEEDLE_H diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_double_interval.h b/Code/qtiplot/3rdparty/qwt/src/qwt_double_interval.h deleted file mode 100644 index 43aff2c4fa408b923a6cfe3b73749ae7a9839029..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_double_interval.h +++ /dev/null @@ -1,217 +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_DOUBLE_INTERVAL_H -#define QWT_DOUBLE_INTERVAL_H - -#include "qwt_global.h" - -/*! - \brief A class representing an interval - - The interval is represented by 2 doubles, the lower and the upper limit. -*/ - -class QWT_EXPORT QwtDoubleInterval -{ -public: - inline QwtDoubleInterval(); - inline QwtDoubleInterval(double minValue, double maxValue); - - inline void setInterval(double minValue, double maxValue); - - QwtDoubleInterval normalized() const; - QwtDoubleInterval inverted() const; - QwtDoubleInterval limited(double minValue, double maxValue) const; - - inline int operator==(const QwtDoubleInterval &) const; - inline int operator!=(const QwtDoubleInterval &) const; - - inline double minValue() const; - inline double maxValue() const; - - inline double width() const; - - inline void setMinValue(double); - inline void setMaxValue(double); - - bool contains(double value) const; - - bool intersects(const QwtDoubleInterval &) const; - QwtDoubleInterval intersect(const QwtDoubleInterval &) const; - QwtDoubleInterval unite(const QwtDoubleInterval &) const; - - inline QwtDoubleInterval operator|(const QwtDoubleInterval &) const; - inline QwtDoubleInterval operator&(const QwtDoubleInterval &) const; - - QwtDoubleInterval &operator|=(const QwtDoubleInterval &); - QwtDoubleInterval &operator&=(const QwtDoubleInterval &); - - QwtDoubleInterval extend(double value) const; - inline QwtDoubleInterval operator|(double) const; - QwtDoubleInterval &operator|=(double); - - inline bool isValid() const; - inline bool isNull() const; - inline void invalidate(); - - QwtDoubleInterval symmetrize(double value) const; - -private: - double d_minValue; - double d_maxValue; -}; - -/*! - \brief Default Constructor - - Creates an invalid interval [0.0, -1.0] - \sa setInterval, isValid -*/ -inline QwtDoubleInterval::QwtDoubleInterval(): - d_minValue(0.0), - d_maxValue(-1.0) -{ -} - -/*! - Constructor - - \param minValue Minimum value - \param maxValue Maximum value -*/ -inline QwtDoubleInterval::QwtDoubleInterval(double minValue, double maxValue): - d_minValue(minValue), - d_maxValue(maxValue) -{ -} - -/*! - Assign the limits of the interval - - \param minValue Minimum value - \param maxValue Maximum value -*/ -inline void QwtDoubleInterval::setInterval(double minValue, double maxValue) -{ - d_minValue = minValue; - d_maxValue = maxValue; -} - -/*! - Assign the lower limit of the interval - - \param minValue Minimum value -*/ -inline void QwtDoubleInterval::setMinValue(double minValue) -{ - d_minValue = minValue; -} - -/*! - Assign the upper limit of the interval - - \param maxValue Maximum value -*/ -inline void QwtDoubleInterval::setMaxValue(double maxValue) -{ - d_maxValue = maxValue; -} - -//! \return Lower limit of the interval -inline double QwtDoubleInterval::minValue() const -{ - return d_minValue; -} - -//! \return Upper limit of the interval -inline double QwtDoubleInterval::maxValue() const -{ - return d_maxValue; -} - -/*! - Return the width of an interval - The width of invalid intervals is 0.0, otherwise the result is - maxValue() - minValue(). - - \sa isValid -*/ -inline double QwtDoubleInterval::width() const -{ - return isValid() ? (d_maxValue - d_minValue) : 0.0; -} - -/*! - Intersection of two intervals - \sa intersect -*/ -inline QwtDoubleInterval QwtDoubleInterval::operator&( - const QwtDoubleInterval &interval ) const -{ - return intersect(interval); -} - -/*! - Union of two intervals - \sa unite -*/ -inline QwtDoubleInterval QwtDoubleInterval::operator|( - const QwtDoubleInterval &interval) const -{ - return unite(interval); -} - -//! Compare two intervals -inline int QwtDoubleInterval::operator==(const QwtDoubleInterval &other) const -{ - return (d_minValue == other.d_minValue) && - (d_maxValue == other.d_maxValue); -} - -//! Compare two intervals -inline int QwtDoubleInterval::operator!=(const QwtDoubleInterval &other) const -{ - return (!(*this == other)); -} - -/*! - Extend an interval - \sa extend -*/ -inline QwtDoubleInterval QwtDoubleInterval::operator|(double value) const -{ - return extend(value); -} - -//! \return true, if minValue() >= maxValue() -inline bool QwtDoubleInterval::isNull() const -{ - return d_minValue >= d_maxValue; -} - -//! \return true, if minValue() <= maxValue() -inline bool QwtDoubleInterval::isValid() const -{ - return d_minValue <= d_maxValue; -} - -/*! - Invalidate the interval - - The limits are set to interval [0.0, -1.0] - \sa isValid -*/ -inline void QwtDoubleInterval::invalidate() -{ - d_minValue = 0.0; - d_maxValue = -1.0; -} - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_double_range.h b/Code/qtiplot/3rdparty/qwt/src/qwt_double_range.h deleted file mode 100644 index 2f9d7da2a9debe8c55ef2e044c36f770cf26c962..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_double_range.h +++ /dev/null @@ -1,88 +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_DOUBLE_RANGE_H -#define QWT_DOUBLE_RANGE_H - -#include "qwt_global.h" - -/*! - \brief A class which controls a value within an interval - - This class is useful as a base class or a member for sliders. - It represents an interval of type double within which a value can - be moved. The value can be either an arbitrary point inside - the interval (see QwtDoubleRange::setValue), or it can be fitted - into a step raster (see QwtDoubleRange::fitValue and - QwtDoubleRange::incValue). - - As a special case, a QwtDoubleRange can be periodic, which means that - a value outside the interval will be mapped to a value inside the - interval when QwtDoubleRange::setValue(), QwtDoubleRange::fitValue(), - QwtDoubleRange::incValue() or QwtDoubleRange::incPages() are called. -*/ - -class QWT_EXPORT QwtDoubleRange -{ -public: - QwtDoubleRange(); - virtual ~QwtDoubleRange(); - - void setRange(double vmin, double vmax, double vstep = 0.0, - int pagesize = 1); - - void setValid(bool); - bool isValid() const; - - virtual void setValue(double); - double value() const; - - void setPeriodic(bool tf); - bool periodic() const; - - void setStep(double); - double step() const; - - double maxValue() const; - double minValue() const; - - int pageSize() const; - - virtual void incValue(int); - virtual void incPages(int); - virtual void fitValue(double); - -protected: - - double exactValue() const; - double exactPrevValue() const; - double prevValue() const; - - virtual void valueChange(); - virtual void stepChange(); - virtual void rangeChange(); - -private: - void setNewValue(double x, bool align = false); - - double d_minValue; - double d_maxValue; - double d_step; - int d_pageSize; - - bool d_isValid; - double d_value; - double d_exactValue; - double d_exactPrevValue; - double d_prevValue; - - bool d_periodic; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_double_rect.h b/Code/qtiplot/3rdparty/qwt/src/qwt_double_rect.h deleted file mode 100644 index f122e9a96b922ec857c2db467e054ea676ca1742..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_double_rect.h +++ /dev/null @@ -1,501 +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 - *****************************************************************************/ - -/*! \file */ -#ifndef QWT_DOUBLE_RECT_H -#define QWT_DOUBLE_RECT_H 1 - -#include "qwt_global.h" -#include "qwt_array.h" - -#if QT_VERSION >= 0x040000 - -#include <QPointF> -#include <QSizeF> -#include <QRectF> - -/*! - \typedef QPointF QwtDoublePoint - \brief This is a typedef, see Trolltech Documentation for QPointF - in QT assistant 4.x. As soon as Qt3 compatibility is dropped - this typedef will disappear. -*/ -typedef QPointF QwtDoublePoint; - -/*! - \typedef QSizeF QwtDoubleSize - \brief This is a typedef, see Trolltech Documentation for QSizeF - in QT assistant 4.x. As soon as Qt3 compatibility is dropped - this typedef will disappear. -*/ -typedef QSizeF QwtDoubleSize; - -/*! - \typedef QRectF QwtDoubleRect - \brief This is a typedef, see Trolltech Documentation for QRectF - in QT assistant 4.x. As soon as Qt3 compatibility is dropped - this typedef will disappear. -*/ -typedef QRectF QwtDoubleRect; - -#else - -#include <qpoint.h> -#include <qsize.h> -#include <qrect.h> - -/*! - \brief The QwtDoublePoint class defines a point in double coordinates -*/ - -class QWT_EXPORT QwtDoublePoint -{ -public: - QwtDoublePoint(); - QwtDoublePoint(double x, double y); - QwtDoublePoint(const QPoint &); - - QPoint toPoint() const; - - bool isNull() const; - - double x() const; - double y() const; - - double &rx(); - double &ry(); - - void setX(double x); - void setY(double y); - - bool operator==(const QwtDoublePoint &) const; - bool operator!=(const QwtDoublePoint &) const; - - const QwtDoublePoint operator-() const; - const QwtDoublePoint operator+(const QwtDoublePoint &) const; - const QwtDoublePoint operator-(const QwtDoublePoint &) const; - const QwtDoublePoint operator*(double) const; - const QwtDoublePoint operator/(double) const; - - QwtDoublePoint &operator+=(const QwtDoublePoint &); - QwtDoublePoint &operator-=(const QwtDoublePoint &); - QwtDoublePoint &operator*=(double); - QwtDoublePoint &operator/=(double); - -private: - double d_x; - double d_y; -}; - -/*! - The QwtDoubleSize class defines a size in double coordinates -*/ - -class QWT_EXPORT QwtDoubleSize -{ -public: - QwtDoubleSize(); - QwtDoubleSize(double width, double height); - QwtDoubleSize(const QSize &); - - bool isNull() const; - bool isEmpty() const; - bool isValid() const; - - double width() const; - double height() const; - void setWidth( double w ); - void setHeight( double h ); - void transpose(); - - QwtDoubleSize expandedTo(const QwtDoubleSize &) const; - QwtDoubleSize boundedTo(const QwtDoubleSize &) const; - - bool operator==(const QwtDoubleSize &) const; - bool operator!=(const QwtDoubleSize &) const; - - const QwtDoubleSize operator+(const QwtDoubleSize &) const; - const QwtDoubleSize operator-(const QwtDoubleSize &) const; - const QwtDoubleSize operator*(double) const; - const QwtDoubleSize operator/(double) const; - - QwtDoubleSize &operator+=(const QwtDoubleSize &); - QwtDoubleSize &operator-=(const QwtDoubleSize &); - QwtDoubleSize &operator*=(double c); - QwtDoubleSize &operator/=(double c); - -private: - double d_width; - double d_height; -}; - -/*! - The QwtDoubleRect class defines a size in double coordinates. -*/ - -class QWT_EXPORT QwtDoubleRect -{ -public: - QwtDoubleRect(); - QwtDoubleRect(double left, double top, double width, double height); - QwtDoubleRect(const QwtDoublePoint&, const QwtDoubleSize &); - - QwtDoubleRect(const QRect &); - QRect toRect() const; - - bool isNull() const; - bool isEmpty() const; - bool isValid() const; - - QwtDoubleRect normalized() const; - - double x() const; - double y() const; - - double left() const; - double right() const; - double top() const; - double bottom() const; - - void setX(double); - void setY(double); - - void setLeft(double); - void setRight(double); - void setTop(double); - void setBottom(double); - - QwtDoublePoint center() const; - - void moveLeft(double x); - void moveRight(double x); - void moveTop(double y ); - void moveBottom(double y ); - void moveTo(double x, double y); - void moveTo(const QwtDoublePoint &); - void moveBy(double dx, double dy); - void moveCenter(const QwtDoublePoint &); - void moveCenter(double dx, double dy); - - void setRect(double x1, double x2, double width, double height); - - double width() const; - double height() const; - QwtDoubleSize size() const; - - void setWidth(double w ); - void setHeight(double h ); - void setSize(const QwtDoubleSize &); - - QwtDoubleRect operator|(const QwtDoubleRect &r) const; - QwtDoubleRect operator&(const QwtDoubleRect &r) const; - QwtDoubleRect &operator|=(const QwtDoubleRect &r); - QwtDoubleRect &operator&=(const QwtDoubleRect &r); - bool operator==( const QwtDoubleRect &) const; - bool operator!=( const QwtDoubleRect &) const; - - bool contains(const QwtDoublePoint &p, bool proper = false) const; - bool contains(double x, double y, bool proper = false) const; - bool contains(const QwtDoubleRect &r, bool proper=false) const; - - QwtDoubleRect unite(const QwtDoubleRect &) const; - QwtDoubleRect intersect(const QwtDoubleRect &) const; - bool intersects(const QwtDoubleRect &) const; - - QwtDoublePoint bottomRight() const; - QwtDoublePoint topRight() const; - QwtDoublePoint topLeft() const; - QwtDoublePoint bottomLeft() const; - -private: - double d_left; - double d_right; - double d_top; - double d_bottom; -}; - -/*! - Returns true if the point is null; otherwise returns false. - - A point is considered to be null if both the x- and y-coordinates - are equal to zero. -*/ -inline bool QwtDoublePoint::isNull() const -{ - return d_x == 0.0 && d_y == 0.0; -} - -//! Returns the x-coordinate of the point. -inline double QwtDoublePoint::x() const -{ - return d_x; -} - -//! Returns the y-coordinate of the point. -inline double QwtDoublePoint::y() const -{ - return d_y; -} - -//! Returns a reference to the x-coordinate of the point. -inline double &QwtDoublePoint::rx() -{ - return d_x; -} - -//! Returns a reference to the y-coordinate of the point. -inline double &QwtDoublePoint::ry() -{ - return d_y; -} - -//! Sets the x-coordinate of the point to the value specified by x. -inline void QwtDoublePoint::setX(double x) -{ - d_x = x; -} - -//! Sets the y-coordinate of the point to the value specified by y. -inline void QwtDoublePoint::setY(double y) -{ - d_y = y; -} - -/*! - Rounds the coordinates of this point to the nearest integer and - returns a QPoint with these rounded coordinates. -*/ -inline QPoint QwtDoublePoint::toPoint() const -{ - return QPoint(qRound(d_x), qRound(d_y)); -} - -/*! - Returns true if the width is 0 and the height is 0; - otherwise returns false. -*/ -inline bool QwtDoubleSize::isNull() const -{ - return d_width == 0.0 && d_height == 0.0; -} - -/*! - Returns true if the width is <= 0.0 or the height is <= 0.0, - otherwise false. -*/ -inline bool QwtDoubleSize::isEmpty() const -{ - return d_width <= 0.0 || d_height <= 0.0; -} - -/*! - Returns true if the width is equal to or greater than 0.0 and the height - is equal to or greater than 0.0; otherwise returns false. -*/ -inline bool QwtDoubleSize::isValid() const -{ - return d_width >= 0.0 && d_height >= 0.0; -} - -//! Returns the width. -inline double QwtDoubleSize::width() const -{ - return d_width; -} - -//! Returns the height. -inline double QwtDoubleSize::height() const -{ - return d_height; -} - -//! Sets the width to width. -inline void QwtDoubleSize::setWidth(double width) -{ - d_width = width; -} - -//! Sets the height to height. -inline void QwtDoubleSize::setHeight(double height) -{ - d_height = height; -} - -/*! - Returns true if the rectangle is a null rectangle; otherwise returns false. - A null rectangle has both the width and the height set to 0. - A null rectangle is also empty and invalid. - - \sa QwtDoubleRect::isEmpty, QwtDoubleRect::isValid -*/ -inline bool QwtDoubleRect::isNull() const -{ - return d_right == d_left && d_bottom == d_top; -} - -/*! - Returns true if the rectangle is empty; otherwise returns false. - An empty rectangle has a width() <= 0 or height() <= 0. - An empty rectangle is not valid. isEmpty() == !isValid() - - \sa QwtDoubleRect::isNull, QwtDoubleRect::isValid -*/ -inline bool QwtDoubleRect::isEmpty() const -{ - return d_left >= d_right || d_top >= d_bottom; -} - -/*! - Returns true if the rectangle is valid; otherwise returns false. - A valid rectangle has a width() > 0 and height() > 0. - Note that non-trivial operations like intersections are not defined - for invalid rectangles. isValid() == !isEmpty() - - \sa isNull(), isEmpty(), and normalized(). -*/ -inline bool QwtDoubleRect::isValid() const -{ - return d_left < d_right && d_top < d_bottom; -} - -//! Returns x -inline double QwtDoubleRect::x() const -{ - return d_left; -} - -//! Returns y -inline double QwtDoubleRect::y() const -{ - return d_top; -} - -//! Returns left -inline double QwtDoubleRect::left() const -{ - return d_left; -} - -//! Returns right -inline double QwtDoubleRect::right() const -{ - return d_right; -} - -//! Returns top -inline double QwtDoubleRect::top() const -{ - return d_top; -} - -//! Returns bottom -inline double QwtDoubleRect::bottom() const -{ - return d_bottom; -} - -//! Set left -inline void QwtDoubleRect::setX(double x) -{ - d_left = x; -} - -//! Set left -inline void QwtDoubleRect::setY(double y) -{ - d_top = y; -} - -//! Set left -inline void QwtDoubleRect::setLeft(double x) -{ - d_left = x; -} - -//! Set right -inline void QwtDoubleRect::setRight(double x) -{ - d_right = x; -} - -//! Set top -inline void QwtDoubleRect::setTop(double y) -{ - d_top = y; -} - -//! Set bottom -inline void QwtDoubleRect::setBottom(double y) -{ - d_bottom = y; -} - -//! Returns the width -inline double QwtDoubleRect::width() const -{ - return d_right - d_left; -} - -//! Returns the height -inline double QwtDoubleRect::height() const -{ - return d_bottom - d_top; -} - -//! Returns the size -inline QwtDoubleSize QwtDoubleRect::size() const -{ - return QwtDoubleSize(width(), height()); -} - -//! Set the width, by right = left + w; -inline void QwtDoubleRect::setWidth(double w) -{ - d_right = d_left + w; -} - -//! Set the height, by bottom = top + h; -inline void QwtDoubleRect::setHeight(double h) -{ - d_bottom = d_top + h; -} - -/*! - Moves the top left corner of the rectangle to p, - without changing the rectangles size. -*/ -inline void QwtDoubleRect::moveTo(const QwtDoublePoint &p) -{ - moveTo(p.x(), p.y()); -} - -inline QwtDoublePoint QwtDoubleRect::bottomRight() const -{ - return QwtDoublePoint(bottom(), right()); -} - -inline QwtDoublePoint QwtDoubleRect::topRight() const -{ - return QwtDoublePoint(top(), right()); -} - -inline QwtDoublePoint QwtDoubleRect::topLeft() const -{ - return QwtDoublePoint(top(), left()); -} - -inline QwtDoublePoint QwtDoubleRect::bottomLeft() const -{ - return QwtDoublePoint(bottom(), left()); -} - - -#endif // QT_VERSION < 0x040000 - -#endif // QWT_DOUBLE_RECT_H diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_dyngrid_layout.h b/Code/qtiplot/3rdparty/qwt/src/qwt_dyngrid_layout.h deleted file mode 100644 index 0fa1cc22dcd99f7984296025a39de7cc53b194d0..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_dyngrid_layout.h +++ /dev/null @@ -1,107 +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_DYNGRID_LAYOUT_H -#define QWT_DYNGRID_LAYOUT_H - -#include <qlayout.h> -#include <qsize.h> -#if QT_VERSION >= 0x040000 -#include <qlist.h> -#else -#include <qvaluelist.h> -#endif -#include "qwt_global.h" -#include "qwt_array.h" - -/*! - \brief The QwtDynGridLayout class lays out widgets in a grid, - adjusting the number of columns and rows to the current size. - - QwtDynGridLayout takes the space it gets, divides it up into rows and - columns, and puts each of the widgets it manages into the correct cell(s). - It lays out as many number of columns as possible (limited by maxCols()). -*/ - -class QWT_EXPORT QwtDynGridLayout : public QLayout -{ - Q_OBJECT -public: - explicit QwtDynGridLayout(QWidget *, int margin = 0, int space = -1); -#if QT_VERSION < 0x040000 - explicit QwtDynGridLayout(QLayout *, int space = -1); -#endif - explicit QwtDynGridLayout(int space = -1); - - virtual ~QwtDynGridLayout(); - - virtual void invalidate(); - - void setMaxCols(uint maxCols); - uint maxCols() const; - - uint numRows () const; - uint numCols () const; - - virtual void addItem(QLayoutItem *); - -#if QT_VERSION >= 0x040000 - virtual QLayoutItem *itemAt( int index ) const; - virtual QLayoutItem *takeAt( int index ); - virtual int count() const; - - void setExpandingDirections(Qt::Orientations); - virtual Qt::Orientations expandingDirections() const; - QList<QRect> layoutItems(const QRect &, uint numCols) const; -#else - virtual QLayoutIterator iterator(); - - void setExpanding(QSizePolicy::ExpandData); - virtual QSizePolicy::ExpandData expanding() const; - QValueList<QRect> layoutItems(const QRect &, uint numCols) const; -#endif - - virtual int maxItemWidth() const; - - virtual void setGeometry(const QRect &rect); - - virtual bool hasHeightForWidth() const; - virtual int heightForWidth(int) const; - - virtual QSize sizeHint() const; - - virtual bool isEmpty() const; - uint itemCount() const; - - virtual uint columnsForWidth(int width) const; - -protected: - - void layoutGrid(uint numCols, - QwtArray<int>& rowHeight, QwtArray<int>& colWidth) const; - void stretchGrid(const QRect &rect, uint numCols, - QwtArray<int>& rowHeight, QwtArray<int>& colWidth) const; - - -private: - void init(); - int maxRowWidth(int numCols) const; - void updateLayoutCache(); - -#if QT_VERSION < 0x040000 -// xlC 5.1, the IBM/AIX C++ compiler, needs it to be public -public: -#endif - class PrivateData; - -private: - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_event_pattern.h b/Code/qtiplot/3rdparty/qwt/src/qwt_event_pattern.h deleted file mode 100644 index 546f3da6744a764ddbfdc22175b57a17a0d668c8..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_event_pattern.h +++ /dev/null @@ -1,221 +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_EVENT_PATTERN -#define QWT_EVENT_PATTERN 1 - -#include <qnamespace.h> -#include "qwt_array.h" - -class QMouseEvent; -class QKeyEvent; - -/*! - \brief A collection of event patterns - - QwtEventPattern introduces an level of indirection for mouse and - keyboard inputs. Those are represented by symbolic names, so - the application code can be configured by individual mappings. - - \sa QwtPicker, QwtPickerMachine, QwtPlotZoomer -*/ -class QWT_EXPORT QwtEventPattern -{ -public: - /*! - \brief Symbolic mouse input codes - - The default initialization for 3 button mice is: - - MouseSelect1\n - Qt::LeftButton - - MouseSelect2\n - Qt::RightButton - - MouseSelect3\n - Qt::MidButton - - MouseSelect4\n - Qt::LeftButton + Qt::ShiftButton - - MouseSelect5\n - Qt::RightButton + Qt::ShiftButton - - MouseSelect6\n - Qt::MidButton + Qt::ShiftButton - - The default initialization for 2 button mice is: - - MouseSelect1\n - Qt::LeftButton - - MouseSelect2\n - Qt::RightButton - - MouseSelect3\n - Qt::LeftButton + Qt::AltButton - - MouseSelect4\n - Qt::LeftButton + Qt::ShiftButton - - MouseSelect5\n - Qt::RightButton + Qt::ShiftButton - - MouseSelect6\n - Qt::LeftButton + Qt::AltButton + Qt::ShiftButton - - The default initialization for 1 button mice is: - - MouseSelect1\n - Qt::LeftButton - - MouseSelect2\n - Qt::LeftButton + Qt::ControlButton - - MouseSelect3\n - Qt::LeftButton + Qt::AltButton - - MouseSelect4\n - Qt::LeftButton + Qt::ShiftButton - - MouseSelect5\n - Qt::LeftButton + Qt::ControlButton + Qt::ShiftButton - - MouseSelect6\n - Qt::LeftButton + Qt::AltButton + Qt::ShiftButton - - \sa initMousePattern() - */ - - enum MousePatternCode - { - MouseSelect1, - MouseSelect2, - MouseSelect3, - MouseSelect4, - MouseSelect5, - MouseSelect6, - - MousePatternCount - }; - - /*! - \brief Symbolic keyboard input codes - - Default initialization: - - KeySelect1\n - Qt::Key_Return - - KeySelect2\n - Qt::Key_Space - - KeyAbort\n - Qt::Key_Escape - - - KeyLeft\n - Qt::Key_Left - - KeyRight\n - Qt::Key_Right - - KeyUp\n - Qt::Key_Up - - KeyDown\n - Qt::Key_Down - - - KeyUndo\n - Qt::Key_Minus - - KeyRedo\n - Qt::Key_Plus - - KeyHome\n - Qt::Key_Escape - */ - enum KeyPatternCode - { - KeySelect1, - KeySelect2, - KeyAbort, - - KeyLeft, - KeyRight, - KeyUp, - KeyDown, - - KeyRedo, - KeyUndo, - KeyHome, - - KeyPatternCount - }; - - //! A pattern for mouse events - class MousePattern - { - public: - MousePattern(int btn = Qt::NoButton, int st = Qt::NoButton) - { - button = btn; - state = st; - } - - int button; - int state; - }; - - //! A pattern for key events - class KeyPattern - { - public: - KeyPattern(int k = 0, int st = Qt::NoButton) - { - key = k; - state = st; - } - - int key; - int state; - }; - - QwtEventPattern(); - virtual ~QwtEventPattern(); - - void initMousePattern(int numButtons); - void initKeyPattern(); - - void setMousePattern(uint pattern, int button, int state = Qt::NoButton); - void setKeyPattern(uint pattern, int key, int state = Qt::NoButton); - - void setMousePattern(const QwtArray<MousePattern> &); - void setKeyPattern(const QwtArray<KeyPattern> &); - - const QwtArray<MousePattern> &mousePattern() const; - const QwtArray<KeyPattern> &keyPattern() const; - - QwtArray<MousePattern> &mousePattern(); - QwtArray<KeyPattern> &keyPattern(); - - bool mouseMatch(uint pattern, const QMouseEvent *) const; - bool keyMatch(uint pattern, const QKeyEvent *) const; - -protected: - virtual bool mouseMatch(const MousePattern &, const QMouseEvent *) const; - virtual bool keyMatch(const KeyPattern &, const QKeyEvent *) const; - -private: - -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable: 4251) -#endif - QwtArray<MousePattern> d_mousePattern; - QwtArray<KeyPattern> d_keyPattern; -#if defined(_MSC_VER) -#pragma warning(pop) -#endif -}; - -inline bool operator==(QwtEventPattern::MousePattern b1, - QwtEventPattern::MousePattern b2) -{ - return b1.button == b2.button && b1.state == b2.state; -} - -inline bool operator==(QwtEventPattern::KeyPattern b1, - QwtEventPattern::KeyPattern b2) -{ - return b1.key == b2.key && b1.state == b2.state; -} - -#if defined(QWT_TEMPLATEDLL) -// MOC_SKIP_BEGIN -template class QWT_EXPORT QwtArray<QwtEventPattern::MousePattern>; -template class QWT_EXPORT QwtArray<QwtEventPattern::KeyPattern>; -// MOC_SKIP_END -#endif - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_global.h b/Code/qtiplot/3rdparty/qwt/src/qwt_global.h deleted file mode 100644 index cd64becbbb17adeeb03d6e7f8e12a50cda2c7377..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_global.h +++ /dev/null @@ -1,51 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_GLOBAL_H -#define QWT_GLOBAL_H - -#include <qglobal.h> -#if QT_VERSION < 0x040000 -#include <qmodules.h> -#endif - -// QWT_VERSION is (major << 16) + (minor << 8) + patch. - -#define QWT_VERSION 0x050100 -#define QWT_VERSION_STR "5.1.0" - -#if defined(Q_WS_WIN) - -#if defined(_MSC_VER) /* MSVC Compiler */ -/* template-class specialization 'identifier' is already instantiated */ -#pragma warning(disable: 4660) -#endif // _MSC_VER - -#ifdef QWT_DLL - -#if defined(QWT_MAKEDLL) // create a Qwt DLL library -#define QWT_EXPORT __declspec(dllexport) -#define QWT_TEMPLATEDLL -#else // use a Qwt DLL library -#define QWT_EXPORT __declspec(dllimport) -#endif - -#endif // QWT_DLL - -#endif // Q_WS_WIN - -#ifndef QWT_EXPORT -#define QWT_EXPORT -#endif - -// #define QWT_NO_COMPAT 1 // disable withdrawn functionality - -#endif // QWT_GLOBAL_H diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_interval_data.h b/Code/qtiplot/3rdparty/qwt/src/qwt_interval_data.h deleted file mode 100644 index df2433fe7408749fecdb315ff08fa97a0a996cd7..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_interval_data.h +++ /dev/null @@ -1,70 +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_INTERVAL_DATA_H -#define QWT_INTERVAL_DATA_H 1 - -#include "qwt_global.h" -#include "qwt_math.h" -#include "qwt_array.h" -#include "qwt_double_interval.h" -#include "qwt_double_rect.h" - -#if defined(_MSC_VER) && (_MSC_VER > 1310) -#include <string.h> -#endif - -#if defined(QWT_TEMPLATEDLL) -// MOC_SKIP_BEGIN -template class QWT_EXPORT QwtArray<QwtDoubleInterval>; -template class QWT_EXPORT QwtArray<double>; -// MOC_SKIP_END -#endif - -/*! - \brief Interval data class. - -*/ -class QWT_EXPORT QwtIntervalData -{ -public: - QwtIntervalData(); - QwtIntervalData(const QwtArray<QwtDoubleInterval> &, - const QwtArray<double> &); - - void setData(const QwtArray<QwtDoubleInterval> &, - const QwtArray<double> &); - - size_t size() const; - const QwtDoubleInterval &interval(size_t i) const; - double value(size_t i) const; - - QwtDoubleRect boundingRect() const; - -private: - QwtArray<QwtDoubleInterval> d_intervals; - QwtArray<double> d_values; -}; - -inline size_t QwtIntervalData::size() const -{ - return qwtMin(d_intervals.size(), d_values.size()); -} - -inline const QwtDoubleInterval &QwtIntervalData::interval(size_t i) const -{ - return d_intervals[int(i)]; -} - -inline double QwtIntervalData::value(size_t i) const -{ - return d_values[int(i)]; -} - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_knob.h b/Code/qtiplot/3rdparty/qwt/src/qwt_knob.h deleted file mode 100644 index 41ec1bdd988a4602d1a6bced83065cca4d76360c..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_knob.h +++ /dev/null @@ -1,100 +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_KNOB_H -#define QWT_KNOB_H - -#include "qwt_global.h" -#include "qwt_abstract_slider.h" -#include "qwt_abstract_scale.h" - -class QwtRoundScaleDraw; - -/*! - \brief The Knob Widget - - The QwtKnob widget imitates look and behaviour of a volume knob on a radio. - It contains a scale around the knob which is set up automatically or can - be configured manually (see QwtAbstractScale). - Automatic scrolling is enabled when the user presses a mouse - button on the scale. For a description of signals, slots and other - members, see QwtAbstractSlider. - - \image html knob.png - \sa QwtAbstractSlider and QwtAbstractScale for the descriptions - of the inherited members. -*/ - -class QWT_EXPORT QwtKnob : public QwtAbstractSlider, public QwtAbstractScale -{ - Q_OBJECT - Q_ENUMS (Symbol) - Q_PROPERTY( int knobWidth READ knobWidth WRITE setKnobWidth ) - Q_PROPERTY( int borderWidth READ borderWidth WRITE setBorderWidth ) - Q_PROPERTY( double totalAngle READ totalAngle WRITE setTotalAngle ) - Q_PROPERTY( Symbol symbol READ symbol WRITE setSymbol ) - -public: - /*! - Symbol - \sa QwtKnob::QwtKnob() - */ - - enum Symbol { Line, Dot }; - - explicit QwtKnob(QWidget* parent = NULL); -#if QT_VERSION < 0x040000 - explicit QwtKnob(QWidget* parent, const char *name); -#endif - virtual ~QwtKnob(); - - void setKnobWidth(int w); - int knobWidth() const; - - void setTotalAngle (double angle); - double totalAngle() const; - - void setBorderWidth(int bw); - int borderWidth() const; - - void setSymbol(Symbol); - Symbol symbol() const; - - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; - - void setScaleDraw(QwtRoundScaleDraw *); - const QwtRoundScaleDraw *scaleDraw() const; - QwtRoundScaleDraw *scaleDraw(); - -protected: - virtual void paintEvent(QPaintEvent *e); - virtual void resizeEvent(QResizeEvent *e); - - void draw(QPainter *p, const QRect& ur); - void drawKnob(QPainter *p, const QRect &r); - void drawMarker(QPainter *p, double arc, const QColor &c); - -private: - void initKnob(); - void layoutKnob( bool update = true ); - double getValue(const QPoint &p); - void getScrollMode( const QPoint &p, int &scrollMode, int &direction ); - void recalcAngle(); - - virtual void valueChange(); - virtual void rangeChange(); - virtual void scaleChange(); - virtual void fontChange(const QFont &oldFont); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_layout_metrics.h b/Code/qtiplot/3rdparty/qwt/src/qwt_layout_metrics.h deleted file mode 100644 index 548701c52f49468861aca159e3ca4db34f4a7f6a..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_layout_metrics.h +++ /dev/null @@ -1,157 +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_LAYOUT_METRICS_H -#define QWT_LAYOUT_METRICS_H - -#include <qsize.h> -#include <qrect.h> -#include "qwt_polygon.h" -#include "qwt_global.h" - -class QPainter; -class QString; -class QFontMetrics; -#if QT_VERSION < 0x040000 -class QWMatrix; -#else -class QMatrix; -#endif -class QPaintDevice; - -/*! - \brief A Map to translate between layout, screen and paint device metrics -*/ -class QWT_EXPORT QwtMetricsMap -{ -public: - QwtMetricsMap(); - - bool isIdentity() const; - - void setMetrics(const QPaintDevice *layoutMetrics, - const QPaintDevice *deviceMetrics); - - int layoutToDeviceX(int x) const; - int deviceToLayoutX(int x) const; - int screenToLayoutX(int x) const; - int layoutToScreenX(int x) const; - - int layoutToDeviceY(int y) const; - int deviceToLayoutY(int y) const; - int screenToLayoutY(int y) const; - int layoutToScreenY(int y) const; - - QPoint layoutToDevice(const QPoint &, const QPainter * = NULL) const; - QPoint deviceToLayout(const QPoint &, const QPainter * = NULL) const; - QPoint screenToLayout(const QPoint &) const; - QPoint layoutToScreen(const QPoint &point) const; - - - QSize layoutToDevice(const QSize &) const; - QSize deviceToLayout(const QSize &) const; - QSize screenToLayout(const QSize &) const; - QSize layoutToScreen(const QSize &) const; - - QRect layoutToDevice(const QRect &, const QPainter * = NULL) const; - QRect deviceToLayout(const QRect &, const QPainter * = NULL) const; - QRect screenToLayout(const QRect &) const; - QRect layoutToScreen(const QRect &) const; - - QwtPolygon layoutToDevice(const QwtPolygon &, - const QPainter * = NULL) const; - QwtPolygon deviceToLayout(const QwtPolygon &, - const QPainter * = NULL) const; - -#if QT_VERSION < 0x040000 - static QwtPolygon translate(const QWMatrix &, const QwtPolygon &); - static QRect translate(const QWMatrix &, const QRect &); -#else - static QwtPolygon translate(const QMatrix &, const QwtPolygon &); - static QRect translate(const QMatrix &, const QRect &); -#endif - -private: - double d_screenToLayoutX; - double d_screenToLayoutY; - - double d_deviceToLayoutX; - double d_deviceToLayoutY; -}; - -inline bool QwtMetricsMap::isIdentity() const -{ - return d_deviceToLayoutX == 1.0 && d_deviceToLayoutY == 1.0; -} - -inline int QwtMetricsMap::layoutToDeviceX(int x) const -{ - return qRound(x / d_deviceToLayoutX); -} - -inline int QwtMetricsMap::deviceToLayoutX(int x) const -{ - return qRound(x * d_deviceToLayoutX); -} - -inline int QwtMetricsMap::screenToLayoutX(int x) const -{ - return qRound(x * d_screenToLayoutX); -} - -inline int QwtMetricsMap::layoutToScreenX(int x) const -{ - return qRound(x / d_screenToLayoutX); -} - -inline int QwtMetricsMap::layoutToDeviceY(int y) const -{ - return qRound(y / d_deviceToLayoutY); -} - -inline int QwtMetricsMap::deviceToLayoutY(int y) const -{ - return qRound(y * d_deviceToLayoutY); -} - -inline int QwtMetricsMap::screenToLayoutY(int y) const -{ - return qRound(y * d_screenToLayoutY); -} - -inline int QwtMetricsMap::layoutToScreenY(int y) const -{ - return qRound(y / d_screenToLayoutY); -} - -inline QSize QwtMetricsMap::layoutToDevice(const QSize &size) const -{ - return QSize(layoutToDeviceX(size.width()), - layoutToDeviceY(size.height())); -} - -inline QSize QwtMetricsMap::deviceToLayout(const QSize &size) const -{ - return QSize(deviceToLayoutX(size.width()), - deviceToLayoutY(size.height())); -} - -inline QSize QwtMetricsMap::screenToLayout(const QSize &size) const -{ - return QSize(screenToLayoutX(size.width()), - screenToLayoutY(size.height())); -} - -inline QSize QwtMetricsMap::layoutToScreen(const QSize &size) const -{ - return QSize(layoutToScreenX(size.width()), - layoutToScreenY(size.height())); -} - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_legend.h b/Code/qtiplot/3rdparty/qwt/src/qwt_legend.h deleted file mode 100644 index 19a619d9a4c0faa47041c3cb5d00705d4a0ab254..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_legend.h +++ /dev/null @@ -1,125 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_LEGEND_H -#define QWT_LEGEND_H - -#include <qframe.h> -#include "qwt_global.h" -#if QT_VERSION < 0x040000 -#include <qvaluelist.h> -#else -#include <qlist.h> -#endif - -class QScrollBar; -class QwtLegendItemManager; - -/*! - \brief The legend widget - - The QwtLegend widget is a tabular arrangement of legend items. Legend - items might be any type of widget, but in general they will be - a QwtLegendItem. - - \sa QwtLegendItem, QwtLegendItemManager QwtPlot -*/ - -class QWT_EXPORT QwtLegend : public QFrame -{ - Q_OBJECT - -public: - /*! - \brief Display policy - - - NoIdentifier\n - The client code is responsible how to display of each legend item. - The Qwt library will not interfere. - - - FixedIdentifier\n - All legend items are displayed with the QwtLegendItem::IdentifierMode - to be passed in 'mode'. - - - AutoIdentifier\n - Each legend item is displayed with a mode that is a bitwise or of - - QwtLegendItem::ShowLine (if its curve is drawn with a line) and - - QwtLegendItem::ShowSymbol (if its curve is drawn with symbols) and - - QwtLegendItem::ShowText (if the has a title). - - Default is AutoIdentifier. - \sa setDisplayPolicy(), displayPolicy(), QwtLegendItem::IdentifierMode - */ - - enum LegendDisplayPolicy - { - NoIdentifier = 0, - FixedIdentifier = 1, - AutoIdentifier = 2 - }; - - //! Interaction mode for the legend items - enum LegendItemMode - { - ReadOnlyItem, - ClickableItem, - CheckableItem - }; - - explicit QwtLegend(QWidget *parent = NULL); - virtual ~QwtLegend(); - - void setDisplayPolicy(LegendDisplayPolicy policy, int mode); - LegendDisplayPolicy displayPolicy() const; - - void setItemMode(LegendItemMode); - LegendItemMode itemMode() const; - - int identifierMode() const; - - QWidget *contentsWidget(); - const QWidget *contentsWidget() const; - - void insert(const QwtLegendItemManager *, QWidget *); - void remove(const QwtLegendItemManager *); - - QWidget *find(const QwtLegendItemManager *) const; - QwtLegendItemManager *find(const QWidget *) const; - -#if QT_VERSION < 0x040000 - virtual QValueList<QWidget *> legendItems() const; -#else - virtual QList<QWidget *> legendItems() const; -#endif - - void clear(); - - bool isEmpty() const; - uint itemCount() const; - - virtual bool eventFilter(QObject *, QEvent *); - - virtual QSize sizeHint() const; - virtual int heightForWidth(int w) const; - - QScrollBar *horizontalScrollBar() const; - QScrollBar *verticalScrollBar() const; - -protected: - virtual void resizeEvent(QResizeEvent *); - virtual void layoutContents(); - -private: - class PrivateData; - PrivateData *d_data; -}; - -#endif // QWT_LEGEND_H diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_legend_item.h b/Code/qtiplot/3rdparty/qwt/src/qwt_legend_item.h deleted file mode 100644 index 4aad1a73ae4e5793e33de6ed23bc4979173082c1..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_legend_item.h +++ /dev/null @@ -1,122 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_LEGEND_ITEM_H -#define QWT_LEGEND_ITEM_H - -#include "qwt_global.h" -#include "qwt_legend.h" -#include "qwt_text.h" -#include "qwt_text_label.h" - -class QPainter; -class QPen; -class QwtSymbol; - -/*! - \brief A legend label - - QwtLegendItem represents a curve on a legend. - It displays an curve identifier with an explaining text. - The identifier might be a combination of curve symbol and line. - In readonly mode it behaves like a label, otherwise like - an unstylish push button. - - \sa QwtLegend, QwtPlotCurve -*/ -class QWT_EXPORT QwtLegendItem: public QwtTextLabel -{ - Q_OBJECT -public: - - /*! - \brief Identifier mode - - Default is ShowLine | ShowText - \sa QwtLegendItem::identifierMode, QwtLegendItem::setIdentifierMode - */ - - enum IdentifierMode - { - NoIdentifier = 0, - ShowLine = 1, - ShowSymbol = 2, - ShowText = 4 - }; - - explicit QwtLegendItem(QWidget *parent = 0); - explicit QwtLegendItem(const QwtSymbol &, const QPen &, - const QwtText &, QWidget *parent = 0); - virtual ~QwtLegendItem(); - - virtual void setText(const QwtText &); - - void setItemMode(QwtLegend::LegendItemMode); - QwtLegend::LegendItemMode itemMode() const; - - void setIdentifierMode(int); - int identifierMode() const; - - void setIdentfierWidth(int width); - int identifierWidth() const; - - void setSpacing(int spacing); - int spacing() const; - - void setSymbol(const QwtSymbol &); - const QwtSymbol& symbol() const; - - void setCurvePen(const QPen &); - const QPen& curvePen() const; - - virtual void drawIdentifier(QPainter *, const QRect &) const; - virtual void drawItem(QPainter *p, const QRect &) const; - - virtual QSize sizeHint() const; - - bool isChecked() const; - -public slots: - void setChecked(bool on); - -signals: - //! Signal, when the legend item has been clicked - void clicked(); - - //! Signal, when the legend item has been pressed - void pressed(); - - //! Signal, when the legend item has been relased - void released(); - - //! Signal, when the legend item has been toggled - void checked(bool); - -protected: - void setDown(bool); - bool isDown() const; - - virtual void paintEvent(QPaintEvent *); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void keyPressEvent(QKeyEvent *); - virtual void keyReleaseEvent(QKeyEvent *); - - virtual void drawText(QPainter *, const QRect &); - -private: - void init(const QwtText &); - - class PrivateData; - PrivateData *d_data; -}; - -#endif // QWT_LEGEND_ITEM_H diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_legend_itemmanager.h b/Code/qtiplot/3rdparty/qwt/src/qwt_legend_itemmanager.h deleted file mode 100644 index d82a5f1b96710e76d2578b34e330914d8ce1c80d..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_legend_itemmanager.h +++ /dev/null @@ -1,36 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_LEGEND_ITEM_MANAGER_H -#define QWT_LEGEND_ITEM_MANAGER_H - -#include "qwt_global.h" - -class QwtLegend; -class QWidget; - -class QWT_EXPORT QwtLegendItemManager -{ -public: - QwtLegendItemManager() - { - } - - virtual ~QwtLegendItemManager() - { - } - - virtual void updateLegend(QwtLegend *) const = 0; - virtual QWidget *legendItem() const = 0; -}; - -#endif - diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_magnifier.h b/Code/qtiplot/3rdparty/qwt/src/qwt_magnifier.h deleted file mode 100644 index fc5c680e569ef891832a6d4ee14e52bce3e5d4e0..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_magnifier.h +++ /dev/null @@ -1,82 +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_MAGNIFIER_H -#define QWT_MAGNIFIER_H 1 - -#include "qwt_global.h" -#include <qobject.h> - -class QWidget; -class QMouseEvent; -class QWheelEvent; -class QKeyEvent; - -/*! - \brief QwtMagnifier provides zooming, by magnifying in steps. - - Using QwtMagnifier a plot can be zoomed in/out in steps using - keys, the mouse wheel or moving a mouse button in vertical direction. -*/ -class QWT_EXPORT QwtMagnifier: public QObject -{ - Q_OBJECT - -public: - explicit QwtMagnifier(QWidget *); - virtual ~QwtMagnifier(); - - QWidget *parentWidget(); - const QWidget *parentWidget() const; - - void setEnabled(bool); - bool isEnabled() const; - - // mouse - void setMouseFactor(double); - double mouseFactor() const; - - void setMouseButton(int button, int buttonState = Qt::NoButton); - void getMouseButton(int &button, int &buttonState) const; - - // mouse wheel - void setWheelFactor(double); - double wheelFactor() const; - - void setWheelButtonState(int buttonState); - int wheelButtonState() const; - - // keyboard - void setKeyFactor(double); - double keyFactor() const; - - void setZoomInKey(int key, int modifiers); - void getZoomInKey(int &key, int &modifiers); - - void setZoomOutKey(int key, int modifiers); - void getZoomOutKey(int &key, int &modifiers); - - virtual bool eventFilter(QObject *, QEvent *); - -protected: - virtual void rescale(double factor) = 0; - - virtual void widgetMousePressEvent(QMouseEvent *); - virtual void widgetMouseReleaseEvent(QMouseEvent *); - virtual void widgetMouseMoveEvent(QMouseEvent *); - virtual void widgetWheelEvent(QWheelEvent *); - virtual void widgetKeyPressEvent(QKeyEvent *); - virtual void widgetKeyReleaseEvent(QKeyEvent *); - -private: - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_math.h b/Code/qtiplot/3rdparty/qwt/src/qwt_math.h deleted file mode 100644 index 5187c2257de16ab05a2be710c7686e48dc01c68c..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_math.h +++ /dev/null @@ -1,187 +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_MATH_H -#define QWT_MATH_H - -#include <cmath> -#include <qpoint.h> -#include "qwt_global.h" -#include "qwt_double_rect.h" - -#if QT_VERSION < 0x040000 - -#define qwtMax QMAX -#define qwtMin QMIN -#define qwtAbs QABS - -#else // QT_VERSION >= 0x040000 - -#define qwtMax qMax -#define qwtMin qMin -#define qwtAbs qAbs - -#endif - -#ifndef LOG10_2 -#define LOG10_2 0.30102999566398119802 /* log10(2) */ -#endif - -#ifndef LOG10_3 -#define LOG10_3 0.47712125471966243540 /* log10(3) */ -#endif - -#ifndef LOG10_5 -#define LOG10_5 0.69897000433601885749 /* log10(5) */ -#endif - -#ifndef M_2PI -#define M_2PI 6.28318530717958623200 /* 2 pi */ -#endif - -#ifndef LOG_MIN -//! Mininum value for logarithmic scales -#define LOG_MIN 1.0e-100 -#endif - -#ifndef LOG_MAX -//! Maximum value for logarithmic scales -#define LOG_MAX 1.0e100 -#endif - -#ifndef M_E -#define M_E 2.7182818284590452354 /* e */ -#endif - -#ifndef M_LOG2E -#define M_LOG2E 1.4426950408889634074 /* log_2 e */ -#endif - -#ifndef M_LOG10E -#define M_LOG10E 0.43429448190325182765 /* log_10 e */ -#endif - -#ifndef M_LN2 -#define M_LN2 0.69314718055994530942 /* log_e 2 */ -#endif - -#ifndef M_LN10 -#define M_LN10 2.30258509299404568402 /* log_e 10 */ -#endif - -#ifndef M_PI -#define M_PI 3.14159265358979323846 /* pi */ -#endif - -#ifndef M_PI_2 -#define M_PI_2 1.57079632679489661923 /* pi/2 */ -#endif - -#ifndef M_PI_4 -#define M_PI_4 0.78539816339744830962 /* pi/4 */ -#endif - -#ifndef M_1_PI -#define M_1_PI 0.31830988618379067154 /* 1/pi */ -#endif - -#ifndef M_2_PI -#define M_2_PI 0.63661977236758134308 /* 2/pi */ -#endif - -#ifndef M_2_SQRTPI -#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ -#endif - -#ifndef M_SQRT2 -#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ -#endif - -#ifndef M_SQRT1_2 -#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ -#endif - -QWT_EXPORT double qwtGetMin(const double *array, int size); -QWT_EXPORT double qwtGetMax(const double *array, int size); - - -//! Return the sign -inline int qwtSign(double x) -{ - if (x > 0.0) - return 1; - else if (x < 0.0) - return (-1); - else - return 0; -} - -//! Return the square of a number -inline double qwtSqr(const double x) -{ - return x*x; -} - -/*! - \brief Limit a value to fit into a specified interval - \param x Input value - \param x1 First interval boundary - \param x2 Second interval boundary -*/ -template <class T> -T qwtLim(const T& x, const T& x1, const T& x2) -{ - T rv; - T xmin, xmax; - - xmin = qwtMin(x1, x2); - xmax = qwtMax(x1, x2); - - if ( x < xmin ) - rv = xmin; - else if ( x > xmax ) - rv = xmax; - else - rv = x; - - return rv; -} - -inline QPoint qwtPolar2Pos(const QPoint &pole, - double radius, double angle) -{ - const double x = pole.x() + radius * ::cos(angle); - const double y = pole.y() - radius * ::sin(angle); - - return QPoint(qRound(x), qRound(y)); -} - -inline QPoint qwtDegree2Pos(const QPoint &pole, - double radius, double angle) -{ - return qwtPolar2Pos(pole, radius, angle / 180.0 * M_PI); -} - -inline QwtDoublePoint qwtPolar2Pos(const QwtDoublePoint &pole, - double radius, double angle) -{ - const double x = pole.x() + radius * ::cos(angle); - const double y = pole.y() - radius * ::sin(angle); - - return QPoint(qRound(x), qRound(y)); -} - -inline QwtDoublePoint qwtDegree2Pos(const QwtDoublePoint &pole, - double radius, double angle) -{ - return qwtPolar2Pos(pole, radius, angle / 180.0 * M_PI); -} - - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_paint_buffer.h b/Code/qtiplot/3rdparty/qwt/src/qwt_paint_buffer.h deleted file mode 100644 index 2fc196903ff0a8d3f36f6cc6723f9c677b942088..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_paint_buffer.h +++ /dev/null @@ -1,65 +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_PAINT_BUFFER_H -#define QWT_PAINT_BUFFER_H 1 - -#include <qglobal.h> -#if QT_VERSION < 0x040000 - -#include <qpixmap.h> -#include "qwt_global.h" - -class QPainter; - -/*! - \brief Paint buffer for Qwt widgets - - QwtPaintBuffer offers a simple way to en/disable double buffering. - Double buffering is enabled as default and in general there will be - no reason to change this. -*/ - -class QWT_EXPORT QwtPaintBuffer -{ -public: - explicit QwtPaintBuffer(); - explicit QwtPaintBuffer(QPaintDevice *, const QRect &, QPainter *p = NULL); - - virtual ~QwtPaintBuffer(); - - void open(QPaintDevice *, const QRect &, QPainter *p = NULL); - void close(); - - QPainter *painter(); - const QPaintDevice *device(); - - static void setEnabled(bool enable); - static bool isEnabled(); - - //! Return Buffer used for double buffering - const QPixmap &buffer() const { return d_pixBuffer; } - -protected: - void flush(); - -private: - QPixmap d_pixBuffer; - QRect d_rect; - - QPaintDevice *d_device; // use QGuardedPtr - QPainter *d_painter; // use QGuardedPtr - QPainter *d_devicePainter; // use QGuardedPtr - - static bool d_enabled; -}; - -#endif // QT_VERSION < 0x040000 - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_painter.h b/Code/qtiplot/3rdparty/qwt/src/qwt_painter.h deleted file mode 100644 index 72089dffdbad72a619917b28960be88a629cc166..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_painter.h +++ /dev/null @@ -1,149 +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_PAINTER_H -#define QWT_PAINTER_H - -#include <qpoint.h> -#include <qrect.h> -#include "qwt_global.h" -#include "qwt_layout_metrics.h" -#include "qwt_polygon.h" - -class QPainter; -class QBrush; -class QColor; -class QWidget; -class QwtScaleMap; -class QwtColorMap; -class QwtDoubleInterval; - -#if QT_VERSION < 0x040000 -class QColorGroup; -class QSimpleRichText; -#else -class QPalette; -class QTextDocument; -#endif - -#if defined(Q_WS_X11) -// Warning: QCOORD_MIN, QCOORD_MAX are wrong on X11. -#define QWT_COORD_MAX 16384 -#define QWT_COORD_MIN (-QWT_COORD_MAX - 1) -#else -#define QWT_COORD_MAX 2147483647 -#define QWT_COORD_MIN -QWT_COORD_MAX - 1 -#endif - -/*! - \brief A collection of QPainter workarounds - - 1) Clipping to coordinate system limits (Qt3 only) - - On X11 pixel coordinates are stored in shorts. Qt - produces overruns when mapping QCOORDS to shorts. - - 2) Scaling to device metrics - - QPainter scales fonts, line and fill patterns to the metrics - of the paint device. Other values like the geometries of rects, points - remain device independend. To enable a device independent widget - implementation, QwtPainter adds scaling of these geometries. - (Unfortunately QPainter::scale scales both types of paintings, - so the objects of the first type would be scaled twice). -*/ - -class QWT_EXPORT QwtPainter -{ -public: - static void setMetricsMap(const QPaintDevice *layout, - const QPaintDevice *device); - static void setMetricsMap(const QwtMetricsMap &); - static void resetMetricsMap(); - static const QwtMetricsMap &metricsMap(); - - static void setDeviceClipping(bool); - static bool deviceClipping(); - - static void setClipRect(QPainter *, const QRect &); - - static void drawText(QPainter *, int x, int y, - const QString &); - static void drawText(QPainter *, const QPoint &, - const QString &); - static void drawText(QPainter *, int x, int y, int w, int h, - int flags, const QString &); - static void drawText(QPainter *, const QRect &, - int flags, const QString &); - -#ifndef QT_NO_RICHTEXT -#if QT_VERSION < 0x040000 - static void drawSimpleRichText(QPainter *, const QRect &, - int flags, QSimpleRichText &); -#else - static void drawSimpleRichText(QPainter *, const QRect &, - int flags, QTextDocument &); -#endif -#endif - - static void drawRect(QPainter *, int x, int y, int w, int h); - static void drawRect(QPainter *, const QRect &rect); - static void fillRect(QPainter *, const QRect &, const QBrush &); - - static void drawEllipse(QPainter *, const QRect &); - static void drawPie(QPainter *, const QRect & r, int a, int alen); - - static void drawLine(QPainter *, int x1, int y1, int x2, int y2); - static void drawLine(QPainter *, const QPoint &p1, const QPoint &p2); - static void drawPolygon(QPainter *, const QwtPolygon &pa); - static void drawPolyline(QPainter *, const QwtPolygon &pa); - static void drawPoint(QPainter *, int x, int y); - -#if QT_VERSION < 0x040000 - static void drawRoundFrame(QPainter *, const QRect &, - int width, const QColorGroup &cg, bool sunken); -#else - static void drawRoundFrame(QPainter *, const QRect &, - int width, const QPalette &, bool sunken); -#endif - static void drawFocusRect(QPainter *, QWidget *); - static void drawFocusRect(QPainter *, QWidget *, const QRect &); - - static QwtPolygon clip(const QwtPolygon &); - - static void drawColorBar(QPainter *painter, - const QwtColorMap &, const QwtDoubleInterval &, - const QwtScaleMap &, Qt::Orientation, const QRect &); - -#if QT_VERSION < 0x040000 - static void setSVGMode(bool on); - static bool isSVGMode(); -#endif - -private: - static void drawColoredArc(QPainter *, const QRect &, - int peak, int arc, int intervall, const QColor &c1, const QColor &c2); - - static const QRect &deviceClipRect(); - - static bool d_deviceClipping; - static QwtMetricsMap d_metricsMap; -#if QT_VERSION < 0x040000 - static bool d_SVGMode; -#endif -}; - -//! Wrapper for QPainter::drawLine() -inline void QwtPainter::drawLine(QPainter *painter, - const QPoint &p1, const QPoint &p2) -{ - drawLine(painter, p1.x(), p1.y(), p2.x(), p2.y()); -} - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_panner.h b/Code/qtiplot/3rdparty/qwt/src/qwt_panner.h deleted file mode 100644 index 13590a5cb0d888c5bb4921ffc5a2bbe1df2ce961..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_panner.h +++ /dev/null @@ -1,101 +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_PANNER_H -#define QWT_PANNER_H 1 - -#include <qnamespace.h> -#include <qwidget.h> -#include "qwt_global.h" - -class QCursor; - -/*! - \brief QwtPanner provides panning of a widget - - QwtPanner grabs the contents of a widget, that can be dragged - in all directions. The offset between the start and the end position - is emitted by the panned signal. - - QwtPanner grabs the content of the widget into a pixmap and moves - the pixmap around, without initiating any repaint events for the widget. - Areas, that are not part of content are not painted while panning - in in process. This makes panning fast enough for widgets, where - repaints are too slow for mouse movements. - - For widgets, where repaints are very fast it might be better to - implement panning manually by mapping mouse events into paint events. -*/ -class QWT_EXPORT QwtPanner: public QWidget -{ - Q_OBJECT - -public: - QwtPanner(QWidget* parent); - virtual ~QwtPanner(); - - void setEnabled(bool); - bool isEnabled() const; - - void setMouseButton(int button, int buttonState = Qt::NoButton); - void getMouseButton(int &button, int &buttonState) const; - void setAbortKey(int key, int state = Qt::NoButton); - void getAbortKey(int &key, int &state) const; - - void setCursor(const QCursor &); - const QCursor cursor() const; - -#if QT_VERSION >= 0x040000 - void setOrientations(Qt::Orientations); - Qt::Orientations orientations() const; -#else - void enableOrientation(Qt::Orientation, bool enable); -#endif - - bool isOrientationEnabled(Qt::Orientation) const; - - virtual bool eventFilter(QObject *, QEvent *); - -signals: - /*! - Signal emitted, when panning is done - - \param dx Offset in horizontal direction - \param dy Offset in vertical direction - */ - void panned(int dx, int dy); - - /*! - Signal emitted, while the widget moved, but panning - is not finished. - - \param dx Offset in horizontal direction - \param dy Offset in vertical direction - */ - void moved(int dx, int dy); - -protected: - virtual void widgetMousePressEvent(QMouseEvent *); - virtual void widgetMouseReleaseEvent(QMouseEvent *); - virtual void widgetMouseMoveEvent(QMouseEvent *); - virtual void widgetKeyPressEvent(QKeyEvent *); - virtual void widgetKeyReleaseEvent(QKeyEvent *); - - virtual void paintEvent(QPaintEvent *); - -private: -#ifndef QT_NO_CURSOR - void showCursor(bool); -#endif - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_picker.h b/Code/qtiplot/3rdparty/qwt/src/qwt_picker.h deleted file mode 100644 index ef1edc867fe9472661a5be8235468cb3f3dd2aee..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_picker.h +++ /dev/null @@ -1,376 +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_PICKER -#define QWT_PICKER 1 - -#include <qobject.h> -#include <qpen.h> -#include <qfont.h> -#include <qrect.h> -#include "qwt_global.h" -#include "qwt_text.h" -#include "qwt_polygon.h" -#include "qwt_event_pattern.h" - -class QWidget; -class QMouseEvent; -class QWheelEvent; -class QKeyEvent; -class QwtPickerMachine; - -/*! - \brief QwtPicker provides selections on a widget - - QwtPicker filters all mouse and keyboard events of a widget - and translates them into an array of selected points. Depending - on the QwtPicker::SelectionType the selection might be a single point, - a rectangle or a polygon. The selection process is supported by - optional rubberbands (rubberband selection) and position trackers. - - QwtPicker is useful for widgets where the event handlers - can't be overloaded, like for components of composite widgets. - It offers alternative handlers for mouse and key events. - - \par Example - \verbatim #include <qwt_picker.h> - -QwtPicker *picker = new QwtPicker(widget); -picker->setTrackerMode(QwtPicker::ActiveOnly); -connect(picker, SIGNAL(selected(const QwtPolygon &)), ...); - -// emit the position of clicks on widget -picker->setSelectionFlags(QwtPicker::PointSelection | QwtPicker::ClickSelection); - - ... - -// now select rectangles -picker->setSelectionFlags(QwtPicker::RectSelection | QwtPicker::DragSelection); -picker->setRubberBand(QwtPicker::RectRubberBand); \endverbatim\n - - The selection process uses the commands begin(), append(), move() and end(). - append() adds a new point to the selection, move() changes the position of - the latest point. - - The commands are initiated from a small state machine (QwtPickerMachine) - that translates mouse and key events. There are a couple of predefined - state machines for point, rect and polygon selections. The selectionFlags() - control which one should be used. It is possible to use other machines - by overloading stateMachine(). - - The picker is active (isActive()), between begin() and end(). - In active state the rubberband is displayed, and the tracker is visible - in case of trackerMode is ActiveOnly or AlwaysOn. - - The cursor can be moved using the arrow keys. All selections can be aborted - using the abort key. (QwtEventPattern::KeyPatternCode) - - \warning In case of QWidget::NoFocus the focus policy of the observed - widget is set to QWidget::WheelFocus and mouse tracking - will be manipulated for ClickSelection while the picker is active, - or if trackerMode() is AlwayOn. -*/ - -class QWT_EXPORT QwtPicker: public QObject, public QwtEventPattern -{ - Q_OBJECT - - Q_ENUMS(RubberBand) - Q_ENUMS(DisplayMode) - Q_ENUMS(ResizeMode) - - Q_PROPERTY(int selectionFlags READ selectionFlags WRITE setSelectionFlags) - Q_PROPERTY(DisplayMode trackerMode READ trackerMode WRITE setTrackerMode) - Q_PROPERTY(QFont trackerFont READ trackerFont WRITE setTrackerFont) - Q_PROPERTY(RubberBand rubberBand READ rubberBand WRITE setRubberBand) - Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode) - Q_PROPERTY(bool isEnabled READ isEnabled WRITE setEnabled) - - Q_PROPERTY(QPen trackerPen READ trackerPen WRITE setTrackerPen) - Q_PROPERTY(QPen rubberBandPen READ rubberBandPen WRITE setRubberBandPen) - -public: - /*! - This enum type describes the type of a selection. It can be or'd - with QwtPicker::RectSelectionType and QwtPicker::SelectionMode - and passed to QwtPicker::setSelectionFlags() - - NoSelection\n - Selection is disabled. Note this is different to the disabled - state, as you might have a tracker. - - PointSelection\n - Select a single point. - - RectSelection\n - Select a rectangle. - - PolygonSelection\n - Select a polygon. - - The default value is NoSelection. - \sa QwtPicker::setSelectionFlags(), QwtPicker::selectionFlags() - */ - - enum SelectionType - { - NoSelection = 0, - PointSelection = 1, - RectSelection = 2, - PolygonSelection = 4 - }; - - /*! - \brief Selection subtype for RectSelection - This enum type describes the type of rectangle selections. - It can be or'd with QwtPicker::RectSelectionType and - QwtPicker::SelectionMode and passed to QwtPicker::setSelectionFlags(). - - CornerToCorner\n - The first and the second selected point are the corners - of the rectangle. - - CenterToCorner\n - The first point is the center, the second a corner of the - rectangle. - - CenterToRadius\n - The first point is the center of a quadrat, calculated by the maximum - of the x- and y-distance. - - The default value is CornerToCorner. - \sa QwtPicker::setSelectionFlags(), QwtPicker::selectionFlags() - */ - enum RectSelectionType - { - CornerToCorner = 64, - CenterToCorner = 128, - CenterToRadius = 256 - }; - - /*! - Values of this enum type or'd together with a SelectionType value - identifies which state machine should be used for the selection. - - The default value is ClickSelection. - \sa stateMachine() - */ - enum SelectionMode - { - ClickSelection = 1024, - DragSelection = 2048 - }; - - /*! - Rubberband style - - NoRubberBand\n - No rubberband. - - HLineRubberBand & PointSelection\n - A horizontal line. - - VLineRubberBand & PointSelection\n - A vertical line. - - CrossRubberBand & PointSelection\n - A horizontal and a vertical line. - - RectRubberBand & RectSelection\n - A rectangle. - - EllipseRubberBand & RectSelection\n - An ellipse. - - PolygonRubberBand &PolygonSelection\n - A polygon. - - UserRubberBand\n - Values >= UserRubberBand can be used to define additional - rubber bands. - - The default value is NoRubberBand. - \sa QwtPicker::setRubberBand(), QwtPicker::rubberBand() - */ - - enum RubberBand - { - NoRubberBand = 0, - - // Point - HLineRubberBand, - VLineRubberBand, - CrossRubberBand, - - // Rect - RectRubberBand, - EllipseRubberBand, - - // Polygon - PolygonRubberBand, - - UserRubberBand = 100 - }; - - /*! - - AlwaysOff\n - Display never. - - AlwaysOn\n - Display always. - - ActiveOnly\n - Display only when the selection is active. - - \sa QwtPicker::setTrackerMode(), QwtPicker::trackerMode(), - QwtPicker::isActive() - */ - enum DisplayMode - { - AlwaysOff, - AlwaysOn, - ActiveOnly - }; - - /*! - Controls what to do with the selected points of an active - selection when the observed widget is resized. - - Stretch\n - All points are scaled according to the new size, - - KeepSize\n - All points remain unchanged. - - The default value is Stretch. - \sa QwtPicker::setResizeMode(), QwtPicker::resize() - */ - - enum ResizeMode - { - Stretch, - KeepSize - }; - - explicit QwtPicker(QWidget *parent); - explicit QwtPicker(int selectionFlags, RubberBand rubberBand, - DisplayMode trackerMode, QWidget *); - - virtual ~QwtPicker(); - - virtual void setSelectionFlags(int); - int selectionFlags() const; - - virtual void setRubberBand(RubberBand); - RubberBand rubberBand() const; - - virtual void setTrackerMode(DisplayMode); - DisplayMode trackerMode() const; - - virtual void setResizeMode(ResizeMode); - ResizeMode resizeMode() const; - - virtual void setRubberBandPen(const QPen &); - QPen rubberBandPen() const; - - virtual void setTrackerPen(const QPen &); - QPen trackerPen() const; - - virtual void setTrackerFont(const QFont &); - QFont trackerFont() const; - - bool isEnabled() const; - virtual void setEnabled(bool); - - bool isActive() const; - - virtual bool eventFilter(QObject *, QEvent *); - - QWidget *parentWidget(); - const QWidget *parentWidget() const; - - virtual QRect pickRect() const; - const QwtPolygon &selection() const; - - virtual void drawRubberBand(QPainter *) const; - virtual void drawTracker(QPainter *) const; - - virtual QwtText trackerText(const QPoint &pos) const; - QPoint trackerPosition() const; - QRect trackerRect(const QFont &) const; - - -signals: - /*! - A signal emitting the selected points, - at the end of a selection. - - \param pa Selected points - */ - void selected(const QwtPolygon &pa); - - /*! - A signal emitted when a point has been appended to the selection - - \param pos Position of the appended point. - \sa append(). moved() - */ - void appended(const QPoint &pos); - - /*! - A signal emitted whenever the last appended point of the - selection has been moved. - - \param pos Position of the moved last point of the selection. - \sa move(), appended() - */ - void moved(const QPoint &pos); - - /*! - A signal emitted when the active selection has been changed. - This might happen when the observed widget is resized. - - \param pa Changed selection - \sa stretchSelection() - */ - void changed(const QwtPolygon &pa); - -protected: - /*! - \brief Validate and fixup the selection - - Accepts all selections unmodified - - \param selection Selection to validate and fixup - \return true, when accepted, false otherwise - */ - virtual bool accept(QwtPolygon &selection) const; - - virtual void transition(const QEvent *); - - virtual void begin(); - virtual void append(const QPoint &); - virtual void move(const QPoint &); - virtual bool end(bool ok = true); - - virtual void reset(); - - virtual void widgetMousePressEvent(QMouseEvent *); - virtual void widgetMouseReleaseEvent(QMouseEvent *); - virtual void widgetMouseDoubleClickEvent(QMouseEvent *); - virtual void widgetMouseMoveEvent(QMouseEvent *); - virtual void widgetWheelEvent(QWheelEvent *); - virtual void widgetKeyPressEvent(QKeyEvent *); - virtual void widgetKeyReleaseEvent(QKeyEvent *); - virtual void widgetLeaveEvent(QEvent *); - - virtual void stretchSelection(const QSize &oldSize, - const QSize &newSize); - - virtual QwtPickerMachine *stateMachine(int) const; - - virtual void updateDisplay(); - - const QWidget *rubberBandWidget() const; - const QWidget *trackerWidget() const; - -private: - void init(QWidget *, int selectionFlags, RubberBand rubberBand, - DisplayMode trackerMode); - - void setStateMachine(QwtPickerMachine *); - void setMouseTracking(bool); - - class PickerWidget; - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_picker_machine.h b/Code/qtiplot/3rdparty/qwt/src/qwt_picker_machine.h deleted file mode 100644 index aadda004d81ab818ab26fa029007a516e707b443..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_picker_machine.h +++ /dev/null @@ -1,153 +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_PICKER_MACHINE -#define QWT_PICKER_MACHINE 1 - -#include "qwt_global.h" -#if QT_VERSION < 0x040000 -#include <qvaluelist.h> -#else -#include <qlist.h> -#endif - -class QEvent; -class QwtEventPattern; - -/*! - \brief A state machine for QwtPicker selections - - QwtPickerMachine accepts key and mouse events and translates them - into selection commands. - - \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode -*/ - -class QWT_EXPORT QwtPickerMachine -{ -public: - //! Commands - the output of the state machine - enum Command - { - Begin, - Append, - Move, - End - }; - -#if QT_VERSION < 0x040000 - typedef QValueList<Command> CommandList; -#else - typedef QList<Command> CommandList; -#endif - - virtual ~QwtPickerMachine(); - - //! Transition - virtual CommandList transition( - const QwtEventPattern &, const QEvent *) = 0; - void reset(); - - int state() const; - void setState(int); - -protected: - QwtPickerMachine(); - -private: - int d_state; -}; - -/*! - \brief A state machine for point selections - - Pressing QwtEventPattern::MouseSelect1 or - QwtEventPattern::KeySelect1 selects a point. - - \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode -*/ -class QWT_EXPORT QwtPickerClickPointMachine: public QwtPickerMachine -{ -public: - virtual CommandList transition( - const QwtEventPattern &, const QEvent *); -}; - -/*! - \brief A state machine for point selections - - Pressing QwtEventPattern::MouseSelect1 or QwtEventPattern::KeySelect1 - starts the selection, releasing QwtEventPattern::MouseSelect1 or - a second press of QwtEventPattern::KeySelect1 terminates it. -*/ -class QWT_EXPORT QwtPickerDragPointMachine: public QwtPickerMachine -{ -public: - virtual CommandList transition( - const QwtEventPattern &, const QEvent *); -}; - -/*! - \brief A state machine for rectangle selections - - Pressing QwtEventPattern::MouseSelect1 starts - the selection, releasing it selects the first point. Pressing it - again selects the second point and terminates the selection. - Pressing QwtEventPattern::KeySelect1 also starts the - selection, a second press selects the first point. A third one selects - the second point and terminates the selection. - - \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode -*/ - -class QWT_EXPORT QwtPickerClickRectMachine: public QwtPickerMachine -{ -public: - virtual CommandList transition( - const QwtEventPattern &, const QEvent *); -}; - -/*! - \brief A state machine for rectangle selections - - Pressing QwtEventPattern::MouseSelect1 selects - the first point, releasing it the second point. - Pressing QwtEventPattern::KeySelect1 also selects the - first point, a second press selects the second point and terminates - the selection. - - \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode -*/ - -class QWT_EXPORT QwtPickerDragRectMachine: public QwtPickerMachine -{ -public: - virtual CommandList transition( - const QwtEventPattern &, const QEvent *); -}; - -/*! - \brief A state machine for polygon selections - - Pressing QwtEventPattern::MouseSelect1 or QwtEventPattern::KeySelect1 - starts the selection and selects the first point, or appends a point. - Pressing QwtEventPattern::MouseSelect2 or QwtEventPattern::KeySelect2 - appends the last point and terminates the selection. - - \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode -*/ - -class QWT_EXPORT QwtPickerPolygonMachine: public QwtPickerMachine -{ -public: - virtual CommandList transition( - const QwtEventPattern &, const QEvent *); -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot.h deleted file mode 100644 index 360103a250a96a3fb485c245933b08b85280b025..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot.h +++ /dev/null @@ -1,306 +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_PLOT_H -#define QWT_PLOT_H - -#include <qframe.h> -#include "qwt_global.h" -#include "qwt_array.h" -#include "qwt_text.h" -#include "qwt_plot_dict.h" -#include "qwt_scale_map.h" -#include "qwt_plot_printfilter.h" - -class QwtPlotLayout; -class QwtLegend; -class QwtScaleWidget; -class QwtScaleEngine; -class QwtScaleDiv; -class QwtScaleDraw; -class QwtTextLabel; -class QwtPlotCanvas; -class QwtPlotPrintFilter; - -/*! - \brief A 2-D plotting widget - - QwtPlot is a widget for plotting two-dimensional graphs. - An unlimited number of plot items can be displayed on - its canvas. Plot items might be curves (QwtPlotCurve), markers - (QwtPlotMarker), the grid (QwtPlotGrid), or anything else derived - from QwtPlotItem. - A plot can have up to four axes, with each plot item attached to an x- and - a y axis. The scales at the axes can be explicitely set (QwtScaleDiv), or - are calculated from the plot items, using algorithms (QwtScaleEngine) which - can be configured separately for each axis. - - \image html plot.png - - \par Example - The following example shows (schematically) the most simple - way to use QwtPlot. By default, only the left and bottom axes are - visible and their scales are computed automatically. - \verbatim -#include <qwt_plot.h> -#include <qwt_plot_curve.h> - -QwtPlot *myPlot; -double x[100], y1[100], y2[100]; // x and y values - -myPlot = new QwtPlot("Two Curves", parent); - -// add curves -QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1"); -QwtPlotCurve *curve2 = new QwtPlotCurve("Curve 2"); - -getSomeValues(x, y1, y2); - -// copy the data into the curves -curve1->setData(x, y1, 100); -curve2->setData(x, y2, 100); - -curve1->attach(myPlot); -curve2->attach(myPlot); - -// finally, refresh the plot -myPlot->replot(); -\endverbatim -*/ - -class QWT_EXPORT QwtPlot: public QFrame, public QwtPlotDict -{ - friend class QwtPlotCanvas; - - Q_OBJECT - Q_PROPERTY( QString propertiesDocument - READ grabProperties WRITE applyProperties ) - -public: - //! Axis index - enum Axis - { - yLeft, - yRight, - xBottom, - xTop, - - axisCnt - }; - - /*! - \brief Position of the legend, relative to the canvas. - - ExternalLegend means that only the content of the legend - will be handled by QwtPlot, but not its geometry. - This might be interesting if an application wants to - have a legend in an external window. - */ - enum LegendPosition - { - LeftLegend, - RightLegend, - BottomLegend, - TopLegend, - - ExternalLegend - }; - - explicit QwtPlot(QWidget * = NULL); - explicit QwtPlot(const QwtText &title, QWidget *p = NULL); -#if QT_VERSION < 0x040000 - explicit QwtPlot(QWidget *, const char* name); -#endif - - virtual ~QwtPlot(); - - void applyProperties(const QString &); - QString grabProperties() const; - - void setAutoReplot(bool tf = true); - bool autoReplot() const; - - void print(QPaintDevice &p, - const QwtPlotPrintFilter & = QwtPlotPrintFilter()) const; - virtual void print(QPainter *, const QRect &rect, - const QwtPlotPrintFilter & = QwtPlotPrintFilter()) const; - - // Layout - - QwtPlotLayout *plotLayout(); - const QwtPlotLayout *plotLayout() const; - - void setMargin(int margin); - int margin() const; - - // Title - - void setTitle(const QString &); - void setTitle(const QwtText &t); - QwtText title() const; - - QwtTextLabel *titleLabel(); - const QwtTextLabel *titleLabel() const; - - // Canvas - - QwtPlotCanvas *canvas(); - const QwtPlotCanvas *canvas() const; - - void setCanvasBackground (const QColor &c); - const QColor& canvasBackground() const; - - void setCanvasLineWidth(int w); - int canvasLineWidth() const; - - virtual QwtScaleMap canvasMap(int axisId) const; - - double invTransform(int axisId, int pos) const; - int transform(int axisId, double value) const; - - // Axes - - QwtScaleEngine *axisScaleEngine(int axisId); - const QwtScaleEngine *axisScaleEngine(int axisId) const; - void setAxisScaleEngine(int axisId, QwtScaleEngine *); - - void setAxisAutoScale(int axisId); - bool axisAutoScale(int axisId) const; - - void enableAxis(int axisId, bool tf = true); - bool axisEnabled(int axisId) const; - - void setAxisFont(int axisId, const QFont &f); - QFont axisFont(int axisId) const; - - void setAxisScale(int axisId, double min, double max, double step = 0); - void setAxisScaleDiv(int axisId, const QwtScaleDiv &); - void setAxisScaleDraw(int axisId, QwtScaleDraw *); - - double axisStepSize(int axisId) const; - - const QwtScaleDiv *axisScaleDiv(int axisId) const; - QwtScaleDiv *axisScaleDiv(int axisId); - - const QwtScaleDraw *axisScaleDraw(int axisId) const; - QwtScaleDraw *axisScaleDraw(int axisId); - - const QwtScaleWidget *axisWidget(int axisId) const; - QwtScaleWidget *axisWidget(int axisId); - -#if QT_VERSION < 0x040000 - void setAxisLabelAlignment(int axisId, int); -#else - void setAxisLabelAlignment(int axisId, Qt::Alignment); -#endif - void setAxisLabelRotation(int axisId, double rotation); - - void setAxisTitle(int axisId, const QString &); - void setAxisTitle(int axisId, const QwtText &); - QwtText axisTitle(int axisId) const; - - void setAxisMaxMinor(int axisId, int maxMinor); - int axisMaxMajor(int axisId) const; - void setAxisMaxMajor(int axisId, int maxMajor); - int axisMaxMinor(int axisId) const; - - // Legend - - void insertLegend(QwtLegend *, LegendPosition = QwtPlot::RightLegend, - double ratio = -1.0); - - QwtLegend *legend(); - const QwtLegend *legend() const; - - // Misc - - virtual void polish(); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; - - virtual void updateLayout(); - - virtual bool event(QEvent *); - -signals: - /*! - A signal which is emitted when the user has clicked on - a legend item, which is in QwtLegend::ClickableItem mode. - - \param plotItem Corresponding plot item of the - selected legend item - - \note clicks are disabled as default - \sa QwtLegend::setItemMode, QwtLegend::itemMode - */ - void legendClicked(QwtPlotItem *plotItem); - - /*! - A signal which is emitted when the user has clicked on - a legend item, which is in QwtLegend::CheckableItem mode - - \param plotItem Corresponding plot item of the - selected legend item - \param on True when the legen item is checked - - \note clicks are disabled as default - \sa QwtLegend::setItemMode, QwtLegend::itemMode - */ - - void legendChecked(QwtPlotItem *plotItem, bool on); - -public slots: - virtual void clear(); - - virtual void replot(); - void autoRefresh(); - -protected slots: - virtual void legendItemClicked(); - virtual void legendItemChecked(bool); - -protected: - static bool axisValid(int axisId); - - virtual void drawCanvas(QPainter *); - virtual void drawItems(QPainter *, const QRect &, - const QwtScaleMap maps[axisCnt], - const QwtPlotPrintFilter &) const; - - virtual void updateTabOrder(); - - void updateAxes(); - - virtual void resizeEvent(QResizeEvent *e); - - virtual void printLegendItem(QPainter *, - const QWidget *, const QRect &) const; - - virtual void printTitle(QPainter *, const QRect &) const; - virtual void printScale(QPainter *, int axisId, int startDist, int endDist, - int baseDist, const QRect &) const; - virtual void printCanvas(QPainter *, const QRect &, - const QwtScaleMap maps[axisCnt], const QwtPlotPrintFilter &) const; - virtual void printLegend(QPainter *, const QRect &) const; - -private: - void initAxesData(); - void deleteAxesData(); - void updateScaleDiv(); - - void initPlot(const QwtText &title); - - class AxisData; - AxisData *d_axisData[axisCnt]; - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_canvas.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_canvas.h deleted file mode 100644 index 417d3a556cae346532a12edfa8090535db382854..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_canvas.h +++ /dev/null @@ -1,119 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_PLOT_CANVAS_H -#define QWT_PLOT_CANVAS_H - -#include <qframe.h> -#include <qpen.h> -#include "qwt_global.h" - -class QwtPlot; -class QPixmap; - -/*! - \brief Canvas of a QwtPlot. - - \sa QwtPlot -*/ - -class QWT_EXPORT QwtPlotCanvas : public QFrame -{ - Q_OBJECT - -public: - - /*! - \brief Paint attributes - - - PaintCached\n - Paint double buffered and reuse the content of the pixmap buffer - for some spontaneous repaints that happen when a plot gets unhidden, - deiconified or changes the focus. - Disabling the cache will improve the performance for - incremental paints (using QwtPlotCurve::draw). - - - PaintPacked\n - Suppress system background repaints and paint it together with - the canvas contents. - Painting packed might avoid flickering for expensive repaints, - when there is a notable gap between painting the background - and the plot contents. - - The default setting enables PaintCached and PaintPacked - - \sa setPaintAttribute(), testPaintAttribute(), paintCache() - */ - enum PaintAttribute - { - PaintCached = 1, - PaintPacked = 2 - }; - - /*! - \brief Focus indicator - - - NoFocusIndicator\n - Don't paint a focus indicator - - - CanvasFocusIndicator\n - The focus is related to the complete canvas. - Paint the focus indicator using paintFocus() - - - ItemFocusIndicator\n - The focus is related to an item (curve, point, ...) on - the canvas. It is up to the application to display a - focus indication using f.e. highlighting. - - \sa setFocusIndicator(), focusIndicator(), paintFocus() - */ - - enum FocusIndicator - { - NoFocusIndicator, - CanvasFocusIndicator, - ItemFocusIndicator - }; - - explicit QwtPlotCanvas(QwtPlot *); - virtual ~QwtPlotCanvas(); - - QwtPlot *plot(); - const QwtPlot *plot() const; - - void setFocusIndicator(FocusIndicator); - FocusIndicator focusIndicator() const; - - void setPaintAttribute(PaintAttribute, bool on = true); - bool testPaintAttribute(PaintAttribute) const; - - QPixmap *paintCache(); - const QPixmap *paintCache() const; - void invalidatePaintCache(); - -protected: - virtual void hideEvent(QHideEvent *); - - virtual void paintEvent(QPaintEvent *); - - virtual void drawContents(QPainter *); - virtual void drawFocusIndicator(QPainter *); - - void drawCanvas(QPainter *painter = NULL); - -private: - void setSystemBackground(bool); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_curve.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_curve.h deleted file mode 100644 index 973d737b951f28d32d8766e2682c6250e80c5973..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_curve.h +++ /dev/null @@ -1,246 +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_PLOT_CURVE_H -#define QWT_PLOT_CURVE_H - -#include <qpen.h> -#include <qstring.h> -#include "qwt_global.h" -#include "qwt_plot_item.h" -#include "qwt_text.h" -#include "qwt_polygon.h" -#include "qwt_data.h" - -class QPainter; -class QwtScaleMap; -class QwtSymbol; -class QwtCurveFitter; - -/*! - \brief A class which draws curves - - This class can be used to display data as a curve in the x-y plane. - It supports different display styles, spline interpolation and symbols. - - \par Usage - <dl><dt>A. Assign curve properties</dt> - <dd>When a curve is created, it is configured to draw black solid lines - with QwtPlotCurve::Lines and no symbols. You can change this by calling - setPen(), setStyle() and setSymbol().</dd> - <dt>B. Assign or change data.</dt> - <dd>Data can be set in two ways:<ul> - <li>setData() is overloaded to initialize the x and y data by - copying from different data structures with different kind of copy semantics. - <li>setRawData() only stores the pointers and size information - and is provided for backwards compatibility. This function is less safe (you - must not delete the data while they are attached), but has been more - efficient, and has been more convenient for dynamically changing data. - Use of setData() in combination with a problem-specific subclass - of QwtData is always preferrable.</ul></dd> - <dt>C. Draw</dt> - <dd>draw() maps the data into pixel coordinates and paints them. - </dd></dl> - - \par Example: - see examples/curvdemo - - \sa QwtData, QwtSymbol, QwtScaleMap -*/ -class QWT_EXPORT QwtPlotCurve: public QwtPlotItem -{ -public: - enum CurveType - { - Yfx, - Xfy - }; - - /*! - Curve styles. - \sa setStyle - */ - enum CurveStyle - { - NoCurve, - - Lines, - Sticks, - Steps, - Dots, - - UserCurve = 100 - }; - - /*! - Curve attributes. - \sa setCurveAttribute, testCurveAttribute - */ - enum CurveAttribute - { - Inverted = 1, - Fitted = 2 - }; - - /*! - Paint attributes - \sa setPaintAttribute, testPaintAttribute - */ - enum PaintAttribute - { - PaintFiltered = 1, - ClipPolygons = 2 - }; - - explicit QwtPlotCurve(); - explicit QwtPlotCurve(const QwtText &title); - explicit QwtPlotCurve(const QString &title); - - virtual ~QwtPlotCurve(); - - virtual int rtti() const; - - void setCurveType(CurveType); - CurveType curveType() const; - - void setPaintAttribute(PaintAttribute, bool on = true); - bool testPaintAttribute(PaintAttribute) const; - - void setRawData(const double *x, const double *y, int size); - void setData(const double *xData, const double *yData, int size); - void setData(const QwtArray<double> &xData, const QwtArray<double> &yData); -#if QT_VERSION < 0x040000 - void setData(const QwtArray<QwtDoublePoint> &data); -#else - void setData(const QPolygonF &data); -#endif - void setData(const QwtData &data); - - int closestPoint(const QPoint &pos, double *dist = NULL) const; - - QwtData &data(); - const QwtData &data() const; - - int dataSize() const; - inline double x(int i) const; - inline double y(int i) const; - - virtual QwtDoubleRect boundingRect() const; - - //! boundingRect().left() - double minXValue() const ;//{ return boundingRect().left(); } - //! boundingRect().right() - double maxXValue() const ;//{ return boundingRect().right(); } - //! boundingRect().top() - double minYValue() const ;//{ return boundingRect().top(); } - //! boundingRect().bottom() - double maxYValue() const ;//{ return boundingRect().bottom(); } - - void setCurveAttribute(CurveAttribute, bool on = true); - bool testCurveAttribute(CurveAttribute) const; - - void setPen(const QPen &); - const QPen &pen() const; - - void setBrush(const QBrush &); - const QBrush &brush() const; - - void setBaseline(double ref); - double baseline() const; - - void setStyle(CurveStyle style); - CurveStyle style() const; - - void setSymbol(const QwtSymbol &s); - const QwtSymbol& symbol() const; - - void setCurveFitter(QwtCurveFitter *); - QwtCurveFitter *curveFitter() const; - - virtual void draw(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - const QRect &) const; - - virtual void draw(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - int from, int to) const; - - void draw(int from, int to) const; - - virtual void updateLegend(QwtLegend *) const; - -protected: - - void init(); - - virtual void drawCurve(QPainter *p, int style, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - int from, int to) const; - - virtual void drawSymbols(QPainter *p, const QwtSymbol &, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - int from, int to) const; - - void drawLines(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - int from, int to) const; - void drawSticks(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - int from, int to) const; - void drawDots(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - int from, int to) const; - void drawSteps(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - int from, int to) const; - - void fillCurve(QPainter *, - const QwtScaleMap &, const QwtScaleMap &, - QwtPolygon &) const; - void closePolyline(const QwtScaleMap &, const QwtScaleMap &, - QwtPolygon &) const; - -private: - QwtData *d_xy; - - class PrivateData; - PrivateData *d_data; -}; - -//! \return the the curve data -inline QwtData &QwtPlotCurve::data() -{ - return *d_xy; -} - -//! \return the the curve data -inline const QwtData &QwtPlotCurve::data() const -{ - return *d_xy; -} - -/*! - \param i index - \return x-value at position i -*/ -inline double QwtPlotCurve::x(int i) const -{ - return d_xy->x(i); -} - -/*! - \param i index - \return y-value at position i -*/ -inline double QwtPlotCurve::y(int i) const -{ - return d_xy->y(i); -} - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_dict.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_dict.h deleted file mode 100644 index bc369ae5009b59e135401e21a27143e8de21e8d9..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_dict.h +++ /dev/null @@ -1,65 +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 - *****************************************************************************/ - -// vim: expandtab - -/*! \file !*/ -#ifndef QWT_PLOT_DICT -#define QWT_PLOT_DICT - -#include "qwt_global.h" -#include "qwt_plot_item.h" - -#if QT_VERSION < 0x040000 -#include <qvaluelist.h> -typedef QValueListConstIterator<QwtPlotItem *> QwtPlotItemIterator; -/// \var typedef QValueList< QwtPlotItem *> QwtPlotItemList -/// \brief See QT 3.x assistant documentation for QValueList -typedef QValueList<QwtPlotItem *> QwtPlotItemList; -#else -#include <qlist.h> -typedef QList<QwtPlotItem *>::ConstIterator QwtPlotItemIterator; -/// \var typedef QList< QwtPlotItem *> QwtPlotItemList -/// \brief See QT 4.x assistant documentation for QList -typedef QList<QwtPlotItem *> QwtPlotItemList; -#endif - -/*! - \brief A dictionary for plot items - - QwtPlotDict organizes plot items in increasing z-order. - If autoDelete() is enabled, all attached items will be deleted - in the destructor of the dictionary. - - \sa QwtPlotItem::attach(), QwtPlotItem::detach(), QwtPlotItem::z() -*/ -class QWT_EXPORT QwtPlotDict -{ -public: - explicit QwtPlotDict(); - ~QwtPlotDict(); - - void setAutoDelete(bool); - bool autoDelete() const; - - const QwtPlotItemList& itemList() const; - - void detachItems(int rtti = QwtPlotItem::Rtti_PlotItem, - bool autoDelete = true); - -private: - friend class QwtPlotItem; - - void attachItem(QwtPlotItem *, bool); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_grid.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_grid.h deleted file mode 100644 index ef64ddd0f700f242522b02347f18eab5a362bf1a..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_grid.h +++ /dev/null @@ -1,84 +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_PLOT_GRID_H -#define QWT_PLOT_GRID_H - -#include "qwt_global.h" -#include "qwt_plot_item.h" -#include "qwt_scale_div.h" - -class QPainter; -class QPen; -class QwtScaleMap; -class QwtScaleDiv; - -/*! - \brief A class which draws a coordinate grid - - The QwtPlotGrid class can be used to draw a coordinate grid. - A coordinate grid consists of major and minor vertical - and horizontal gridlines. The locations of the gridlines - are determined by the X and Y scale divisions which can - be assigned with setXDiv() and setYDiv(). - The draw() member draws the grid within a bounding - rectangle. -*/ - -class QWT_EXPORT QwtPlotGrid: public QwtPlotItem -{ -public: - explicit QwtPlotGrid(); - virtual ~QwtPlotGrid(); - - virtual int rtti() const; - - void enableX(bool tf); - bool xEnabled() const; - - void enableY(bool tf); - bool yEnabled() const; - - void enableXMin(bool tf); - bool xMinEnabled() const; - - void enableYMin(bool tf); - bool yMinEnabled() const; - - void setXDiv(const QwtScaleDiv &sx); - const QwtScaleDiv &xScaleDiv() const; - - void setYDiv(const QwtScaleDiv &sy); - const QwtScaleDiv &yScaleDiv() const; - - void setPen(const QPen &p); - - void setMajPen(const QPen &p); - const QPen& majPen() const; - - void setMinPen(const QPen &p); - const QPen& minPen() const; - - virtual void draw(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - const QRect &rect) const; - - virtual void updateScaleDiv(const QwtScaleDiv &xMap, - const QwtScaleDiv &yMap); - -private: - void drawLines(QPainter *painter, const QRect &, - Qt::Orientation orientation, const QwtScaleMap &, - const QwtValueList &) const; - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_item.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_item.h deleted file mode 100644 index 643819b1b05c66c7633a1d7be3bc06410eb6b9aa..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_item.h +++ /dev/null @@ -1,147 +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_PLOT_ITEM_H -#define QWT_PLOT_ITEM_H - -#include "qwt_global.h" -#include "qwt_legend_itemmanager.h" -#include "qwt_text.h" -#include "qwt_double_rect.h" - -class QString; -class QRect; -class QPainter; -class QWidget; -class QwtPlot; -class QwtLegend; -class QwtScaleMap; -class QwtScaleDiv; - -/*! - \brief Base class for items on the plot canvas -*/ - -class QWT_EXPORT QwtPlotItem: public QwtLegendItemManager -{ -public: - enum RttiValues - { - Rtti_PlotItem = 0, - - Rtti_PlotGrid, - Rtti_PlotScale, - Rtti_PlotMarker, - Rtti_PlotCurve, - Rtti_PlotHistogram, - Rtti_PlotSpectrogram, - Rtti_PlotSVG, - - Rtti_PlotUserItem = 1000 - }; - - enum ItemAttribute - { - Legend = 1, - AutoScale = 2 - }; - -#if QT_VERSION >= 0x040000 - enum RenderHint - { - RenderAntialiased = 1 - }; -#endif - - explicit QwtPlotItem(const QwtText &title = QwtText()); - virtual ~QwtPlotItem(); - - void attach(QwtPlot *plot); - - /*! - \brief This method detaches a QwtPlotItem from any QwtPlot it has been - associated with. - - detach() is equivalent to calling attach( NULL ) - \sa attach( QwtPlot* plot ) - */ - void detach() { attach(NULL); } - - QwtPlot *plot() const; - - void setTitle(const QString &title); - void setTitle(const QwtText &title); - const QwtText &title() const; - - virtual int rtti() const; - - void setItemAttribute(ItemAttribute, bool on = true); - bool testItemAttribute(ItemAttribute) const; - -#if QT_VERSION >= 0x040000 - void setRenderHint(RenderHint, bool on = true); - bool testRenderHint(RenderHint) const; -#endif - - double z() const; - void setZ(double z); - - void show(); - void hide(); - virtual void setVisible(bool); - bool isVisible () const; - - void setAxis(int xAxis, int yAxis); - - void setXAxis(int axis); - int xAxis() const; - - void setYAxis(int axis); - int yAxis() const; - - virtual void itemChanged(); - - /*! - \brief Draw the item - - \param painter Painter - \param xMap Maps x-values into pixel coordinates. - \param yMap Maps y-values into pixel coordinates. - \param canvasRect Contents rect of the canvas in painter coordinates - */ - virtual void draw(QPainter *painter, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - const QRect &canvasRect) const = 0; - - virtual QwtDoubleRect boundingRect() const; - - virtual void updateLegend(QwtLegend *) const; - virtual void updateScaleDiv(const QwtScaleDiv&, - const QwtScaleDiv&); - - virtual QWidget *legendItem() const; - - QwtDoubleRect scaleRect(const QwtScaleMap &, const QwtScaleMap &) const; - QRect paintRect(const QwtScaleMap &, const QwtScaleMap &) const; - - QRect transform(const QwtScaleMap &, const QwtScaleMap &, - const QwtDoubleRect&) const; - QwtDoubleRect invTransform(const QwtScaleMap &, const QwtScaleMap &, - const QRect&) const; - -private: - // Disabled copy constructor and operator= - QwtPlotItem( const QwtPlotItem & ); - QwtPlotItem &operator=( const QwtPlotItem & ); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_layout.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_layout.h deleted file mode 100644 index 9eaeb1a2ce58f77dbd1d032a8b8d8e3bc32e84bd..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_layout.h +++ /dev/null @@ -1,88 +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_PLOT_LAYOUT_H -#define QWT_PLOT_LAYOUT_H - -#include "qwt_global.h" -#include "qwt_plot.h" - -/*! - \brief Layout class for QwtPlot. - - Organizes the geometry for the different QwtPlot components. -*/ - -class QWT_EXPORT QwtPlotLayout -{ -public: - enum Options - { - AlignScales = 1, - IgnoreScrollbars = 2, - IgnoreFrames = 4, - IgnoreMargin = 8, - IgnoreLegend = 16 - }; - - explicit QwtPlotLayout(); - virtual ~QwtPlotLayout(); - - void setMargin(int); - int margin() const; - - void setCanvasMargin(int margin, int axis = -1); - int canvasMargin(int axis) const; - - void setAlignCanvasToScales(bool); - bool alignCanvasToScales() const; - - void setSpacing(int); - int spacing() const; - - void setLegendPosition(QwtPlot::LegendPosition pos, double ratio); - void setLegendPosition(QwtPlot::LegendPosition pos); - QwtPlot::LegendPosition legendPosition() const; - - void setLegendRatio(double ratio); - double legendRatio() const; - - virtual QSize minimumSizeHint(const QwtPlot *) const; - - virtual void activate(const QwtPlot *, - const QRect &rect, int options = 0); - - virtual void invalidate(); - - const QRect &titleRect() const; - const QRect &legendRect() const; - const QRect &scaleRect(int axis) const; - const QRect &canvasRect() const; - - class LayoutData; - -protected: - - QRect layoutLegend(int options, const QRect &) const; - QRect alignLegend(const QRect &canvasRect, - const QRect &legendRect) const; - - void expandLineBreaks(int options, const QRect &rect, - int &dimTitle, int dimAxes[QwtPlot::axisCnt]) const; - - void alignScales(int options, QRect &canvasRect, - QRect scaleRect[QwtPlot::axisCnt]) const; - -private: - class PrivateData; - - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_magnifier.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_magnifier.h deleted file mode 100644 index 2e32395604efbe6471ed54912271d2c105ebeeec..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_magnifier.h +++ /dev/null @@ -1,55 +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_PLOT_MAGNIFIER_H -#define QWT_PLOT_MAGNIFIER_H 1 - -#include "qwt_global.h" -#include "qwt_magnifier.h" - -class QwtPlotCanvas; -class QwtPlot; - -/*! - \brief QwtPlotMagnifier provides zooming, by magnifying in steps. - - Using QwtPlotMagnifier a plot can be zoomed in/out in steps using - keys, the mouse wheel or moving a mouse button in vertical direction. - - Together with QwtPlotZoomer and QwtPlotPanner it is possible to implement - individual and powerful navigation of the plot canvas. - - \sa QwtPlotZoomer, QwtPlotPanner, QwtPlot -*/ -class QWT_EXPORT QwtPlotMagnifier: public QwtMagnifier -{ - Q_OBJECT - -public: - explicit QwtPlotMagnifier(QwtPlotCanvas *); - virtual ~QwtPlotMagnifier(); - - void setAxisEnabled(int axis, bool on); - bool isAxisEnabled(int axis) const; - - QwtPlotCanvas *canvas(); - const QwtPlotCanvas *canvas() const; - - QwtPlot *plot(); - const QwtPlot *plot() const; - -protected: - virtual void rescale(double factor); - -private: - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_marker.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_marker.h deleted file mode 100644 index cc9b81111dfc8144b9e9809f2ce02bb24d469443..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_marker.h +++ /dev/null @@ -1,100 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_PLOT_MARKER_H -#define QWT_PLOT_MARKER_H - -#include <qpen.h> -#include <qfont.h> -#include <qstring.h> -#include <qbrush.h> -#include "qwt_global.h" -#include "qwt_plot_item.h" - -class QRect; -class QwtText; -class QwtSymbol; - -/*! - \brief A class for drawing markers - - A marker can be a horizontal line, a vertical line, - a symbol, a label or any combination of them, which can - be drawn around a center point inside a bounding rectangle. - - The QwtPlotMarker::setSymbol() member assigns a symbol to the marker. - The symbol is drawn at the specified point. - - With QwtPlotMarker::setLabel(), a label can be assigned to the marker. - The QwtPlotMarker::setLabelAlignment() member specifies where the label is - drawn. All the Align*-constants in Qt::AlignmentFlags (see Qt documentation) - are valid. The interpretation of the alignment depends on the marker's - line style. The alignment refers to the center point of - the marker, which means, for example, that the label would be printed - left above the center point if the alignment was set to AlignLeft|AlignTop. -*/ - -class QWT_EXPORT QwtPlotMarker: public QwtPlotItem -{ -public: - - /*! - Line styles. - \sa QwtPlotMarker::setLineStyle, QwtPlotMarker::lineStyle - */ - enum LineStyle {NoLine, HLine, VLine, Cross}; - - explicit QwtPlotMarker(); - virtual ~QwtPlotMarker(); - - virtual int rtti() const; - - double xValue() const; - double yValue() const; - QwtDoublePoint value() const; - - void setXValue(double); - void setYValue(double); - void setValue(double, double); - void setValue(const QwtDoublePoint &); - - void setLineStyle(LineStyle st); - LineStyle lineStyle() const; - - void setLinePen(const QPen &p); - const QPen &linePen() const; - - void setSymbol(const QwtSymbol &s); - const QwtSymbol &symbol() const; - - void setLabel(const QwtText&); - QwtText label() const; - -#if QT_VERSION < 0x040000 - void setLabelAlignment(int align); - int labelAlignment() const; -#else - void setLabelAlignment(Qt::Alignment); - Qt::Alignment labelAlignment() const; -#endif - - virtual void draw(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - const QRect &) const; - - virtual QwtDoubleRect boundingRect() const; - -private: - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_panner.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_panner.h deleted file mode 100644 index 0448a8fa2b9c256078dfaf46aab3c1ffb64a93d5..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_panner.h +++ /dev/null @@ -1,57 +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_PLOT_PANNER_H -#define QWT_PLOT_PANNER_H 1 - -#include "qwt_global.h" -#include "qwt_panner.h" - -class QwtPlotCanvas; -class QwtPlot; - -/*! - \brief QwtPlotPanner provides panning of a plot canvas - - QwtPlotPanner is a panner for a QwtPlotCanvas, that - adjusts the scales of the axes after dropping - the canvas on its new position. - - Together with QwtPlotZoomer and QwtPlotMagnifier powerful ways - of navigating on a QwtPlot widget can be implemented easily. - - \note The axes are not updated, while dragging the canvas - \sa QwtPlotZoomer, QwtPlotMagnifier -*/ -class QWT_EXPORT QwtPlotPanner: public QwtPanner -{ - Q_OBJECT - -public: - explicit QwtPlotPanner(QwtPlotCanvas *); - virtual ~QwtPlotPanner(); - - QwtPlotCanvas *canvas(); - const QwtPlotCanvas *canvas() const; - - QwtPlot *plot(); - const QwtPlot *plot() const; - - void setAxisEnabled(int axis, bool on); - bool isAxisEnabled(int axis) const; - -protected slots: - virtual void moveCanvas(int dx, int dy); - -private: - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_picker.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_picker.h deleted file mode 100644 index 091ab0698c46f0c1625d4b97786ff57aeb8cf12c..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_picker.h +++ /dev/null @@ -1,114 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_PLOT_PICKER_H -#define QWT_PLOT_PICKER_H - -#include "qwt_double_rect.h" -#include "qwt_plot_canvas.h" -#include "qwt_picker.h" - -class QwtPlot; - -/*! - \brief QwtPlotPicker provides selections on a plot canvas - - QwtPlotPicker is a QwtPicker tailored for selections on - a plot canvas. It is set to a x-Axis and y-Axis and - translates all pixel coordinates into this coodinate system. -*/ - -class QWT_EXPORT QwtPlotPicker: public QwtPicker -{ - Q_OBJECT - -public: - explicit QwtPlotPicker(QwtPlotCanvas *); - - explicit QwtPlotPicker(int xAxis, int yAxis, - QwtPlotCanvas *); - - explicit QwtPlotPicker(int xAxis, int yAxis, int selectionFlags, - RubberBand rubberBand, DisplayMode trackerMode, - QwtPlotCanvas *); - - virtual void setAxis(int xAxis, int yAxis); - - int xAxis() const; - int yAxis() const; - - QwtPlot *plot(); - const QwtPlot *plot() const; - - QwtPlotCanvas *canvas(); - const QwtPlotCanvas *canvas() const; - -signals: - - /*! - A signal emitted in case of selectionFlags() & PointSelection. - \param pos Selected point - */ - void selected(const QwtDoublePoint &pos); - - /*! - A signal emitted in case of selectionFlags() & RectSelection. - \param rect Selected rectangle - */ - void selected(const QwtDoubleRect &rect); - - /*! - A signal emitting the selected points, - at the end of a selection. - - \param pa Selected points - */ - void selected(const QwtArray<QwtDoublePoint> &pa); - - /*! - A signal emitted when a point has been appended to the selection - - \param pos Position of the appended point. - \sa append(). moved() - */ - void appended(const QwtDoublePoint &pos); - - /*! - A signal emitted whenever the last appended point of the - selection has been moved. - - \param pos Position of the moved last point of the selection. - \sa move(), appended() - */ - void moved(const QwtDoublePoint &pos); - -protected: - QwtDoubleRect scaleRect() const; - - QwtDoubleRect invTransform(const QRect &) const; - QRect transform(const QwtDoubleRect &) const; - - QwtDoublePoint invTransform(const QPoint &) const; - QPoint transform(const QwtDoublePoint &) const; - - virtual QwtText trackerText(const QPoint &) const; - virtual QwtText trackerText(const QwtDoublePoint &) const; - - virtual void move(const QPoint &); - virtual void append(const QPoint &); - virtual bool end(bool ok = true); - -private: - int d_xAxis; - int d_yAxis; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_printfilter.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_printfilter.h deleted file mode 100644 index 2a965b18464de4e2fc8c53c1ef9a3d05b840fc35..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_printfilter.h +++ /dev/null @@ -1,83 +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_PLOT_PRINTFILTER_H -#define QWT_PLOT_PRINTFILTER_H - -#include <qcolor.h> -#include <qfont.h> -#include "qwt_global.h" - -class QwtPlot; -class QwtPlotItem; - -/*! - \brief A base class for plot print filters. - - A print filter can be used to customize QwtPlot::print(). - - \deprecated In Qwt 5.0 the design of QwtPlot allows/recommends writing - individual QwtPlotItems, that are not known to QwtPlotPrintFilter. - So this concept is outdated and QwtPlotPrintFilter will be - removed/replaced in Qwt 6.x. -*/ -class QWT_EXPORT QwtPlotPrintFilter -{ -public: - //! Print options - enum Options - { - PrintMargin = 1, - PrintTitle = 2, - PrintLegend = 4, - PrintGrid = 8, - PrintCanvasBackground = 16, - PrintWidgetBackground = 32, - - PrintAll = ~PrintWidgetBackground - }; - - //! Print items - enum Item - { - Title, - Legend, - Curve, - CurveSymbol, - Marker, - MarkerSymbol, - MajorGrid, - MinorGrid, - CanvasBackground, - AxisScale, - AxisTitle, - WidgetBackground - }; - - explicit QwtPlotPrintFilter(); - virtual ~QwtPlotPrintFilter(); - - virtual QColor color(const QColor &, Item item) const; - virtual QFont font(const QFont &, Item item) const; - - void setOptions(int options); - int options() const; - - virtual void apply(QwtPlot *) const; - virtual void reset(QwtPlot *) const; - - virtual void apply(QwtPlotItem *) const; - virtual void reset(QwtPlotItem *) const; - -private: - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_rasteritem.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_rasteritem.h deleted file mode 100644 index db79f86dca56ffafc74bf0cbf0581c66ea7be39b..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_rasteritem.h +++ /dev/null @@ -1,107 +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_PLOT_RASTERITEM_H -#define QWT_PLOT_RASTERITEM_H - -#include <qglobal.h> -#include <qstring.h> -#include <qimage.h> - -#include "qwt_plot_item.h" - -/*! - \brief A class, which displays raster data - - Raster data is a grid of pixel values, that can be represented - as a QImage. It is used for many types of information like - spectrograms, cartograms, geographical maps ... - - Often a plot has several types of raster data organized in layers. - ( f.e a geographical map, with weather statistics ). - Using setAlpha() raster items can be stacked easily. - - QwtPlotRasterItem is only implemented for images of the following formats: - QImage::Format_Indexed8, QImage::Format_ARGB32. - - \sa QwtPlotSpectrogram -*/ - -class QWT_EXPORT QwtPlotRasterItem: public QwtPlotItem -{ -public: - /*! - - NoCache\n - renderImage() is called, whenever the item has to be repainted - - PaintCache\n - renderImage() is called, whenever the image cache is not valid, - or the scales, or the size of the canvas has changed. This type - of cache is only useful for improving the performance of hide/show - operations. All other situations are already handled by the - plot canvas cache. - - ScreenCache\n - The screen cache is an image in size of the screen. As long as - the scales don't change the target image is scaled from the cache. - This might improve the performance - when resizing the plot widget, but suffers from scaling effects. - - The default policy is NoCache - */ - enum CachePolicy - { - NoCache, - PaintCache, - ScreenCache - }; - - explicit QwtPlotRasterItem(const QString& title = QString::null); - explicit QwtPlotRasterItem(const QwtText& title); - virtual ~QwtPlotRasterItem(); - - void setAlpha(int alpha); - int alpha() const; - - void setCachePolicy(CachePolicy); - CachePolicy cachePolicy() const; - - void invalidateCache(); - - virtual void draw(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - const QRect &rect) const; - - virtual QSize rasterHint(const QwtDoubleRect &) const; - -protected: - - /*! - Renders an image for an area - - The format of the image must be QImage::Format_Indexed8, - QImage::Format_RGB32 or QImage::Format_ARGB32 - - \param xMap Maps x-values into pixel coordinates. - \param yMap Maps y-values into pixel coordinates. - \param area Requested area for the image in scale coordinates - */ - virtual QImage renderImage(const QwtScaleMap &xMap, - const QwtScaleMap &yMap, const QwtDoubleRect &area - ) const = 0; - -private: - QwtPlotRasterItem( const QwtPlotRasterItem & ); - QwtPlotRasterItem &operator=( const QwtPlotRasterItem & ); - - void init(); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_scaleitem.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_scaleitem.h deleted file mode 100644 index 9107cb80bd0d4ed5ab5371e388613633f76bbdf4..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_scaleitem.h +++ /dev/null @@ -1,105 +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_PLOT_SCALE_ITEM_H -#define QWT_PLOT_SCALE_ITEM_H - -#include "qwt_global.h" -#include "qwt_plot_item.h" -#include "qwt_scale_draw.h" - -#if QT_VERSION < 0x040000 -class QColorGroup; -#else -class QPalette; -#endif - -/*! - \brief A class which draws a scale inside the plot canvas - - QwtPlotScaleItem can be used to draw an axis inside the plot canvas. - It might by synchronized to one of the axis of the plot, but can - also display its own ticks and labels. - - It is allowed to synchronize the scale item with a disabled axis. - In plots with vertical and horizontal scale items, it might be - necessary to remove ticks at the intersections, by overloading - updateScaleDiv(). - - The scale might be at a specific position (f.e 0.0) or it might be - aligned to a canvas border. - - \par Example - The following example shows how to replace the left axis, by a scale item - at the x position 0.0. - \verbatim -QwtPlotScaleItem *scaleItem = - new QwtPlotScaleItem(QwtScaleDraw::RightScale, 0.0); -scaleItem->setFont(plot->axisWidget(QwtPlot::yLeft)->font()); -scaleItem->attach(plot); - -plot->enableAxis(QwtPlot::yLeft, false); -\endverbatim -*/ - -class QWT_EXPORT QwtPlotScaleItem: public QwtPlotItem -{ -public: - explicit QwtPlotScaleItem( - QwtScaleDraw::Alignment = QwtScaleDraw::BottomScale, - const double pos = 0.0); - virtual ~QwtPlotScaleItem(); - - virtual int rtti() const; - - void setScaleDiv(const QwtScaleDiv& ); - const QwtScaleDiv& scaleDiv() const; - - void setScaleDivFromAxis(bool on); - bool isScaleDivFromAxis() const; - -#if QT_VERSION < 0x040000 - void setColorGroup(const QColorGroup &); - QColorGroup colorGroup() const; -#else - void setPalette(const QPalette &); - QPalette palette() const; -#endif - - void setFont(const QFont&); - QFont font() const; - - void setScaleDraw(QwtScaleDraw *); - - const QwtScaleDraw *scaleDraw() const; - QwtScaleDraw *scaleDraw(); - - void setPosition(double pos); - double position() const; - - void setBorderDistance(int numPixels); - int borderDistance() const; - - void setAlignment(QwtScaleDraw::Alignment); - - virtual void draw(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - const QRect &rect) const; - - virtual void updateScaleDiv(const QwtScaleDiv&, - const QwtScaleDiv&); - -private: - void updateBorders(); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_spectrogram.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_spectrogram.h deleted file mode 100644 index 6f3389d4c2be3df090fecd4c4de88fdb67c95ac9..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_spectrogram.h +++ /dev/null @@ -1,109 +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_PLOT_SPECTROGRAM_H -#define QWT_PLOT_SPECTROGRAM_H - -#include <qglobal.h> - -#include "qwt_valuelist.h" -#include "qwt_raster_data.h" -#include "qwt_plot_rasteritem.h" - -class QwtColorMap; - -/*! - \brief A plot item, which displays a spectrogram - - A spectrogram displays threedimenional data, where the 3rd dimension - ( the intensity ) is displayed using colors. The colors are calculated - from the values using a color map. - - In ContourMode contour lines are painted for the contour levels. - - \image html spectrogram3.png - - \sa QwtRasterData, QwtColorMap -*/ - -class QWT_EXPORT QwtPlotSpectrogram: public QwtPlotRasterItem -{ -public: - /*! - The display mode controls how the raster data will be represented. - - ImageMode\n - The values are mapped to colors using a color map. - - ContourMode\n - The data is displayed using contour lines - - When both modes are enabled the contour lines are painted on - top of the spectrogram. The default setting enables ImageMode. - - \sa setDisplayMode(), testDisplayMode() - */ - - enum DisplayMode - { - ImageMode = 1, - ContourMode = 2 - }; - - explicit QwtPlotSpectrogram(const QString &title = QString::null); - virtual ~QwtPlotSpectrogram(); - - void setDisplayMode(DisplayMode, bool on = true); - bool testDisplayMode(DisplayMode) const; - - void setData(const QwtRasterData &data); - const QwtRasterData &data() const; - - void setColorMap(const QwtColorMap &); - const QwtColorMap &colorMap() const; - - virtual QwtDoubleRect boundingRect() const; - virtual QSize rasterHint(const QwtDoubleRect &) const; - - void setDefaultContourPen(const QPen &); - QPen defaultContourPen() const; - - virtual QPen contourPen(double level) const; - - void setConrecAttribute(QwtRasterData::ConrecAttribute, bool on); - bool testConrecAttribute(QwtRasterData::ConrecAttribute) const; - - void setContourLevels(const QwtValueList &); - QwtValueList contourLevels() const; - - virtual int rtti() const; - - virtual void draw(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - const QRect &rect) const; - -protected: - virtual QImage renderImage( - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - const QwtDoubleRect &rect) const; - - virtual QSize contourRasterSize( - const QwtDoubleRect &, const QRect &) const; - - virtual QwtRasterData::ContourLines renderContourLines( - const QwtDoubleRect &rect, const QSize &raster) const; - - virtual void drawContourLines(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - const QwtRasterData::ContourLines& lines) const; - -private: - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_svgitem.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_svgitem.h deleted file mode 100644 index 296d31f00e59d4a889b0bb63f6c5c1ea9199f759..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_svgitem.h +++ /dev/null @@ -1,66 +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_PLOT_SVGITEM_H -#define QWT_PLOT_SVGITEM_H - -#include <qglobal.h> - -#include <qstring.h> -#include "qwt_double_rect.h" -#include "qwt_plot_item.h" - -#if QT_VERSION >= 0x040100 -class QSvgRenderer; -class QByteArray; -#endif - -/*! - \brief A plot item, which displays - data in Scalable Vector Graphics (SVG) format. - - SVG images are often used to display maps -*/ - -class QWT_EXPORT QwtPlotSvgItem: public QwtPlotItem -{ -public: - explicit QwtPlotSvgItem(const QString& title = QString::null ); - explicit QwtPlotSvgItem(const QwtText& title ); - virtual ~QwtPlotSvgItem(); - - bool loadFile(const QwtDoubleRect&, const QString &fileName); - bool loadData(const QwtDoubleRect&, const QByteArray &); - - virtual QwtDoubleRect boundingRect() const; - - virtual void draw(QPainter *p, - const QwtScaleMap &xMap, const QwtScaleMap &yMap, - const QRect &rect) const; - - virtual int rtti() const; - -protected: -#if QT_VERSION >= 0x040100 - const QSvgRenderer &renderer() const; - QSvgRenderer &renderer(); -#endif - - void render(QPainter *painter, - const QwtDoubleRect &viewBox, const QRect &rect) const; - QwtDoubleRect viewBox(const QwtDoubleRect &area) const; - -private: - void init(); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_zoomer.h b/Code/qtiplot/3rdparty/qwt/src/qwt_plot_zoomer.h deleted file mode 100644 index fffc841b1762510c5611851247a5f098d7e06884..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_plot_zoomer.h +++ /dev/null @@ -1,122 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_PLOT_ZOOMER_H -#define QWT_PLOT_ZOOMER_H - -#include <qglobal.h> -#if QT_VERSION < 0x040000 -#include <qvaluestack.h> -#else -#include <qstack.h> -#endif - -#include "qwt_double_rect.h" -#include "qwt_plot_picker.h" - -/*! - \brief QwtPlotZoomer provides stacked zooming for a plot widget - - QwtPlotZoomer offers rubberband selections on the plot canvas, - translating the selected rectangles into plot coordinates and - adjusting the axes to them. Zooming can repeated as often as - possible, limited only by maxStackDepth() or minZoomSize(). - Each rectangle is pushed on a stack. - - Zoom rectangles can be selected depending on selectionFlags() using the - mouse or keyboard (QwtEventPattern, QwtPickerMachine). - QwtEventPattern::MouseSelect3/QwtEventPattern::KeyUndo, - or QwtEventPattern::MouseSelect6/QwtEventPattern::KeyRedo - walk up and down the zoom stack. - QwtEventPattern::MouseSelect2 or QwtEventPattern::KeyHome unzoom to - the initial size. - - QwtPlotZoomer is tailored for plots with one x and y axis, but it is - allowed to attach a second QwtPlotZoomer for the other axes. - - \note The realtime example includes an derived zoomer class that adds - scrollbars to the plot canvas. -*/ - -class QWT_EXPORT QwtPlotZoomer: public QwtPlotPicker -{ - Q_OBJECT -public: - explicit QwtPlotZoomer(QwtPlotCanvas *, bool doReplot = true); - explicit QwtPlotZoomer(int xAxis, int yAxis, - QwtPlotCanvas *, bool doReplot = true); - explicit QwtPlotZoomer(int xAxis, int yAxis, int selectionFlags, - DisplayMode trackerMode, QwtPlotCanvas *, - bool doReplot = true); - - virtual ~QwtPlotZoomer(); - - virtual void setZoomBase(bool doReplot = true); - virtual void setZoomBase(const QwtDoubleRect &); - - QwtDoubleRect zoomBase() const; - QwtDoubleRect zoomRect() const; - - virtual void setAxis(int xAxis, int yAxis); - - void setMaxStackDepth(int); - int maxStackDepth() const; - -#if QT_VERSION < 0x040000 - const QValueStack<QwtDoubleRect> &zoomStack() const; - void setZoomStack(const QValueStack<QwtDoubleRect> &, - int zoomRectIndex = -1); -#else - const QStack<QwtDoubleRect> &zoomStack() const; - void setZoomStack(const QStack<QwtDoubleRect> &, - int zoomRectIndex = -1); -#endif - uint zoomRectIndex() const; - - virtual void setSelectionFlags(int); - -public slots: - void moveBy(double x, double y); - virtual void move(double x, double y); - - virtual void zoom(const QwtDoubleRect &); - virtual void zoom(int up); - -signals: - /*! - A signal emitting the zoomRect(), when the plot has been - zoomed in or out. - - \param rect Current zoom rectangle. - */ - - void zoomed(const QwtDoubleRect &rect); - -protected: - virtual void rescale(); - - virtual QwtDoubleSize minZoomSize() const; - - virtual void widgetMouseReleaseEvent(QMouseEvent *); - virtual void widgetKeyPressEvent(QKeyEvent *); - - virtual void begin(); - virtual bool end(bool ok = true); - virtual bool accept(QwtPolygon &) const; - -private: - void init(int selectionFlags, DisplayMode trackerMode, bool doReplot); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_polygon.h b/Code/qtiplot/3rdparty/qwt/src/qwt_polygon.h deleted file mode 100644 index eda9329dd3f8aa3709161618366adca2ae8a9612..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_polygon.h +++ /dev/null @@ -1,35 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_POLYGON_H -#define QWT_POLYGON_H - -#include "qwt_global.h" - -/*! - \def QwtPolygon - */ - -#if QT_VERSION < 0x040000 -#include <qpointarray.h> -#include "qwt_double_rect.h" - -typedef QPointArray QwtPolygon; -typedef QMemArray<QwtDoublePoint> QwtPolygonF; - -#else - -#include <qpolygon.h> -typedef QPolygon QwtPolygon; -typedef QPolygonF QwtPolygonF; -#endif - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_raster_data.h b/Code/qtiplot/3rdparty/qwt/src/qwt_raster_data.h deleted file mode 100644 index dcaf27f7239fde645d7123ab68358c3c67f080e7..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_raster_data.h +++ /dev/null @@ -1,106 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_RASTER_DATA_H -#define QWT_RASTER_DATA_H 1 - -#include <qmap.h> -#include "qwt_global.h" -#include "qwt_double_rect.h" -#include "qwt_double_interval.h" - -#if QT_VERSION >= 0x040000 -#include <qlist.h> -#include <QPolygonF> - -#if defined(QWT_TEMPLATEDLL) -// MOC_SKIP_BEGIN -template class QWT_EXPORT QMap<double, QPolygonF>; -// MOC_SKIP_END -#endif - -#else -#include <qvaluelist.h> -#include "qwt_array.h" -#include "qwt_double_rect.h" -#if defined(QWT_TEMPLATEDLL) -// MOC_SKIP_BEGIN -#ifndef QWTARRAY_TEMPLATE_QWTDOUBLEPOINT // by mjo3 -#define QWTARRAY_TEMPLATE_QWTDOUBLEPOINT -template class QWT_EXPORT QwtArray<QwtDoublePoint>; -#endif //end of QWTARRAY_TEMPLATE_QWTDOUBLEPOINT -#ifndef QMAP_TEMPLATE_DOUBLE_QWTDOUBLEPOINT // by mjo3 -#define QMAP_TEMPLATE_DOUBLE_QWTDOUBLEPOINT -template class QWT_EXPORT QMap<double, QwtArray<QwtDoublePoint> >; -#endif //end of QMAP_TEMPLATE_QWTDOUBLEPOINT -// MOC_SKIP_END -#endif -#endif - -class QwtScaleMap; - -/*! - \brief QwtRasterData defines an interface to any type of raster data. -*/ -class QWT_EXPORT QwtRasterData -{ -public: -#if QT_VERSION >= 0x040000 - typedef QMap<double, QPolygonF> ContourLines; -#else - typedef QMap<double, QwtArray<QwtDoublePoint> > ContourLines; -#endif - - enum ConrecAttribute - { - IgnoreAllVerticesOnLevel = 1, - IgnoreOutOfRange = 2 - }; - - QwtRasterData(); - QwtRasterData(const QwtDoubleRect &); - virtual ~QwtRasterData(); - - //! Clone the data - virtual QwtRasterData *copy() const = 0; - - virtual void setBoundingRect(const QwtDoubleRect &); - QwtDoubleRect boundingRect() const; - - virtual QSize rasterHint(const QwtDoubleRect &) const; - - virtual void initRaster(const QwtDoubleRect &, const QSize& raster); - virtual void discardRaster(); - - //! \return the value at a raster position - virtual double value(double x, double y) const = 0; - - //! \return the range of the values - virtual QwtDoubleInterval range() const = 0; - -#if QT_VERSION >= 0x040000 - virtual ContourLines contourLines(const QwtDoubleRect &rect, - const QSize &raster, const QList<double> &levels, - int flags) const; -#else - virtual ContourLines contourLines(const QwtDoubleRect &rect, - const QSize &raster, const QValueList<double> &levels, - int flags) const; -#endif - - class Contour3DPoint; - class ContourPlane; - -private: - QwtDoubleRect d_boundingRect; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_rect.h b/Code/qtiplot/3rdparty/qwt/src/qwt_rect.h deleted file mode 100644 index 94bc3bc02f4e16dfca213bc28e26b6c51beac274..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_rect.h +++ /dev/null @@ -1,32 +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_RECT_H -#define QWT_RECT_H - -#include <qrect.h> -#include "qwt_global.h" -#include "qwt_polygon.h" - -/*! - Some extensions for QRect - \deprecated Use QwtClipper instead. -*/ - -class QWT_EXPORT QwtRect : public QRect -{ -public: - QwtRect(); - QwtRect(const QRect &r); - -private: - QwtPolygon clip(const QwtPolygon &) const; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_round_scale_draw.h b/Code/qtiplot/3rdparty/qwt/src/qwt_round_scale_draw.h deleted file mode 100644 index ea262902dbf8ae64252821e8acfe8e20c61516dc..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_round_scale_draw.h +++ /dev/null @@ -1,68 +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_ROUND_SCALE_DRAW_H -#define QWT_ROUND_SCALE_DRAW_H - -#include <qpoint.h> -#include "qwt_global.h" -#include "qwt_abstract_scale_draw.h" - -class QPen; - -/*! - \brief A class for drawing round scales - - QwtRoundScaleDraw can be used to draw round scales. - The circle segment can be adjusted by QwtRoundScaleDraw::setAngleRange(). - The geometry of the scale can be specified with - QwtRoundScaleDraw::moveCenter() and QwtRoundScaleDraw::setRadius(). - - After a scale division has been specified as a QwtScaleDiv object - using QwtAbstractScaleDraw::setScaleDiv(const QwtScaleDiv &s), - the scale can be drawn with the QwtAbstractScaleDraw::draw() member. -*/ - -class QWT_EXPORT QwtRoundScaleDraw: public QwtAbstractScaleDraw -{ -public: - QwtRoundScaleDraw(); - QwtRoundScaleDraw(const QwtRoundScaleDraw &); - - virtual ~QwtRoundScaleDraw(); - - QwtRoundScaleDraw &operator=(const QwtRoundScaleDraw &other); - - void setRadius(int radius); - int radius() const; - - void moveCenter(int x, int y); - void moveCenter(const QPoint &); - QPoint center() const; - - void setAngleRange(double angle1, double angle2); - - virtual int extent(const QPen &, const QFont &) const; - -protected: - virtual void drawTick(QPainter *p, double val, int len) const; - virtual void drawBackbone(QPainter *p) const; - virtual void drawLabel(QPainter *p, double val) const; - -private: - class PrivateData; - PrivateData *d_data; -}; - -inline void QwtRoundScaleDraw::moveCenter(int x, int y) -{ - moveCenter(QPoint(x, y)); -} - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_scale_div.h b/Code/qtiplot/3rdparty/qwt/src/qwt_scale_div.h deleted file mode 100644 index 20b660936d4812294c70a19272168161a94f6db4..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_scale_div.h +++ /dev/null @@ -1,123 +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_SCALE_DIV_H -#define QWT_SCALE_DIV_H - -#include "qwt_global.h" -#include "qwt_valuelist.h" -#include "qwt_double_interval.h" - -class QwtDoubleInterval; - -/*! - \brief A class representing a scale division - - A scale division consists of its limits and 3 list - of tick values qualified as major, medium and minor ticks. - - In most cases scale divisions are calculated by a QwtScaleEngine. - - \sa QwtScaleEngine::subDivideInto, QwtScaleEngine::subDivide -*/ - -class QWT_EXPORT QwtScaleDiv -{ -public: - enum TickType - { - NoTick = -1, - - MinorTick, - MediumTick, - MajorTick, - - NTickTypes - }; - - explicit QwtScaleDiv(); - explicit QwtScaleDiv(const QwtDoubleInterval &, - QwtValueList[NTickTypes]); - explicit QwtScaleDiv(double lBound, double rBound, - QwtValueList[NTickTypes]); - - int operator==(const QwtScaleDiv &s) const; - int operator!=(const QwtScaleDiv &s) const; - - void setInterval(double lBound, double rBound); - void setInterval(const QwtDoubleInterval &); - QwtDoubleInterval interval() const; - - inline double lBound() const; - inline double hBound() const; - inline double range() const; - - bool contains(double v) const; - - void setTicks(int type, const QwtValueList &); - const QwtValueList &ticks(int type) const; - - void invalidate(); - bool isValid() const; - - void invert(); - -private: - double d_lBound; - double d_hBound; - QwtValueList d_ticks[NTickTypes]; - - bool d_isValid; -}; - -/*! - Change the interval - \lBound left bound - \rBound right bound -*/ -inline void QwtScaleDiv::setInterval(double lBound, double hBound) -{ - d_lBound = lBound; - d_hBound = hBound; -} - -/*! - \return lBound -> hBound -*/ -inline QwtDoubleInterval QwtScaleDiv::interval() const -{ - return QwtDoubleInterval(d_lBound, d_hBound); -} - -/*! - \return left bound - \sa QwtScaleDiv::hBound -*/ -inline double QwtScaleDiv::lBound() const -{ - return d_lBound; -} - -/*! - \return right bound - \sa QwtScaleDiv::lBound -*/ -inline double QwtScaleDiv::hBound() const -{ - return d_hBound; -} - -/*! - \return hBound() - lBound() -*/ -inline double QwtScaleDiv::range() const -{ - return d_hBound - d_lBound; -} -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_scale_draw.h b/Code/qtiplot/3rdparty/qwt/src/qwt_scale_draw.h deleted file mode 100644 index ec08893912d86ae3d9bd23164089534ed7a8b366..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_scale_draw.h +++ /dev/null @@ -1,109 +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_SCALE_DRAW_H -#define QWT_SCALE_DRAW_H - -#include <qpoint.h> -#include "qwt_global.h" -#include "qwt_abstract_scale_draw.h" - -/*! - \brief A class for drawing scales - - QwtScaleDraw can be used to draw linear or logarithmic scales. - A scale has a position, an alignment and a length, which can be specified . - The labels can be rotated and aligned - to the ticks using setLabelRotation() and setLabelAlignment(). - - After a scale division has been specified as a QwtScaleDiv object - using QwtAbstractScaleDraw::setScaleDiv(const QwtScaleDiv &s), - the scale can be drawn with the QwtAbstractScaleDraw::draw() member. -*/ - -class QWT_EXPORT QwtScaleDraw: public QwtAbstractScaleDraw -{ -public: - /*! - Alignment of the scale draw - \sa setAlignment(), alignment() - */ - enum Alignment { BottomScale, TopScale, LeftScale, RightScale }; - - QwtScaleDraw(); - QwtScaleDraw(const QwtScaleDraw &); - - virtual ~QwtScaleDraw(); - - QwtScaleDraw &operator=(const QwtScaleDraw &other); - - void getBorderDistHint(const QFont &, int &start, int &end) const; - int minLabelDist(const QFont &) const; - - int minLength(const QPen &, const QFont &) const; - virtual int extent(const QPen &, const QFont &) const; - - void move(int x, int y); - void move(const QPoint &); - void setLength(int length); - - Alignment alignment() const; - void setAlignment(Alignment); - - Qt::Orientation orientation() const; - - QPoint pos() const; - int length() const; - -#if QT_VERSION < 0x040000 - void setLabelAlignment(int); - int labelAlignment() const; -#else - void setLabelAlignment(Qt::Alignment); - Qt::Alignment labelAlignment() const; -#endif - - void setLabelRotation(double rotation); - double labelRotation() const; - - int maxLabelHeight(const QFont &) const; - int maxLabelWidth(const QFont &) const; - - QPoint labelPosition(double val) const; - - QRect labelRect(const QFont &, double val) const; - QSize labelSize(const QFont &, double val) const; - - QRect boundingLabelRect(const QFont &, double val) const; - -protected: - -#if QT_VERSION < 0x040000 - QWMatrix labelMatrix(const QPoint &, const QSize &) const; -#else - QMatrix labelMatrix(const QPoint &, const QSize &) const; -#endif - - virtual void drawTick(QPainter *p, double val, int len) const; - virtual void drawBackbone(QPainter *p) const; - virtual void drawLabel(QPainter *p, double val) const; - -private: - void updateMap(); - - class PrivateData; - PrivateData *d_data; -}; - -inline void QwtScaleDraw::move(int x, int y) -{ - move(QPoint(x, y)); -} - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_scale_engine.h b/Code/qtiplot/3rdparty/qwt/src/qwt_scale_engine.h deleted file mode 100644 index bed7d56db3b295055e936353da4a73b6939ccf7f..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_scale_engine.h +++ /dev/null @@ -1,199 +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_SCALE_ENGINE_H -#define QWT_SCALE_ENGINE_H - -#include "qwt_global.h" -#include "qwt_scale_div.h" -#include "qwt_double_interval.h" - -class QwtScaleTransformation; - -/*! - \brief Arithmetic including a tolerance -*/ -class QWT_EXPORT QwtScaleArithmetic -{ -public: - static int compareEps( - double value1, double value2, double intervalSize); - - static double ceilEps(double value, double intervalSize); - static double floorEps(double value, double intervalSize); - - static double divideEps(double interval, double steps); - - static double ceil125(double x); - static double floor125(double x); -}; - -/*! - \brief Base class for scale engines. - - A scale engine trys to find "reasonable" ranges and step sizes - for scales. - - The layout of the scale can be varied with setAttribute(). - - Qwt offers implementations for logarithmic (log10) - and linear scales. Contributions for other types of scale engines - (date/time, log2 ... ) are welcome. -*/ - -class QWT_EXPORT QwtScaleEngine -{ -public: - //! see QwtScaleEngine::setAttribute, testAttribute - enum Attribute - { - NoAttribute = 0, - IncludeReference = 1, - Symmetric = 2, - Floating = 4, - Inverted = 8 - }; - - explicit QwtScaleEngine(); - virtual ~QwtScaleEngine(); - - void setAttribute(Attribute, bool on = true); - bool testAttribute(Attribute) const; - - void setAttributes(int); - int attributes() const; - - void setReference(double reference); - double reference() const; - - void setMargins(double m1, double m2); - double loMargin() const; - double hiMargin() const; - - /*! - Align and divide an interval - - \param maxNumSteps Max. number of steps - \param x1 First limit of the interval (In/Out) - \param x2 Second limit of the interval (In/Out) - \param stepSize Step size (Return value) - */ - virtual void autoScale(int maxNumSteps, - double &x1, double &x2, double &stepSize) const = 0; - - /*! - \brief Calculate a scale division - - \param x1 First interval limit - \param x2 Second interval limit - \param maxMajSteps Maximum for the number of major steps - \param maxMinSteps Maximum number of minor steps - \param stepSize Step size. If stepSize == 0.0, the scaleEngine - calculates one. - */ - virtual QwtScaleDiv divideScale(double x1, double x2, - int maxMajSteps, int maxMinSteps, - double stepSize = 0.0) const = 0; - - //! \return a transformation - virtual QwtScaleTransformation *transformation() const = 0; - -protected: - bool contains(const QwtDoubleInterval &, double val) const; - QwtValueList strip(const QwtValueList&, const QwtDoubleInterval &) const; - double divideInterval(double interval, int numSteps) const; - - QwtDoubleInterval buildInterval(double v) const; - -private: - class PrivateData; - PrivateData *d_data; -}; - -/*! - \brief A scale engine for linear scales - - The step size will fit into the pattern - \f$\left\{ 1,2,5\right\} \cdot 10^{n}\f$, where n is an integer. -*/ - -class QWT_EXPORT QwtLinearScaleEngine: public QwtScaleEngine -{ -public: - virtual void autoScale(int maxSteps, - double &x1, double &x2, double &stepSize) const; - - virtual QwtScaleDiv divideScale(double x1, double x2, - int numMajorSteps, int numMinorSteps, - double stepSize = 0.0) const; - - virtual QwtScaleTransformation *transformation() const; - -protected: - QwtDoubleInterval align(const QwtDoubleInterval&, - double stepSize) const; - -private: - void buildTicks( - const QwtDoubleInterval &, double stepSize, int maxMinSteps, - QwtValueList ticks[QwtScaleDiv::NTickTypes]) const; - - void buildMinorTicks( - const QwtValueList& majorTicks, - int maxMinMark, double step, - QwtValueList &, QwtValueList &) const; - - QwtValueList buildMajorTicks( - const QwtDoubleInterval &interval, double stepSize) const; -}; - -/*! - \brief A scale engine for logarithmic (base 10) scales - - The step size is measured in *decades* - and the major step size will be adjusted to fit the pattern - \f$\left\{ 1,2,3,5\right\} \cdot 10^{n}\f$, where n is a natural number - including zero. - - \warning the step size as well as the margins are measured in *decades*. -*/ - -class QWT_EXPORT QwtLog10ScaleEngine: public QwtScaleEngine -{ -public: - virtual void autoScale(int maxSteps, - double &x1, double &x2, double &stepSize) const; - - virtual QwtScaleDiv divideScale(double x1, double x2, - int numMajorSteps, int numMinorSteps, - double stepSize = 0.0) const; - - virtual QwtScaleTransformation *transformation() const; - -protected: - QwtDoubleInterval log10(const QwtDoubleInterval&) const; - QwtDoubleInterval pow10(const QwtDoubleInterval&) const; - -private: - QwtDoubleInterval align(const QwtDoubleInterval&, - double stepSize) const; - - void buildTicks( - const QwtDoubleInterval &, double stepSize, int maxMinSteps, - QwtValueList ticks[QwtScaleDiv::NTickTypes]) const; - - QwtValueList buildMinorTicks( - const QwtValueList& majorTicks, - int maxMinMark, double step) const; - - QwtValueList buildMajorTicks( - const QwtDoubleInterval &interval, double stepSize) const; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_scale_map.h b/Code/qtiplot/3rdparty/qwt/src/qwt_scale_map.h deleted file mode 100644 index c63f8248ba0e824eb9f022b498859db3fbf6feb7..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_scale_map.h +++ /dev/null @@ -1,180 +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_SCALE_MAP_H -#define QWT_SCALE_MAP_H - -#include "qwt_global.h" -#include "qwt_math.h" - -/*! - \brief Operations for linear or logarithmic (base 10) transformations -*/ -class QWT_EXPORT QwtScaleTransformation -{ -public: - enum Type - { - Linear, - Log10, - - Other - }; - - QwtScaleTransformation(Type type); - virtual ~QwtScaleTransformation(); - - virtual double xForm(double x, double s1, double s2, - double p1, double p2) const; - virtual double invXForm(double x, double s1, double s2, - double p1, double p2) const; - - inline Type type() const { return d_type; } - - virtual QwtScaleTransformation *copy() const; - -private: - QwtScaleTransformation(); - QwtScaleTransformation &operator=( const QwtScaleTransformation); - - const Type d_type; -}; - -/*! - \brief A scale map - - QwtScaleMap offers transformations from a scale - into a paint interval and vice versa. -*/ -class QWT_EXPORT QwtScaleMap -{ -public: - QwtScaleMap(); - QwtScaleMap(const QwtScaleMap&); - - ~QwtScaleMap(); - - QwtScaleMap &operator=(const QwtScaleMap &); - - void setTransformation(QwtScaleTransformation * ); - const QwtScaleTransformation *transformation() const; - - void setPaintInterval(int p1, int p2); - void setPaintXInterval(double p1, double p2); - void setScaleInterval(double s1, double s2); - - int transform(double x) const; - double invTransform(double i) const; - - double xTransform(double x) const; - - inline double p1() const; - inline double p2() const; - - inline double s1() const; - inline double s2() const; - - inline double pDist() const; - inline double sDist() const; - - QT_STATIC_CONST double LogMin; - QT_STATIC_CONST double LogMax; - -private: - void newFactor(); - - double d_s1, d_s2; // scale interval boundaries - double d_p1, d_p2; // paint device interval boundaries - - double d_cnv; // conversion factor - - QwtScaleTransformation *d_transformation; -}; - -/*! - \return First border of the scale interval -*/ -inline double QwtScaleMap::s1() const -{ - return d_s1; -} - -/*! - \return Second border of the scale interval -*/ -inline double QwtScaleMap::s2() const -{ - return d_s2; -} - -/*! - \return First border of the paint interval -*/ -inline double QwtScaleMap::p1() const -{ - return d_p1; -} - -/*! - \return Second border of the paint interval -*/ -inline double QwtScaleMap::p2() const -{ - return d_p2; -} - -inline double QwtScaleMap::pDist() const -{ - return qwtAbs(d_p2 - d_p1); -} - -inline double QwtScaleMap::sDist() const -{ - return qwtAbs(d_s2 - d_s1); -} - -/*! - Transform a point related to the scale interval into an point - related to the interval of the paint device -*/ -inline double QwtScaleMap::xTransform(double s) const -{ - // try to inline code from QwtScaleTransformation - - if ( d_transformation->type() == QwtScaleTransformation::Linear ) - return d_p1 + (s - d_s1) * d_cnv; - - if ( d_transformation->type() == QwtScaleTransformation::Log10 ) - return d_p1 + log(s / d_s1) * d_cnv; - - return d_transformation->xForm(s, d_s1, d_s2, d_p1, d_p2 ); -} - -/*! - \brief Transform an paint device value into a value in the - interval of the scale. -*/ -inline double QwtScaleMap::invTransform(double p) const -{ - return d_transformation->invXForm(p, d_p1, d_p2, d_s1, d_s2 ); -} - -/*! - Transform a point related to the scale interval into an point - related to the interval of the paint device and round it to - an integer. (In Qt <= 3.x paint devices are integer based. ) - - \sa QwtScaleMap::xTransform -*/ -inline int QwtScaleMap::transform(double s) const -{ - return qRound(xTransform(s)); -} - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_scale_widget.h b/Code/qtiplot/3rdparty/qwt/src/qwt_scale_widget.h deleted file mode 100644 index 25647726dec23de42fc58df70ae4f05802e4fdc1..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_scale_widget.h +++ /dev/null @@ -1,132 +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_SCALE_WIDGET_H -#define QWT_SCALE_WIDGET_H - -#include <qwidget.h> -#include <qfont.h> -#include <qcolor.h> -#include <qstring.h> - -#include "qwt_global.h" -#include "qwt_text.h" -#include "qwt_scale_draw.h" - -class QPainter; -class QwtScaleTransformation; -class QwtScaleDiv; -class QwtColorMap; - -/*! - \brief A Widget which contains a scale - - This Widget can be used to decorate composite widgets with - a scale. -*/ - -class QWT_EXPORT QwtScaleWidget : public QWidget -{ - Q_OBJECT - -public: - explicit QwtScaleWidget(QWidget *parent = NULL); -#if QT_VERSION < 0x040000 - explicit QwtScaleWidget(QWidget *parent, const char *name); -#endif - explicit QwtScaleWidget(QwtScaleDraw::Alignment, QWidget *parent = NULL); - virtual ~QwtScaleWidget(); - -signals: - //! Signal emitted, whenever the scale divison changes - void scaleDivChanged(); - -public: - void setTitle(const QString &title); - void setTitle(const QwtText &title); - QwtText title() const; - - void setBorderDist(int start, int end); - int startBorderDist() const; - int endBorderDist() const; - - void getBorderDistHint(int &start, int &end) const; - - void getMinBorderDist(int &start, int &end) const; - void setMinBorderDist(int start, int end); - - void setMargin(int); - int margin() const; - - void setSpacing(int td); - int spacing() const; - - void setPenWidth(int); - int penWidth() const; - - void setScaleDiv(QwtScaleTransformation *, const QwtScaleDiv &sd); - - void setScaleDraw(QwtScaleDraw *); - const QwtScaleDraw *scaleDraw() const; - QwtScaleDraw *scaleDraw(); - -#if QT_VERSION < 0x040000 - void setLabelAlignment(int); -#else - void setLabelAlignment(Qt::Alignment); -#endif - void setLabelRotation(double rotation); - - void setColorBarEnabled(bool); - bool isColorBarEnabled() const; - - void setColorBarWidth(int); - int colorBarWidth() const; - - void setColorMap(const QwtDoubleInterval &, const QwtColorMap &); - - QwtDoubleInterval colorBarInterval() const; - const QwtColorMap &colorMap() const; - - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; - - int titleHeightForWidth(int width) const; - int dimForLength(int length, const QFont &scaleFont) const; - - void drawColorBar(QPainter *painter, const QRect &rect) const; - void drawTitle(QPainter *painter, QwtScaleDraw::Alignment, - const QRect &rect) const; - - void setAlignment(QwtScaleDraw::Alignment); - QwtScaleDraw::Alignment alignment() const; - - QRect colorBarRect(const QRect&) const; - -protected: - virtual void paintEvent(QPaintEvent *e); - virtual void resizeEvent(QResizeEvent *e); - -#if QT_VERSION < 0x040000 - virtual void fontChange(const QFont &oldfont); -#endif - - void draw(QPainter *p) const; - - void scaleChange(); - void layoutScale( bool update = true ); - -private: - void initScale(QwtScaleDraw::Alignment); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_slider.h b/Code/qtiplot/3rdparty/qwt/src/qwt_slider.h deleted file mode 100644 index 030d1471eb3ed5c827244cf4ab56322f4352b892..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_slider.h +++ /dev/null @@ -1,138 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_SLIDER_H -#define QWT_SLIDER_H - -#include "qwt_global.h" -#include "qwt_abstract_scale.h" -#include "qwt_abstract_slider.h" - -class QwtScaleDraw; - -/*! - \brief The Slider Widget - - QwtSlider is a slider widget which operates on an interval - of type double. QwtSlider supports different layouts as - well as a scale. - - \image html sliders.png - - \sa QwtAbstractSlider and QwtAbstractScale for the descriptions - of the inherited members. -*/ - -class QWT_EXPORT QwtSlider : public QwtAbstractSlider, public QwtAbstractScale -{ - Q_OBJECT - Q_ENUMS( ScalePos ) - Q_ENUMS( BGSTYLE ) - Q_PROPERTY( ScalePos scalePosition READ scalePosition - WRITE setScalePosition ) - Q_PROPERTY( BGSTYLE bgStyle READ bgStyle WRITE setBgStyle ) - Q_PROPERTY( int thumbLength READ thumbLength WRITE setThumbLength ) - Q_PROPERTY( int thumbWidth READ thumbWidth WRITE setThumbWidth ) - Q_PROPERTY( int borderWidth READ borderWidth WRITE setBorderWidth ) - -public: - - /*! - Scale position. QwtSlider tries to enforce valid combinations of its - orientation and scale position: - - Qt::Horizonal combines with NoScale, TopScale and BottomScale - - Qt::Vertical combines with NoScale, LeftScale and RightScale - - \sa QwtSlider::QwtSlider - */ - enum ScalePos - { - NoScale, - - LeftScale, - RightScale, - TopScale, - BottomScale - }; - - /*! - Background style. - \sa QwtSlider::QwtSlider - */ - enum BGSTYLE - { - BgTrough = 0x1, - BgSlot = 0x2, - BgBoth = BgTrough | BgSlot - }; - - explicit QwtSlider(QWidget *parent, - Qt::Orientation = Qt::Horizontal, - ScalePos = NoScale, BGSTYLE bgStyle = BgTrough); -#if QT_VERSION < 0x040000 - explicit QwtSlider(QWidget *parent, const char *name); -#endif - - virtual ~QwtSlider(); - - virtual void setOrientation(Qt::Orientation); - - void setBgStyle(BGSTYLE); - BGSTYLE bgStyle() const; - - void setScalePosition(ScalePos s); - ScalePos scalePosition() const; - - int thumbLength() const; - int thumbWidth() const; - int borderWidth() const; - - void setThumbLength(int l); - void setThumbWidth(int w); - void setBorderWidth(int bw); - void setMargins(int x, int y); - - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; - - void setScaleDraw(QwtScaleDraw *); - const QwtScaleDraw *scaleDraw() const; - -protected: - virtual double getValue(const QPoint &p); - virtual void getScrollMode(const QPoint &p, - int &scrollMode, int &direction); - - void draw(QPainter *p, const QRect& update_rect); - virtual void drawSlider (QPainter *p, const QRect &r); - virtual void drawThumb(QPainter *p, const QRect &, int pos); - - virtual void resizeEvent(QResizeEvent *e); - virtual void paintEvent (QPaintEvent *e); - - virtual void valueChange(); - virtual void rangeChange(); - virtual void scaleChange(); - virtual void fontChange(const QFont &oldFont); - - void layoutSlider( bool update = true ); - int xyPosition(double v) const; - - QwtScaleDraw *scaleDraw(); - -private: - void initSlider(Qt::Orientation, ScalePos scalePos, BGSTYLE bgStyle); - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_spline.h b/Code/qtiplot/3rdparty/qwt/src/qwt_spline.h deleted file mode 100644 index 85f959063502cbe7855487a185c5c76146fd58c1..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_spline.h +++ /dev/null @@ -1,125 +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_SPLINE_H -#define QWT_SPLINE_H - -#include "qwt_global.h" -#include "qwt_double_rect.h" - -#if QT_VERSION >= 0x040000 -#include <QPolygonF> -#else -#include "qwt_array.h" -#endif - -// MOC_SKIP_BEGIN - -#if defined(QWT_TEMPLATEDLL) - -#if QT_VERSION < 0x040000 -#ifndef QWTARRAY_TEMPLATE_QWTDOUBLEPOINT // by mjo3 -#define QWTARRAY_TEMPLATE_QWTDOUBLEPOINT -template class QWT_EXPORT QwtArray<QwtDoublePoint>; -#endif //end of QWTARRAY_TEMPLATE_QWTDOUBLEPOINT -#endif - -#endif - -// MOC_SKIP_END - -/*! - \brief A class for spline interpolation - - The QwtSpline class is used for cubical spline interpolation. - Two types of splines, natural and periodic, are supported. - - \par Usage: - <ol> - <li>First call setPoints() to determine the spline coefficients - for a tabulated function y(x). - <li>After the coefficients have been set up, the interpolated - function value for an argument x can be determined by calling - QwtSpline::value(). - </ol> - - \par Example: - \code -#include <qwt_spline.h> - -QPolygonF interpolate(const QPolygonF& points, int numValues) -{ - QwtSpline spline; - if ( !spline.setPoints(points) ) - return points; - - QPolygonF interpolatedPoints(numValues); - - const double delta = - (points[numPoints - 1].x() - points[0].x()) / (points.size() - 1); - for(i = 0; i < points.size(); i++) / interpolate - { - const double x = points[0].x() + i * delta; - interpolatedPoints[i].setX(x); - interpolatedPoints[i].setY(spline.value(x)); - } - return interpolatedPoints; -} - \endcode -*/ - -class QWT_EXPORT QwtSpline -{ -public: - enum SplineType - { - Natural, - Periodic - }; - - QwtSpline(); - QwtSpline( const QwtSpline & ); - - ~QwtSpline(); - - QwtSpline &operator=( const QwtSpline & ); - - void setSplineType(SplineType); - SplineType splineType() const; - -#if QT_VERSION < 0x040000 - bool setPoints(const QwtArray<QwtDoublePoint>& points); - QwtArray<QwtDoublePoint> points() const; -#else - bool setPoints(const QPolygonF& points); - QPolygonF points() const; -#endif - - void reset(); - - bool isValid() const; - double value(double x) const; - -protected: - -#if QT_VERSION < 0x040000 - bool buildNaturalSpline( - const QwtArray<QwtDoublePoint> &); - bool buildPeriodicSpline( - const QwtArray<QwtDoublePoint> &); -#else - bool buildNaturalSpline(const QPolygonF &); - bool buildPeriodicSpline(const QPolygonF &); -#endif - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_symbol.h b/Code/qtiplot/3rdparty/qwt/src/qwt_symbol.h deleted file mode 100644 index b8d3d3097dd700da6a4e5f621abe445419f758f6..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_symbol.h +++ /dev/null @@ -1,88 +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_SYMBOL_H -#define QWT_SYMBOL_H - -#include <qbrush.h> -#include <qpen.h> -#include <qsize.h> -#include "qwt_global.h" - -class QPainter; -class QRect; - -//! A class for drawing symbols -class QWT_EXPORT QwtSymbol -{ -public: - /*! - Style - \sa setStyle(), style() - */ - enum Style - { - NoSymbol = -1, - - Ellipse, - Rect, - Diamond, - Triangle, - DTriangle, - UTriangle, - LTriangle, - RTriangle, - Cross, - XCross, - HLine, - VLine, - Star1, - Star2, - Hexagon, - - StyleCnt - }; - -public: - QwtSymbol(); - QwtSymbol(Style st, const QBrush &bd, const QPen &pn, const QSize &s); - virtual ~QwtSymbol(); - - bool operator!=(const QwtSymbol &) const; - virtual bool operator==(const QwtSymbol &) const; - - virtual QwtSymbol *clone() const; - - void setSize(const QSize &s); - void setSize(int a, int b = -1); - void setBrush(const QBrush& b); - void setPen(const QPen &p); - void setStyle (Style s); - - //! Return Brush - const QBrush& brush() const { return d_brush; } - //! Return Pen - const QPen& pen() const { return d_pen; } - //! Return Size - const QSize& size() const { return d_size; } - //! Return Style - Style style() const { return d_style; } - - void draw(QPainter *p, const QPoint &pt) const; - void draw(QPainter *p, int x, int y) const; - virtual void draw(QPainter *p, const QRect &r) const; - -private: - QBrush d_brush; - QPen d_pen; - QSize d_size; - Style d_style; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_text.h b/Code/qtiplot/3rdparty/qwt/src/qwt_text.h deleted file mode 100644 index 2c3b3ff4e84d93bc1b9add46198da8cf0642b808..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_text.h +++ /dev/null @@ -1,198 +0,0 @@ -/* -*- mode: C++ ; c-file-style: "stroustrup" -*- ***************************** - * Qwt Widget Library - * Copyright (C) 1997 Josef Wilgen - * Copyright (C) 2003 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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_TEXT_H -#define QWT_TEXT_H - -#include <qstring.h> -#include <qsize.h> -#include <qfont.h> -#include "qwt_global.h" - -class QColor; -class QPen; -class QBrush; -class QRect; -class QPainter; -class QwtTextEngine; - -/*! - \brief A class representing a text - - A QwtText is a text including a set of attributes how to render it. - - - Format\n - A text might include control sequences (f.e tags) describing - how to render it. Each format (f.e MathML, TeX, Qt Rich Text) - has its own set of control sequences, that can be handles by - a QwtTextEngine for this format. - - Background\n - A text might have a background, defined by a QPen and QBrush - to improve its visibility. - - Font\n - A text might have an individual font. - - Color\n - A text might have an individual color. - - Render Flags\n - Flags from Qt::AlignmentFlag and Qt::TextFlag used like in - QPainter::drawText. - - \sa QwtTextEngine, QwtTextLabel -*/ - -class QWT_EXPORT QwtText -{ -public: - - /*! - \brief Text format - - The text format defines the QwtTextEngine, that is used to render - the text. - - - AutoText\n - The text format is determined using QwtTextEngine::mightRender for - all available text engines in increasing order > PlainText. - If none of the text engines can render the text is rendered - like PlainText. - - PlainText\n - Draw the text as it is, using a QwtPlainTextEngine. - - RichText\n - Use the Scribe framework (Qt Rich Text) to render the text. - - MathMLText\n - Use a MathML (http://en.wikipedia.org/wiki/MathML) render engine - to display the text. The Qwt MathML extension offers such an engine - based on the MathML renderer of the Qt solutions package. Unfortunately - it is only available for owners of a commercial Qt license. - - TeXText\n - Use a TeX (http://en.wikipedia.org/wiki/TeX) render engine - to display the text. - - OtherFormat\n - The number of text formats can be extended using setTextEngine. - Formats >= OtherFormat are not used by Qwt. - - \sa QwtTextEngine, setTextEngine - */ - - enum TextFormat - { - AutoText = 0, - - PlainText, - RichText, - - MathMLText, - TeXText, - - OtherFormat = 100 - }; - - /*! - \brief Paint Attributes - - Font and color and background are optional attributes of a QwtText. - The paint attributes hold the information, if they are set. - - - PaintUsingTextFont\n - The text has an individual font. - - PaintUsingTextColor\n - The text has an individual color. - - PaintBackground\n - The text has an individual background. - */ - enum PaintAttribute - { - PaintUsingTextFont = 1, - PaintUsingTextColor = 2, - PaintBackground = 4 - }; - - /*! - \brief Layout Attributes - - The layout attributes affects some aspects of the layout of the text. - - - MinimumLayout\n - Layout the text without its margins. This mode is useful if a - text needs to be aligned accurately, like the tick labels of a scale. - If QwtTextEngine::textMargins is not implemented for the format - of the text, MinimumLayout has no effect. - */ - enum LayoutAttribute - { - MinimumLayout = 1 - }; - - QwtText(const QString & = QString::null, - TextFormat textFormat = AutoText); - QwtText(const QwtText &); - ~QwtText(); - - QwtText &operator=(const QwtText &); - - int operator==(const QwtText &) const; - int operator!=(const QwtText &) const; - - void setText(const QString &, - QwtText::TextFormat textFormat = AutoText); - QString text() const; - - //! \return text().isNull() - inline bool isNull() const { return text().isNull(); } - - //! \return text().isEmpty() - inline bool isEmpty() const { return text().isEmpty(); } - - void setFont(const QFont &); - QFont font() const; - - QFont usedFont(const QFont &) const; - - void setRenderFlags(int flags); - int renderFlags() const; - - void setColor(const QColor &); - QColor color() const; - - QColor usedColor(const QColor &) const; - - void setBackgroundPen(const QPen &); - QPen backgroundPen() const; - - void setBackgroundBrush(const QBrush &); - QBrush backgroundBrush() const; - - void setPaintAttribute(PaintAttribute, bool on = true); - bool testPaintAttribute(PaintAttribute) const; - - void setLayoutAttribute(LayoutAttribute, bool on = true); - bool testLayoutAttribute(LayoutAttribute) const; - - int heightForWidth(int width, const QFont & = QFont()) const; - QSize textSize(const QFont & = QFont()) const; - - void draw(QPainter *painter, const QRect &rect) const; - - static const QwtTextEngine *textEngine(const QString &text, - QwtText::TextFormat = AutoText); - - static const QwtTextEngine *textEngine(QwtText::TextFormat); - static void setTextEngine(QwtText::TextFormat, QwtTextEngine *); - -private: - class PrivateData; - PrivateData *d_data; - - class LayoutCache; - LayoutCache *d_layoutCache; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_text_engine.h b/Code/qtiplot/3rdparty/qwt/src/qwt_text_engine.h deleted file mode 100644 index 8ae792dae8f9d0c88bc0f4045e612c75739ccf38..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_text_engine.h +++ /dev/null @@ -1,174 +0,0 @@ -/* -*- mode: C++ ; c-file-style: "stroustrup" -*- ***************************** - * Qwt Widget Library - * Copyright (C) 1997 Josef Wilgen - * Copyright (C) 2003 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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_TEXT_ENGINE_H -#define QWT_TEXT_ENGINE_H 1 - -#include <qsize.h> -#include "qwt_global.h" - -class QFont; -class QRect; -class QString; -class QPainter; - -/*! - \brief Abstract base class for rendering text strings - - A text engine is responsible for rendering texts for a - specific text format. They are used by QwtText to render a text. - - QwtPlainTextEngine and QwtRichTextEngine are part of the Qwt library. - - QwtMathMLTextEngine can be found in Qwt MathML extension, that - needs the MathML renderer of the Qt solutions package. Unfortunately - it is only available with a commercial Qt license. - - \sa QwtText::setTextEngine -*/ - -class QWT_EXPORT QwtTextEngine -{ -public: - virtual ~QwtTextEngine(); - - /*! - Find the height for a given width - - \param font Font of the text - \param flags Bitwise OR of the flags used like in QPainter::drawText - \param text Text to be rendered - \param width Width - - \return Calculated height - */ - virtual int heightForWidth(const QFont &font, int flags, - const QString &text, int width) const = 0; - - /*! - Returns the size, that is needed to render text - - \param font Font of the text - \param flags Bitwise OR of the flags like in for QPainter::drawText - \param text Text to be rendered - - \return Caluclated size - */ - virtual QSize textSize(const QFont &font, int flags, - const QString &text) const = 0; - - /*! - Test if a string can be rendered by this text engine - - \param text Text to be tested - \return true, if it can be rendered - */ - virtual bool mightRender(const QString &text) const = 0; - - /*! - Return margins around the texts - - The textSize might include margins around the - text, like QFontMetrics::descent. In situations - where texts need to be aligend in detail, knowing - these margins might improve the layout calculations. - - \param font Font of the text - \param text Text to be rendered - \param left Return value for the left margin - \param right Return value for the right margin - \param top Return value for the top margin - \param bottom Return value for the bottom margin - */ - virtual void textMargins(const QFont &font, const QString &text, - int &left, int &right, int &top, int &bottom) const = 0; - - /*! - Draw the text in a clipping rectangle - - \param painter Painter - \param rect Clipping rectangle - \param flags Bitwise OR of the flags like in for QPainter::drawText - \param text Text to be rendered - */ - virtual void draw(QPainter *painter, const QRect &rect, - int flags, const QString &text) const = 0; - -protected: - QwtTextEngine(); -}; - - -/*! - \brief A text engine for plain texts - - QwtPlainTextEngine renders texts using the basic Qt classes - QPainter and QFontMetrics. -*/ -class QWT_EXPORT QwtPlainTextEngine: public QwtTextEngine -{ -public: - QwtPlainTextEngine(); - virtual ~QwtPlainTextEngine(); - - virtual int heightForWidth(const QFont &font, int flags, - const QString &text, int width) const; - - virtual QSize textSize(const QFont &font, int flags, - const QString &text) const; - - virtual void draw(QPainter *painter, const QRect &rect, - int flags, const QString &text) const; - - virtual bool mightRender(const QString &) const; - - virtual void textMargins(const QFont &, const QString &, - int &left, int &right, int &top, int &bottom) const; - -private: - class PrivateData; - PrivateData *d_data; -}; - - -#ifndef QT_NO_RICHTEXT - -/*! - \brief A text engine for Qt rich texts - - QwtRichTextEngine renders Qt rich texts using the classes - of the Scribe framework of Qt. -*/ -class QWT_EXPORT QwtRichTextEngine: public QwtTextEngine -{ -public: - QwtRichTextEngine(); - - virtual int heightForWidth(const QFont &font, int flags, - const QString &text, int width) const; - - virtual QSize textSize(const QFont &font, int flags, - const QString &text) const; - - virtual void draw(QPainter *painter, const QRect &rect, - int flags, const QString &text) const; - - virtual bool mightRender(const QString &) const; - - virtual void textMargins(const QFont &, const QString &, - int &left, int &right, int &top, int &bottom) const; -private: - QString taggedText(const QString &, int flags) const; -}; - -#endif // !QT_NO_RICHTEXT - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_text_label.h b/Code/qtiplot/3rdparty/qwt/src/qwt_text_label.h deleted file mode 100644 index acaaedd45c31e308cd64e3c0dc007ba78ff2c818..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_text_label.h +++ /dev/null @@ -1,75 +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_TEXT_LABEL_H -#define QWT_TEXT_LABEL_H - -#include <qframe.h> -#include "qwt_global.h" -#include "qwt_text.h" - -class QString; -class QPaintEvent; -class QPainter; - -/*! - \brief A Widget which displays a QwtText -*/ - -class QWT_EXPORT QwtTextLabel : public QFrame -{ - Q_OBJECT - - Q_PROPERTY( int indent READ indent WRITE setIndent ) - Q_PROPERTY( int margin READ margin WRITE setMargin ) - -public: - explicit QwtTextLabel(QWidget *parent = NULL); -#if QT_VERSION < 0x040000 - explicit QwtTextLabel(QWidget *parent, const char *name); -#endif - explicit QwtTextLabel(const QwtText &, QWidget *parent = NULL); - virtual ~QwtTextLabel(); - -public slots: - void setText(const QString &, - QwtText::TextFormat textFormat = QwtText::AutoText); - virtual void setText(const QwtText &); - - void clear(); - -public: - const QwtText &text() const; - - int indent() const; - void setIndent(int); - - int margin() const; - void setMargin(int); - - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; - virtual int heightForWidth(int) const; - - QRect textRect() const; - -protected: - virtual void paintEvent(QPaintEvent *e); - virtual void drawContents(QPainter *); - virtual void drawText(QPainter *, const QRect &); - -private: - void init(); - int defaultIndent() const; - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_thermo.h b/Code/qtiplot/3rdparty/qwt/src/qwt_thermo.h deleted file mode 100644 index bf12d6b582dccbf0e440a20ece6e3d6bf9ca6f18..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_thermo.h +++ /dev/null @@ -1,182 +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_THERMO_H -#define QWT_THERMO_H - -#include <qwidget.h> -#include <qcolor.h> -#include <qfont.h> -#include <qrect.h> -#include "qwt_global.h" -#include "qwt_abstract_scale.h" - -class QwtScaleDraw; - -/*! - \brief The Thermometer Widget - - QwtThermo is a widget which displays a value in an interval. It supports: - - a horizontal or vertical layout; - - a range; - - a scale; - - an alarm level. - - \image html sysinfo.png - - By default, the scale and range run over the same interval of values. - QwtAbstractScale::setScale() changes the interval of the scale and allows - easy conversion between physical units. - - The example shows how to make the scale indicate in degrees Fahrenheit and - to set the value in degrees Kelvin: -\code -#include <qapplication.h> -#include <qwt_thermo.h> - -double Kelvin2Fahrenheit(double kelvin) -{ - // see http://en.wikipedia.org/wiki/Kelvin - return 1.8*kelvin - 459.67; -} - -int main(int argc, char **argv) -{ - const double minKelvin = 0.0; - const double maxKelvin = 500.0; - - QApplication a(argc, argv); - QwtThermo t; - t.setRange(minKelvin, maxKelvin); - t.setScale(Kelvin2Fahrenheit(minKelvin), Kelvin2Fahrenheit(maxKelvin)); - // set the value in Kelvin but the scale displays in Fahrenheit - // 273.15 Kelvin = 0 Celsius = 32 Fahrenheit - t.setValue(273.15); - a.setMainWidget(&t); - t.show(); - return a.exec(); -} -\endcode - - \todo Improve the support for a logarithmic range and/or scale. -*/ -class QWT_EXPORT QwtThermo: public QWidget, public QwtAbstractScale -{ - Q_OBJECT - - Q_ENUMS( ScalePos ) - - Q_PROPERTY( QBrush alarmBrush READ alarmBrush WRITE setAlarmBrush ) - Q_PROPERTY( QColor alarmColor READ alarmColor WRITE setAlarmColor ) - Q_PROPERTY( bool alarmEnabled READ alarmEnabled WRITE setAlarmEnabled ) - Q_PROPERTY( double alarmLevel READ alarmLevel WRITE setAlarmLevel ) - Q_PROPERTY( ScalePos scalePosition READ scalePosition - WRITE setScalePosition ) - Q_PROPERTY( int borderWidth READ borderWidth WRITE setBorderWidth ) - Q_PROPERTY( QBrush fillBrush READ fillBrush WRITE setFillBrush ) - Q_PROPERTY( QColor fillColor READ fillColor WRITE setFillColor ) - Q_PROPERTY( double maxValue READ maxValue WRITE setMaxValue ) - Q_PROPERTY( double minValue READ minValue WRITE setMinValue ) - Q_PROPERTY( int pipeWidth READ pipeWidth WRITE setPipeWidth ) - Q_PROPERTY( double value READ value WRITE setValue ) - -public: - /* - Scale position. QwtThermo tries to enforce valid combinations of its - orientation and scale position: - - Qt::Horizonal combines with NoScale, TopScale and BottomScale - - Qt::Vertical combines with NoScale, LeftScale and RightScale - - \sa setOrientation, setScalePosition - */ - enum ScalePos - { - NoScale, - LeftScale, - RightScale, - TopScale, - BottomScale - }; - - explicit QwtThermo(QWidget *parent = NULL); -#if QT_VERSION < 0x040000 - explicit QwtThermo(QWidget *parent, const char *name); -#endif - virtual ~QwtThermo(); - - void setOrientation(Qt::Orientation o, ScalePos s); - - void setScalePosition(ScalePos s); - ScalePos scalePosition() const; - - void setBorderWidth(int w); - int borderWidth() const; - - void setFillBrush(const QBrush &b); - const QBrush &fillBrush() const; - - void setFillColor(const QColor &c); - const QColor &fillColor() const; - - void setAlarmBrush(const QBrush &b); - const QBrush &alarmBrush() const; - - void setAlarmColor(const QColor &c); - const QColor &alarmColor() const; - - void setAlarmLevel(double v); - double alarmLevel() const; - - void setAlarmEnabled(bool tf); - bool alarmEnabled() const; - - void setPipeWidth(int w); - int pipeWidth() const; - - void setMaxValue(double v); - double maxValue() const; - - void setMinValue(double v); - double minValue() const; - - double value() const; - - void setRange(double vmin, double vmax, bool lg = false); - void setMargin(int m); - - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; - - void setScaleDraw(QwtScaleDraw *); - const QwtScaleDraw *scaleDraw() const; - -public slots: - void setValue(double val); - -protected: - void draw(QPainter *p, const QRect& update_rect); - void drawThermo(QPainter *p); - void layoutThermo( bool update = true ); - virtual void scaleChange(); - virtual void fontChange(const QFont &oldFont); - - virtual void paintEvent(QPaintEvent *e); - virtual void resizeEvent(QResizeEvent *e); - - QwtScaleDraw *scaleDraw(); - -private: - void initThermo(); - int transform(double v) const; - - class PrivateData; - PrivateData *d_data; -}; - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_valuelist.h b/Code/qtiplot/3rdparty/qwt/src/qwt_valuelist.h deleted file mode 100644 index 99a55272f00218400b08e9db82722367dc3e35b8..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_valuelist.h +++ /dev/null @@ -1,57 +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 - *****************************************************************************/ - -// vim: expandtab - -#ifndef QWT_VALUELIST_H -#define QWT_VALUELIST_H - -#include "qwt_global.h" - -/*! - \def QwtValueList - */ - -#if QT_VERSION < 0x040000 - -#include <qvaluelist.h> - -#if defined(QWT_TEMPLATEDLL) -// MOC_SKIP_BEGIN -template class QWT_EXPORT QValueList<double>; -// MOC_SKIP_END -#endif - -typedef QValueList<double> QwtValueList; - -#else // QT_VERSION >= 0x040000 - -#include <qlist.h> - -#if defined(QWT_TEMPLATEDLL) - -#if QT_VERSION < 0x040300 -// Some compilers have problems, -// without a qHash(double) implementation -#include <qset.h> -#include <qvector.h> -inline uint qHash(double key) { return uint(key); } -#endif - -// MOC_SKIP_BEGIN -template class QWT_EXPORT QList<double>; -// MOC_SKIP_END - -#endif // QWT_TEMPLATEDLL - -typedef QList<double> QwtValueList; - -#endif - -#endif diff --git a/Code/qtiplot/3rdparty/qwt/src/qwt_wheel.h b/Code/qtiplot/3rdparty/qwt/src/qwt_wheel.h deleted file mode 100644 index a4ae37a3324e4ae77dc65872d89428773e6d0e6c..0000000000000000000000000000000000000000 --- a/Code/qtiplot/3rdparty/qwt/src/qwt_wheel.h +++ /dev/null @@ -1,84 +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_WHEEL_H -#define QWT_WHEEL_H - -#include "qwt_global.h" -#include "qwt_abstract_slider.h" - -/*! - \brief The Wheel Widget - - The wheel widget can be used to change values over a very large range - in very small steps. Using the setMass member, it can be configured - as a flywheel. - - \sa The radio example. -*/ -class QWT_EXPORT QwtWheel : public QwtAbstractSlider -{ - Q_OBJECT - Q_PROPERTY( double totalAngle READ totalAngle WRITE setTotalAngle ) - Q_PROPERTY( double viewAngle READ viewAngle WRITE setViewAngle ) - Q_PROPERTY( int tickCnt READ tickCnt WRITE setTickCnt ) - Q_PROPERTY( int internalBorder READ internalBorder WRITE setInternalBorder ) - Q_PROPERTY( double mass READ mass WRITE setMass ) - -public: - explicit QwtWheel(QWidget *parent = NULL); -#if QT_VERSION < 0x040000 - explicit QwtWheel(QWidget *parent, const char *name); -#endif - virtual ~QwtWheel(); - - virtual void setOrientation(Qt::Orientation); - - double totalAngle() const; - double viewAngle() const; - int tickCnt() const; - int internalBorder() const; - - double mass() const; - - void setTotalAngle (double angle); - void setTickCnt(int cnt); - void setViewAngle(double angle); - void setInternalBorder(int width); - void setMass(double val); - void setWheelWidth( int w ); - - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; - -protected: - virtual void resizeEvent(QResizeEvent *e); - virtual void paintEvent(QPaintEvent *e); - - void layoutWheel( bool update = true ); - void draw(QPainter *p, const QRect& update_rect); - void drawWheel(QPainter *p, const QRect &r); - void drawWheelBackground(QPainter *p, const QRect &r); - void setColorArray(); - - virtual void valueChange(); - virtual void paletteChange( const QPalette &); - - virtual double getValue(const QPoint &p); - virtual void getScrollMode(const QPoint &p, - int &scrollMode, int &direction); - -private: - void initWheel(); - - class PrivateData; - PrivateData *d_data; -}; - -#endif