Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lcdnumber.h
Go to the documentation of this file.
1 
24 #ifndef NUMBERDISPLAY_H
25 
26 #define NUMBERDISPLAY_H
27 
28 #include <QLCDNumber>
29 #include <QContextMenuEvent>
30 
31 class QAction;
32 
33 // LCD Number enhanced with the possibility to limit the number displayed in the LCD
34 class CALCDNumber : public QLCDNumber
35 {
36  Q_OBJECT
37 
38 public:
50  CALCDNumber (int iMin, int iMax, QWidget * poParent=0, QString oText = "");
51 
58  void setRealValue(int val);
63  int getRealValue();
70  void setMin(int iMin);
77  void setMax(int iMax);
82  bool isZero();
83 signals:
90  void valChanged(int iVal);
91 protected:
98  virtual void mousePressEvent(QMouseEvent *poEvt);
105  virtual void wheelEvent(QWheelEvent *poEvt);
106 
113  virtual inline void contextMenuEvent(QContextMenuEvent *poEvt) { }
114 private:
115  int min_, max_;
118  QString toolTipText_;
119 };
120 
121 #endif /* NUMBERDISPLAY_H */