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

deprecated functions exchanged libs updated

File:
1 edited

Legend:

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

    r9383 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    1313#include "qwt_global.h"
    1414#include "qwt_scale_div.h"
    15 #include "qwt_text.h"
    1615
     16class QwtText;
    1717class QPalette;
    1818class QPainter;
    … …  
    2222
    2323/*!
    24   \brief A abstract base class for drawing scales
     24   \brief A abstract base class for drawing scales
    2525
    26   QwtAbstractScaleDraw can be used to draw linear or logarithmic scales.
     26   QwtAbstractScaleDraw can be used to draw linear or logarithmic scales.
    2727
    28   After a scale division has been specified as a QwtScaleDiv object
    29   using setScaleDiv(), the scale can be drawn with the draw() member.
    30 */
     28   After a scale division has been specified as a QwtScaleDiv object
     29   using setScaleDiv(), the scale can be drawn with the draw() member.
     30 */
    3131class QWT_EXPORT QwtAbstractScaleDraw
    3232{
    33 public:
     33  public:
    3434
    3535    /*!
    3636       Components of a scale
    3737       \sa enableComponent(), hasComponent
    38     */
     38     */
    3939    enum ScaleComponent
    4040    {
    … …  
    4949    };
    5050
    51     //! Scale components
    52     typedef QFlags<ScaleComponent> ScaleComponents;
     51    Q_DECLARE_FLAGS( ScaleComponents, ScaleComponent )
    5352
    5453    QwtAbstractScaleDraw();
    5554    virtual ~QwtAbstractScaleDraw();
    5655
    57     void setScaleDiv( const QwtScaleDiv & );
     56    void setScaleDiv( const QwtScaleDiv& );
    5857    const QwtScaleDiv& scaleDiv() const;
    5958
    60     void setTransformation( QwtTransform * );
    61     const QwtScaleMap &scaleMap() const;
    62     QwtScaleMap &scaleMap();
     59    void setTransformation( QwtTransform* );
     60    const QwtScaleMap& scaleMap() const;
     61    QwtScaleMap& scaleMap();
    6362
    6463    void enableComponent( ScaleComponent, bool enable = true );
    … …  
    7271    double spacing() const;
    7372
    74     void setPenWidth( int width );
    75     int penWidth() const;
     73    void setPenWidthF( qreal width );
     74    qreal penWidthF() const;
    7675
    77     virtual void draw( QPainter *, const QPalette & ) const;
     76    virtual void draw( QPainter*, const QPalette& ) const;
    7877
    7978    virtual QwtText label( double ) const;
    8079
    8180    /*!
    82       Calculate the extent
     81       Calculate the extent
    8382
    84       The extent is the distance from the baseline to the outermost
    85       pixel of the scale draw in opposite to its orientation.
    86       It is at least minimumExtent() pixels.
     83       The extent is the distance from the baseline to the outermost
     84       pixel of the scale draw in opposite to its orientation.
     85       It is at least minimumExtent() pixels.
    8786
    88       \param font Font used for drawing the tick labels
    89       \return Number of pixels
     87       \param font Font used for drawing the tick labels
     88       \return Number of pixels
    9089
    91       \sa setMinimumExtent(), minimumExtent()
    92     */
    93     virtual double extent( const QFont &font ) const = 0;
     90       \sa setMinimumExtent(), minimumExtent()
     91     */
     92    virtual double extent( const QFont& font ) const = 0;
    9493
    9594    void setMinimumExtent( double );
    9695    double minimumExtent() const;
    9796
    98 protected:
     97    void invalidateCache();
     98
     99  protected:
    99100    /*!
    100101       Draw a tick
    … …  
    105106
    106107       \sa drawBackbone(), drawLabel()
    107     */
    108     virtual void drawTick( QPainter *painter, double value, double len ) const = 0;
     108     */
     109    virtual void drawTick( QPainter* painter, double value, double len ) const = 0;
    109110
    110111    /*!
    111       Draws the baseline of the scale
    112       \param painter Painter
     112       Draws the baseline of the scale
     113       \param painter Painter
    113114
    114       \sa drawTick(), drawLabel()
    115     */
    116     virtual void drawBackbone( QPainter *painter ) const = 0;
     115       \sa drawTick(), drawLabel()
     116     */
     117    virtual void drawBackbone( QPainter* painter ) const = 0;
    117118
    118119    /*!
    … …  
    123124
    124125        \sa drawTick(), drawBackbone()
    125     */
    126     virtual void drawLabel( QPainter *painter, double value ) const = 0;
     126     */
     127    virtual void drawLabel( QPainter* painter, double value ) const = 0;
    127128
    128     void invalidateCache();
    129     const QwtText &tickLabel( const QFont &, double value ) const;
     129    const QwtText& tickLabel( const QFont&, double value ) const;
    130130
    131 private:
    132     QwtAbstractScaleDraw( const QwtAbstractScaleDraw & );
    133     QwtAbstractScaleDraw &operator=( const QwtAbstractScaleDraw & );
     131  private:
     132    Q_DISABLE_COPY(QwtAbstractScaleDraw)
    134133
    135134    class PrivateData;
    136     PrivateData *d_data;
     135    PrivateData* m_data;
    137136};
    138137
Note: See TracChangeset for help on using the changeset viewer.