Salome HOME
a8227b04b9e7a5d168d00ed377e6b9050731b778
[modules/gui.git] / src / Qtx / QtxIntSpinBox.h
1 // File:      QtxIntSpinBox.h
2 // Author:    Sergey TELKOV
3
4 #ifndef QTXINTSPINBOX_H
5 #define QTXINTSPINBOX_H
6
7 #include "Qtx.h"
8
9 #include <qspinbox.h>
10
11 class QTX_EXPORT QtxIntSpinBox : public QSpinBox
12 {
13     Q_OBJECT
14
15 public:
16   QtxIntSpinBox( QWidget* = 0, const char* = 0 );
17   QtxIntSpinBox( int, int, int = 1, QWidget* = 0, const char* = 0 );
18   virtual ~QtxIntSpinBox();
19     
20   bool         isCleared() const;
21   virtual void setCleared( const bool );
22     
23   virtual bool eventFilter( QObject*, QEvent* );
24     
25 public slots:
26   virtual void setValue( int );
27
28 protected slots:
29   virtual void onTextChanged( const QString& );
30   
31 protected:
32   virtual void interpretText();
33   virtual void updateDisplay();
34   virtual void leaveEvent( QEvent* );
35   virtual void wheelEvent( QWheelEvent* );
36     
37 private:
38   bool         myCleared;
39   bool         myBlocked;
40 };
41
42 #endif