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


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_dial_needle.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_NEEDLE_H
    11 #define QWT_DIAL_NEEDLE_H 1
     11#define QWT_DIAL_NEEDLE_H
    1212
    1313#include "qwt_global.h"
    … …  
    1515
    1616class QPainter;
    17 class QPoint;
    1817
    1918/*!
    20   \brief Base class for needles that can be used in a QwtDial.
     19   \brief Base class for needles that can be used in a QwtDial.
    2120
    22   QwtDialNeedle is a pointer that indicates a value by pointing
    23   to a specific direction.
     21   QwtDialNeedle is a pointer that indicates a value by pointing
     22   to a specific direction.
    2423
    25   \sa QwtDial, QwtCompass
    26 */
     24   \sa QwtDial, QwtCompass
     25 */
    2726
    2827class QWT_EXPORT QwtDialNeedle
    2928{
    30 public:
     29  public:
    3130    QwtDialNeedle();
    3231    virtual ~QwtDialNeedle();
    3332
    34     virtual void setPalette( const QPalette & );
    35     const QPalette &palette() const;
     33    virtual void setPalette( const QPalette& );
     34    const QPalette& palette() const;
    3635
    37     virtual void draw( QPainter *painter, const QPointF &center,
     36    virtual void draw( QPainter*, const QPointF& center,
    3837        double length, double direction,
    3938        QPalette::ColorGroup = QPalette::Active ) const;
    4039
    41 protected:
     40  protected:
    4241    /*!
    43       \brief Draw the needle
     42       \brief Draw the needle
    4443
    45       The origin of the needle is at position (0.0, 0.0 )
    46       pointing in direction 0.0 ( = east ).
     44       The origin of the needle is at position (0.0, 0.0 )
     45       pointing in direction 0.0 ( = east ).
    4746
    48       The painter is already initialized with translation and
    49       rotation.
     47       The painter is already initialized with translation and
     48       rotation.
    5049
    51       \param painter Painter
    52       \param length Length of the needle
    53       \param colorGroup Color group, used for painting
     50       \param painter Painter
     51       \param length Length of the needle
     52       \param colorGroup Color group, used for painting
    5453
    55       \sa setPalette(), palette()
    56     */
    57     virtual void drawNeedle( QPainter *painter,
     54       \sa setPalette(), palette()
     55     */
     56    virtual void drawNeedle( QPainter* painter,
    5857        double length, QPalette::ColorGroup colorGroup ) const = 0;
    5958
    60     virtual void drawKnob( QPainter *, double width,
    61         const QBrush &, bool sunken ) const;
     59    virtual void drawKnob( QPainter*, double width,
     60        const QBrush&, bool sunken ) const;
    6261
    63 private:
    64     QPalette d_palette;
     62  private:
     63    Q_DISABLE_COPY(QwtDialNeedle)
     64
     65    QPalette m_palette;
    6566};
    6667
    6768/*!
    68   \brief A needle for dial widgets
     69   \brief A needle for dial widgets
    6970
    70   The following colors are used:
     71   The following colors are used:
    7172
    72   - QPalette::Mid\n
     73   - QPalette::Mid\n
    7374    Pointer
    74   - QPalette::Base\n
     75   - QPalette::Base\n
    7576    Knob
    7677
    77   \sa QwtDial, QwtCompass
    78 */
     78   \sa QwtDial, QwtCompass
     79 */
    7980
    80 class QWT_EXPORT QwtDialSimpleNeedle: public QwtDialNeedle
     81class QWT_EXPORT QwtDialSimpleNeedle : public QwtDialNeedle
    8182{
    82 public:
     83  public:
    8384    //! Style of the needle
    8485    enum Style
    … …  
    9293
    9394    QwtDialSimpleNeedle( Style, bool hasKnob = true,
    94         const QColor &mid = Qt::gray, const QColor &base = Qt::darkGray );
     95        const QColor& mid = Qt::gray, const QColor& base = Qt::darkGray );
    9596
    9697    void setWidth( double width );
    9798    double width() const;
    9899
    99 protected:
    100     virtual void drawNeedle( QPainter *, double length,
    101         QPalette::ColorGroup ) const;
     100  protected:
     101    virtual void drawNeedle( QPainter*, double length,
     102        QPalette::ColorGroup ) const QWT_OVERRIDE;
    102103
    103 private:
    104     Style d_style;
    105     bool d_hasKnob;
    106     double d_width;
     104  private:
     105    Style m_style;
     106    bool m_hasKnob;
     107    double m_width;
    107108};
    108109
    109110/*!
    110   \brief A magnet needle for compass widgets
     111   \brief A magnet needle for compass widgets
    111112
    112   A magnet needle points to two opposite directions indicating
    113   north and south.
     113   A magnet needle points to two opposite directions indicating
     114   north and south.
    114115
    115   The following colors are used:
    116   - QPalette::Light\n
     116   The following colors are used:
     117   - QPalette::Light\n
    117118    Used for pointing south
    118   - QPalette::Dark\n
     119   - QPalette::Dark\n
    119120    Used for pointing north
    120   - QPalette::Base\n
     121   - QPalette::Base\n
    121122    Knob (ThinStyle only)
    122123
    123   \sa QwtDial, QwtCompass
    124 */
     124   \sa QwtDial, QwtCompass
     125 */
    125126
    126 class QWT_EXPORT QwtCompassMagnetNeedle: public QwtDialNeedle
     127class QWT_EXPORT QwtCompassMagnetNeedle : public QwtDialNeedle
    127128{
    128 public:
     129  public:
    129130    //! Style of the needle
    130131    enum Style
    … …  
    138139
    139140    QwtCompassMagnetNeedle( Style = TriangleStyle,
    140         const QColor &light = Qt::white, const QColor &dark = Qt::red );
     141        const QColor& light = Qt::white, const QColor& dark = Qt::red );
    141142
    142 protected:
    143     virtual void drawNeedle( QPainter *,
    144         double length, QPalette::ColorGroup ) const;
     143  protected:
     144    virtual void drawNeedle( QPainter*,
     145        double length, QPalette::ColorGroup ) const QWT_OVERRIDE;
    145146
    146 private:
    147     Style d_style;
     147  private:
     148    Style m_style;
    148149};
    149150
    150151/*!
    151   \brief An indicator for the wind direction
     152   \brief An indicator for the wind direction
    152153
    153   QwtCompassWindArrow shows the direction where the wind comes from.
     154   QwtCompassWindArrow shows the direction where the wind comes from.
    154155
    155   - QPalette::Light\n
     156   - QPalette::Light\n
    156157    Used for Style1, or the light half of Style2
    157   - QPalette::Dark\n
     158   - QPalette::Dark\n
    158159    Used for the dark half of Style2
    159160
    160   \sa QwtDial, QwtCompass
    161 */
     161   \sa QwtDial, QwtCompass
     162 */
    162163
    163 class QWT_EXPORT QwtCompassWindArrow: public QwtDialNeedle
     164class QWT_EXPORT QwtCompassWindArrow : public QwtDialNeedle
    164165{
    165 public:
     166  public:
    166167    //! Style of the arrow
    167168    enum Style
    … …  
    174175    };
    175176
    176     QwtCompassWindArrow( Style, const QColor &light = Qt::white,
    177         const QColor &dark = Qt::gray );
     177    QwtCompassWindArrow( Style, const QColor& light = Qt::white,
     178        const QColor& dark = Qt::gray );
    178179
    179 protected:
    180     virtual void drawNeedle( QPainter *,
    181         double length, QPalette::ColorGroup ) const;
     180  protected:
     181    virtual void drawNeedle( QPainter*,
     182        double length, QPalette::ColorGroup ) const QWT_OVERRIDE;
    182183
    183 private:
    184     Style d_style;
     184  private:
     185    Style m_style;
    185186};
    186187
Note: See TracChangeset for help on using the changeset viewer.