Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_plot_rescaler.h


Ignore:
Timestamp:
Nov 3, 2026, 10:53:35 AM (3 weeks ago)
Author:
stuerze
Message:

deprecated functions exchanged libs updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/qwt/qwt_plot_rescaler.h

    r9383 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    99
    1010#ifndef QWT_PLOT_RESCALER_H
    11 #define QWT_PLOT_RESCALER_H 1
     11#define QWT_PLOT_RESCALER_H
    1212
    1313#include "qwt_global.h"
    14 #include "qwt_interval.h"
    1514#include "qwt_plot.h"
     15
    1616#include <qobject.h>
    1717
    1818class QwtPlot;
     19class QwtInterval;
    1920class QResizeEvent;
    2021
    … …  
    2425    QwtPlotRescaler auto adjusts the axes of a QwtPlot according
    2526    to fixed aspect ratios.
    26 */
     27 */
    2728
    28 class QWT_EXPORT QwtPlotRescaler: public QObject
     29class QWT_EXPORT QwtPlotRescaler : public QObject
    2930{
    30 public:
     31    Q_OBJECT
     32
     33  public:
    3134    /*!
    32       The rescale policy defines how to rescale the reference axis and
    33       their depending axes.
     35       The rescale policy defines how to rescale the reference axis and
     36       their depending axes.
    3437
    35       \sa ExpandingDirection, setIntervalHint()
    36     */
     38       \sa ExpandingDirection, setIntervalHint()
     39     */
    3740    enum RescalePolicy
    3841    {
    3942        /*!
    40           The interval of the reference axis remains unchanged, when the
    41           geometry of the canvas changes. All other axes
    42           will be adjusted according to their aspect ratio.
     43           The interval of the reference axis remains unchanged, when the
     44           geometry of the canvas changes. All other axes
     45           will be adjusted according to their aspect ratio.
    4346         */
    4447        Fixed,
    4548
    4649        /*!
    47           The interval of the reference axis will be shrunk/expanded,
    48           when the geometry of the canvas changes. All other axes
    49           will be adjusted according to their aspect ratio.
     50           The interval of the reference axis will be shrunk/expanded,
     51           when the geometry of the canvas changes. All other axes
     52           will be adjusted according to their aspect ratio.
    5053
    51           The interval, that is represented by one pixel is fixed.
     54           The interval, that is represented by one pixel is fixed.
    5255
    5356         */
    … …  
    5558
    5659        /*!
    57           The intervals of the axes are calculated, so that all axes include
    58           their interval hint.
     60           The intervals of the axes are calculated, so that all axes include
     61           their interval hint.
    5962         */
    6063        Fitting
    … …  
    7780    };
    7881
    79     explicit QwtPlotRescaler( QWidget *canvas,
    80         int referenceAxis = QwtPlot::xBottom,
     82    explicit QwtPlotRescaler( QWidget* canvas,
     83        QwtAxisId referenceAxis = QwtAxis::XBottom,
    8184        RescalePolicy = Expanding );
    8285
    … …  
    9093
    9194    void setExpandingDirection( ExpandingDirection );
    92     void setExpandingDirection( int axis, ExpandingDirection );
    93     ExpandingDirection expandingDirection( int axis ) const;
     95    void setExpandingDirection( QwtAxisId, ExpandingDirection );
     96    ExpandingDirection expandingDirection( QwtAxisId ) const;
    9497
    95     void setReferenceAxis( int axis );
    96     int referenceAxis() const;
     98    void setReferenceAxis( QwtAxisId );
     99    QwtAxisId referenceAxis() const;
    97100
    98101    void setAspectRatio( double ratio );
    99     void setAspectRatio( int axis, double ratio );
    100     double aspectRatio( int axis ) const;
     102    void setAspectRatio( QwtAxisId, double ratio );
     103    double aspectRatio( QwtAxisId ) const;
    101104
    102     void setIntervalHint( int axis, const QwtInterval& );
    103     QwtInterval intervalHint( int axis ) const;
     105    void setIntervalHint( QwtAxisId, const QwtInterval& );
     106    QwtInterval intervalHint( QwtAxisId ) const;
    104107
    105     QWidget *canvas();
    106     const QWidget *canvas() const;
     108    QWidget* canvas();
     109    const QWidget* canvas() const;
    107110
    108     QwtPlot *plot();
    109     const QwtPlot *plot() const;
     111    QwtPlot* plot();
     112    const QwtPlot* plot() const;
    110113
    111     virtual bool eventFilter( QObject *, QEvent * );
     114    virtual bool eventFilter( QObject*, QEvent* ) QWT_OVERRIDE;
    112115
    113116    void rescale() const;
    114117
    115 protected:
    116     virtual void canvasResizeEvent( QResizeEvent * );
     118  protected:
     119    virtual void canvasResizeEvent( QResizeEvent* );
    117120
    118     virtual void rescale( const QSize &oldSize, const QSize &newSize ) const;
     121    virtual void rescale( const QSize& oldSize, const QSize& newSize ) const;
    119122    virtual QwtInterval expandScale(
    120         int axis, const QSize &oldSize, const QSize &newSize ) const;
     123        QwtAxisId, const QSize& oldSize, const QSize& newSize ) const;
    121124
    122125    virtual QwtInterval syncScale(
    123         int axis, const QwtInterval& reference,
    124         const QSize &size ) const;
     126        QwtAxisId, const QwtInterval& reference, const QSize& size ) const;
    125127
    126128    virtual void updateScales(
    127         QwtInterval intervals[QwtPlot::axisCnt] ) const;
     129        QwtInterval intervals[QwtAxis::AxisPositions] ) const;
    128130
    129     Qt::Orientation orientation( int axis ) const;
    130     QwtInterval interval( int axis ) const;
    131     QwtInterval expandInterval( const QwtInterval &,
     131    Qt::Orientation orientation( QwtAxisId ) const;
     132    QwtInterval interval( QwtAxisId ) const;
     133    QwtInterval expandInterval( const QwtInterval&,
    132134        double width, ExpandingDirection ) const;
    133135
    134 private:
    135     double pixelDist( int axis, const QSize & ) const;
     136  private:
     137    double pixelDist( QwtAxisId, const QSize& ) const;
    136138
    137139    class AxisData;
    138140    class PrivateData;
    139     PrivateData *d_data;
     141    PrivateData* m_data;
    140142};
    141143
Note: See TracChangeset for help on using the changeset viewer.