Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_dial.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_dial.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_DIAL_H
    11 #define QWT_DIAL_H 1
     11#define QWT_DIAL_H
    1212
    1313#include "qwt_global.h"
    1414#include "qwt_abstract_slider.h"
    15 #include "qwt_abstract_scale_draw.h"
     15
    1616#include <qframe.h>
    1717#include <qpalette.h>
    … …  
    1919class QwtDialNeedle;
    2020class QwtRoundScaleDraw;
     21class QwtAbstractScaleDraw;
    2122
    2223/*!
    23   \brief QwtDial class provides a rounded range control.
     24   \brief QwtDial class provides a rounded range control.
    2425
    25   QwtDial is intended as base class for dial widgets like
    26   speedometers, compass widgets, clocks ...
     26   QwtDial is intended as base class for dial widgets like
     27   speedometers, compass widgets, clocks ...
    2728
    28   \image html dials2.png
     29   \image html dials2.png
    2930
    30   A dial contains a scale and a needle indicating the current value
    31   of the dial. Depending on Mode one of them is fixed and the
    32   other is rotating. If not isReadOnly() the
    33   dial can be rotated by dragging the mouse or using keyboard inputs
    34   (see QwtAbstractSlider::keyPressEvent()). A dial might be wrapping, what means
    35   a rotation below/above one limit continues on the other limit (f.e compass).
    36   The scale might cover any arc of the dial, its values are related to
    37   the origin() of the dial.
     31   A dial contains a scale and a needle indicating the current value
     32   of the dial. Depending on Mode one of them is fixed and the
     33   other is rotating. If not isReadOnly() the
     34   dial can be rotated by dragging the mouse or using keyboard inputs
     35   (see QwtAbstractSlider::keyPressEvent()). A dial might be wrapping, what means
     36   a rotation below/above one limit continues on the other limit (f.e compass).
     37   The scale might cover any arc of the dial, its values are related to
     38   the origin() of the dial.
    3839
    39   Often dials have to be updated very often according to values from external
    40   devices. For these high refresh rates QwtDial caches as much as possible.
    41   For derived classes it might be necessary to clear these caches manually
    42   according to attribute changes using invalidateCache().
     40   Often dials have to be updated very often according to values from external
     41   devices. For these high refresh rates QwtDial caches as much as possible.
     42   For derived classes it might be necessary to clear these caches manually
     43   according to attribute changes using invalidateCache().
    4344
    44   \sa QwtCompass, QwtAnalogClock, QwtDialNeedle
    45   \note The controls and dials examples shows different types of dials.
    46   \note QDial is more similar to QwtKnob than to QwtDial
    47 */
     45   \sa QwtCompass, QwtAnalogClock, QwtDialNeedle
     46   \note The controls and dials examples shows different types of dials.
     47   \note QDial is more similar to QwtKnob than to QwtDial
     48 */
    4849
    49 class QWT_EXPORT QwtDial: public QwtAbstractSlider
     50class QWT_EXPORT QwtDial : public QwtAbstractSlider
    5051{
    5152    Q_OBJECT
    … …  
    6061    Q_PROPERTY( double maxScaleArc READ maxScaleArc WRITE setMaxScaleArc )
    6162
    62 public:
     63  public:
    6364
    6465    /*!
    … …  
    9293    };
    9394
    94     explicit QwtDial( QWidget *parent = NULL );
     95    explicit QwtDial( QWidget* parent = NULL );
    9596    virtual ~QwtDial();
    9697
    … …  
    115116    double origin() const;
    116117
    117     void setNeedle( QwtDialNeedle * );
    118     const QwtDialNeedle *needle() const;
    119     QwtDialNeedle *needle();
     118    void setNeedle( QwtDialNeedle* );
     119    const QwtDialNeedle* needle() const;
     120    QwtDialNeedle* needle();
    120121
    121122    QRect boundingRect() const;
    … …  
    124125    virtual QRect scaleInnerRect() const;
    125126
    126     virtual QSize sizeHint() const;
    127     virtual QSize minimumSizeHint() const;
     127    virtual QSize sizeHint() const QWT_OVERRIDE;
     128    virtual QSize minimumSizeHint() const QWT_OVERRIDE;
    128129
    129     void setScaleDraw( QwtRoundScaleDraw * );
     130    void setScaleDraw( QwtRoundScaleDraw* );
    130131
    131     QwtRoundScaleDraw *scaleDraw();
    132     const QwtRoundScaleDraw *scaleDraw() const;
     132    QwtRoundScaleDraw* scaleDraw();
     133    const QwtRoundScaleDraw* scaleDraw() const;
    133134
    134 protected:
    135     virtual void wheelEvent( QWheelEvent * );
    136     virtual void paintEvent( QPaintEvent * );
    137     virtual void changeEvent( QEvent * );
     135  protected:
     136    virtual void wheelEvent( QWheelEvent* ) QWT_OVERRIDE;
     137    virtual void paintEvent( QPaintEvent* ) QWT_OVERRIDE;
     138    virtual void changeEvent( QEvent* ) QWT_OVERRIDE;
    138139
    139     virtual void drawFrame( QPainter * );
    140     virtual void drawContents( QPainter * ) const;
    141     virtual void drawFocusIndicator( QPainter * ) const;
     140    virtual void drawFrame( QPainter* );
     141    virtual void drawContents( QPainter* ) const;
     142    virtual void drawFocusIndicator( QPainter* ) const;
    142143
    143144    void invalidateCache();
    144145
    145     virtual void drawScale( QPainter *,
    146         const QPointF &center, double radius ) const;
     146    virtual void drawScale( QPainter*,
     147        const QPointF& center, double radius ) const;
    147148
    148     virtual void drawScaleContents( QPainter *painter,
    149         const QPointF &center, double radius ) const;
     149    virtual void drawScaleContents( QPainter* painter,
     150        const QPointF& center, double radius ) const;
    150151
    151     virtual void drawNeedle( QPainter *, const QPointF &,
     152    virtual void drawNeedle( QPainter*, const QPointF&,
    152153        double radius, double direction, QPalette::ColorGroup ) const;
    153154
    154     virtual double scrolledTo( const QPoint & ) const;
    155     virtual bool isScrollPosition( const QPoint & ) const;
     155    virtual double scrolledTo( const QPoint& ) const QWT_OVERRIDE;
     156    virtual bool isScrollPosition( const QPoint& ) const QWT_OVERRIDE;
    156157
    157     virtual void sliderChange();
    158     virtual void scaleChange();
     158    virtual void sliderChange() QWT_OVERRIDE;
     159    virtual void scaleChange() QWT_OVERRIDE;
    159160
    160 private:
     161  private:
    161162    void setAngleRange( double angle, double span );
    162     void drawNeedle( QPainter * ) const;
     163    void drawNeedle( QPainter* ) const;
    163164
    164165    class PrivateData;
    165     PrivateData *d_data;
     166    PrivateData* m_data;
    166167};
    167168
Note: See TracChangeset for help on using the changeset viewer.