1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
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
*****************************************************************************/
13
#include "qwt_global.h"
14
#include "qwt_abstract_slider.h"
17
\brief The Wheel Widget
19
The wheel widget can be used to change values over a very large range
20
in very small steps. Using the setMass member, it can be configured
23
\sa The radio example.
25
class QWT_EXPORT QwtWheel : public QwtAbstractSlider
28
Q_PROPERTY( double totalAngle READ totalAngle WRITE setTotalAngle )
29
Q_PROPERTY( double viewAngle READ viewAngle WRITE setViewAngle )
30
Q_PROPERTY( int tickCnt READ tickCnt WRITE setTickCnt )
31
Q_PROPERTY( int internalBorder READ internalBorder WRITE setInternalBorder )
32
Q_PROPERTY( double mass READ mass WRITE setMass )
35
explicit QwtWheel(QWidget *parent = NULL);
36
#if QT_VERSION < 0x040000
37
explicit QwtWheel(QWidget *parent, const char *name);
41
virtual void setOrientation(Qt::Orientation);
43
double totalAngle() const;
44
double viewAngle() const;
46
int internalBorder() const;
50
void setTotalAngle (double angle);
51
void setTickCnt(int cnt);
52
void setViewAngle(double angle);
53
void setInternalBorder(int width);
54
void setMass(double val);
55
void setWheelWidth( int w );
57
virtual QSize sizeHint() const;
58
virtual QSize minimumSizeHint() const;
61
virtual void resizeEvent(QResizeEvent *e);
62
virtual void paintEvent(QPaintEvent *e);
64
void layoutWheel( bool update = true );
65
void draw(QPainter *p, const QRect& update_rect);
66
void drawWheel(QPainter *p, const QRect &r);
67
void drawWheelBackground(QPainter *p, const QRect &r);
70
virtual void valueChange();
71
virtual void paletteChange( const QPalette &);
73
virtual double getValue(const QPoint &p);
74
virtual void getScrollMode(const QPoint &p,
75
int &scrollMode, int &direction);