blob: e8d0be2820cc3542d8a0f7c08c0fb1f64c64cc4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#pragma once
#include <tqwidget.h>
class BalanceKnob : public TQWidget
{
TQ_OBJECT
public:
BalanceKnob( int minVal, int maxVal, int val, TQWidget *parent = 0 );
int value() const { return m_value; }
TQSize sizeHint() const { return TQSize(30, 30); }
public slots:
void setValue( int v );
signals:
void valueChanged( int v );
protected:
void paintEvent( TQPaintEvent * );
void mousePressEvent( TQMouseEvent *e );
void mouseMoveEvent( TQMouseEvent *e );
void mouseReleaseEvent( TQMouseEvent *e );
void mouseDoubleClickEvent( TQMouseEvent *e );
void wheelEvent( TQWheelEvent *e );
private:
int m_min, m_max, m_value;
int m_dragY;
int m_dragValue;
bool m_dragging;
};
|