Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_analog_clock.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_analog_clock.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_dial.h"
    15 #include "qwt_dial_needle.h"
    16 #include <qdatetime.h>
     15
     16class QwtDialNeedle;
    1717
    1818/*!
    19   \brief An analog clock
     19   \brief An analog clock
    2020
    21   \image html analogclock.png
     21   \image html analogclock.png
    2222
    23   \par Example
    24   \code
    25   #include <qwt_analog_clock.h>
     23   \par Example
     24   \code
     25 #include <qwt_analog_clock.h>
    2626
    27   QwtAnalogClock *clock = new QwtAnalogClock(...);
    28   clock->scaleDraw()->setPenWidth(3);
    29   clock->setLineWidth(6);
    30   clock->setFrameShadow(QwtDial::Sunken);
    31   clock->setTime();
     27   QwtAnalogClock *clock = new QwtAnalogClock(...);
     28   clock->scaleDraw()->setPenWidth(3);
     29   clock->setLineWidth(6);
     30   clock->setFrameShadow(QwtDial::Sunken);
     31   clock->setTime();
    3232
    33   // update the clock every second
    34   QTimer *timer = new QTimer(clock);
    35   timer->connect(timer, SIGNAL(timeout()), clock, SLOT(setCurrentTime()));
    36   timer->start(1000);
     33   // update the clock every second
     34   QTimer *timer = new QTimer(clock);
     35   timer->connect(timer, SIGNAL(timeout()), clock, SLOT(setCurrentTime()));
     36   timer->start(1000);
    3737
    38   \endcode
     38   \endcode
    3939
    40   \note The examples/dials example shows how to use QwtAnalogClock.
    41 */
     40   \note The examples/dials example shows how to use QwtAnalogClock.
     41 */
    4242
    43 class QWT_EXPORT QwtAnalogClock: public QwtDial
     43class QWT_EXPORT QwtAnalogClock : public QwtDial
    4444{
    4545    Q_OBJECT
    4646
    47 public:
     47  public:
    4848    /*!
    4949        Hand type
    5050        \sa setHand(), hand()
    51     */
     51     */
    5252    enum Hand
    5353    {
    … …  
    6868    virtual ~QwtAnalogClock();
    6969
    70     void setHand( Hand, QwtDialNeedle * );
     70    void setHand( Hand, QwtDialNeedle* );
    7171
    72     const QwtDialNeedle *hand( Hand ) const;
    73     QwtDialNeedle *hand( Hand );
     72    const QwtDialNeedle* hand( Hand ) const;
     73    QwtDialNeedle* hand( Hand );
    7474
    75 public Q_SLOTS:
     75  public Q_SLOTS:
    7676    void setCurrentTime();
    77     void setTime( const QTime & );
     77    void setTime( const QTime& );
    7878
    79 protected:
    80     virtual void drawNeedle( QPainter *, const QPointF &,
     79  protected:
     80    virtual void drawNeedle( QPainter*, const QPointF&, double radius,
     81        double direction, QPalette::ColorGroup ) const QWT_OVERRIDE;
     82
     83    virtual void drawHand( QPainter*, Hand, const QPointF&,
    8184        double radius, double direction, QPalette::ColorGroup ) const;
    8285
    83     virtual void drawHand( QPainter *, Hand, const QPointF &,
    84         double radius, double direction, QPalette::ColorGroup ) const;
     86  private:
     87    // use setHand instead
     88    void setNeedle( QwtDialNeedle* );
    8589
    86 private:
    87     // use setHand instead
    88     void setNeedle( QwtDialNeedle * );
    89 
    90     QwtDialNeedle *d_hand[NHands];
     90    QwtDialNeedle* m_hand[NHands];
    9191};
    9292
Note: See TracChangeset for help on using the changeset viewer.