Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_counter.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_counter.h

    r9383 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    1515
    1616/*!
    17   \brief The Counter Widget
     17   \brief The Counter Widget
    1818
    19   A Counter consists of a label displaying a number and
    20   one ore more (up to three) push buttons on each side
    21   of the label which can be used to increment or decrement
    22   the counter's value.
     19   A Counter consists of a label displaying a number and
     20   one ore more (up to three) push buttons on each side
     21   of the label which can be used to increment or decrement
     22   the counter's value.
    2323
    24   A counter has a range from a minimum value to a maximum value
    25   and a step size. When the wrapping property is set
    26   the counter is circular.
     24   A counter has a range from a minimum value to a maximum value
     25   and a step size. When the wrapping property is set
     26   the counter is circular.
    2727
    28   The number of steps by which a button increments or decrements the value
    29   can be specified using setIncSteps(). The number of buttons can be
    30   changed with setNumButtons().
     28   The number of steps by which a button increments or decrements the value
     29   can be specified using setIncSteps(). The number of buttons can be
     30   changed with setNumButtons().
    3131
    32   Example:
    33 \code
    34 #include <qwt_counter.h>
     32   Example:
     33   \code
     34 #include <qwt_counter.h>
    3535
    36 QwtCounter *counter = new QwtCounter(parent);
     36   QwtCounter *counter = new QwtCounter(parent);
    3737
    38 counter->setRange(0.0, 100.0);                  // From 0.0 to 100
    39 counter->setSingleStep( 1.0 );                  // Step size 1.0
    40 counter->setNumButtons(2);                      // Two buttons each side
    41 counter->setIncSteps(QwtCounter::Button1, 1);   // Button 1 increments 1 step
    42 counter->setIncSteps(QwtCounter::Button2, 20);  // Button 2 increments 20 steps
     38   counter->setRange(0.0, 100.0);                  // From 0.0 to 100
     39   counter->setSingleStep( 1.0 );                  // Step size 1.0
     40   counter->setNumButtons(2);                      // Two buttons each side
     41   counter->setIncSteps(QwtCounter::Button1, 1);   // Button 1 increments 1 step
     42   counter->setIncSteps(QwtCounter::Button2, 20);  // Button 2 increments 20 steps
    4343
    44 connect(counter, SIGNAL(valueChanged(double)), myClass, SLOT(newValue(double)));
    45 \endcode
     44   connect(counter, SIGNAL(valueChanged(double)), myClass, SLOT(newValue(double)));
     45   \endcode
    4646 */
    4747
    … …  
    5050    Q_OBJECT
    5151
    52     Q_PROPERTY( double value READ value WRITE setValue )
     52    Q_PROPERTY( double value READ value WRITE setValue NOTIFY valueChanged USER true )
    5353    Q_PROPERTY( double minimum READ minimum WRITE setMinimum )
    5454    Q_PROPERTY( double maximum READ maximum WRITE setMaximum )
    … …  
    6363    Q_PROPERTY( bool wrapping READ wrapping WRITE setWrapping )
    6464
    65 public:
     65  public:
    6666    //! Button index
    6767    enum Button
    … …  
    8080    };
    8181
    82     explicit QwtCounter( QWidget *parent = NULL );
     82    explicit QwtCounter( QWidget* parent = NULL );
    8383    virtual ~QwtCounter();
    8484
    … …  
    9898    int incSteps( QwtCounter::Button ) const;
    9999
    100     virtual QSize sizeHint() const;
     100    virtual QSize sizeHint() const QWT_OVERRIDE;
    101101
    102102    double singleStep() const;
    … …  
    122122    double value() const;
    123123
    124 public Q_SLOTS:
     124  public Q_SLOTS:
    125125    void setValue( double );
    126126
    127127
    128 Q_SIGNALS:
     128  Q_SIGNALS:
    129129    /*!
    130130        This signal is emitted when a button has been released
    131131        \param value The new value
    132     */
     132     */
    133133    void buttonReleased ( double value );
    134134
    … …  
    136136        This signal is emitted when the counter's value has changed
    137137        \param value The new value
    138     */
     138     */
    139139    void valueChanged ( double value );
    140140
    141 protected:
    142     virtual bool event( QEvent * );
    143     virtual void wheelEvent( QWheelEvent * );
    144     virtual void keyPressEvent( QKeyEvent * );
     141  protected:
     142    virtual bool event( QEvent* ) QWT_OVERRIDE;
     143    virtual void wheelEvent( QWheelEvent* ) QWT_OVERRIDE;
     144    virtual void keyPressEvent( QKeyEvent* ) QWT_OVERRIDE;
    145145
    146 private Q_SLOTS:
     146  private Q_SLOTS:
    147147    void btnReleased();
    148148    void btnClicked();
    149149    void textChanged();
    150150
    151 private:
     151  private:
    152152    void incrementValue( int numSteps );
    153153    void initCounter();
    … …  
    156156
    157157    class PrivateData;
    158     PrivateData *d_data;
     158    PrivateData* m_data;
    159159};
    160160
Note: See TracChangeset for help on using the changeset viewer.