qwt_abstract_slider.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_ABSTRACT_SLIDER_H
11 #define QWT_ABSTRACT_SLIDER_H
12 
13 #include "qwt_global.h"
14 #include "qwt_abstract_scale.h"
15 
33 {
34  Q_OBJECT
35 
36  Q_PROPERTY( double value READ value WRITE setValue NOTIFY valueChanged USER true )
37 
38  Q_PROPERTY( uint totalSteps READ totalSteps WRITE setTotalSteps )
39  Q_PROPERTY( uint singleSteps READ singleSteps WRITE setSingleSteps )
40  Q_PROPERTY( uint pageSteps READ pageSteps WRITE setPageSteps )
41  Q_PROPERTY( bool stepAlignment READ stepAlignment WRITE setStepAlignment )
42 
43  Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
44  Q_PROPERTY( bool tracking READ isTracking WRITE setTracking )
45  Q_PROPERTY( bool wrapping READ wrapping WRITE setWrapping )
46 
47  Q_PROPERTY( bool invertedControls READ invertedControls WRITE setInvertedControls )
48 
49  public:
50  explicit QwtAbstractSlider( QWidget* parent = NULL );
51  virtual ~QwtAbstractSlider();
52 
53  void setValid( bool );
54  bool isValid() const;
55 
56  double value() const;
57 
58  void setWrapping( bool );
59  bool wrapping() const;
60 
61  void setTotalSteps( uint );
62  uint totalSteps() const;
63 
64  void setSingleSteps( uint );
65  uint singleSteps() const;
66 
67  void setPageSteps( uint );
68  uint pageSteps() const;
69 
70  void setStepAlignment( bool );
71  bool stepAlignment() const;
72 
73  void setTracking( bool );
74  bool isTracking() const;
75 
76  void setReadOnly( bool );
77  bool isReadOnly() const;
78 
79  void setInvertedControls( bool );
80  bool invertedControls() const;
81 
82  public Q_SLOTS:
83  void setValue( double value );
84 
85  Q_SIGNALS:
86 
97  void valueChanged( double value );
98 
103  void sliderPressed();
104 
109  void sliderReleased();
110 
119  void sliderMoved( double value );
120 
121  protected:
122  virtual void mousePressEvent( QMouseEvent* ) QWT_OVERRIDE;
123  virtual void mouseReleaseEvent( QMouseEvent* ) QWT_OVERRIDE;
124  virtual void mouseMoveEvent( QMouseEvent* ) QWT_OVERRIDE;
125  virtual void keyPressEvent( QKeyEvent* ) QWT_OVERRIDE;
126  virtual void wheelEvent( QWheelEvent* ) QWT_OVERRIDE;
127 
136  virtual bool isScrollPosition( const QPoint& pos ) const = 0;
137 
147  virtual double scrolledTo( const QPoint& pos ) const = 0;
148 
149  void incrementValue( int stepCount );
150 
151  virtual void scaleChange() QWT_OVERRIDE;
152 
153  protected:
154  virtual void sliderChange();
155 
156  double incrementedValue(
157  double value, int stepCount ) const;
158 
159  private:
160  double alignedValue( double ) const;
161  double boundedValue( double ) const;
162 
163  class PrivateData;
164  PrivateData* m_data;
165 };
166 
167 #endif
qwt_global.h
QwtAbstractScale
An abstract base class for widgets having a scale.
Definition: qwt_abstract_scale.h:36
qwt_abstract_scale.h
QwtAbstractSlider::PrivateData
Definition: qwt_abstract_slider.cpp:43
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
QwtAbstractSlider
An abstract base class for slider widgets with a scale.
Definition: qwt_abstract_slider.h:32
QwtAxis::isValid
bool isValid(int axisPos)
Definition: qwt_axis.h:45


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45