Changeset 4323 in vbox for trunk/src/VBox/Frontends/VirtualBox/include/QIWidgetValidator.h
- Timestamp:
- Aug 23, 2007 6:58:03 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/QIWidgetValidator.h
r4071 r4323 20 20 #define __QIWidgetValidator_h__ 21 21 22 #include <limits.h> 23 22 24 #include <qobject.h> 25 #include <qvalidator.h> 23 26 24 27 class QIWidgetValidator : public QObject … … 52 55 }; 53 56 57 class QIULongValidator : public QValidator 58 { 59 public: 60 61 QIULongValidator (QObject *aParent, const char *aName = 0) 62 : mBottom (0), mTop (ULONG_MAX) 63 , QValidator (aParent, aName) {} 64 65 QIULongValidator (ulong aMinimum, ulong aMaximum, 66 QObject *aParent, const char *aName = 0) 67 : mBottom (aMinimum), mTop (aMaximum) 68 , QValidator (aParent, aName) {} 69 70 ~QIULongValidator() {} 71 72 State validate (QString &aInput, int &aPos) const; 73 void setBottom (ulong aBottom) { setRange (aBottom, mTop); } 74 void setTop (ulong aTop) { setRange (mBottom, aTop); } 75 void setRange (ulong aBottom, ulong aTop) { mBottom = aBottom; mTop = aTop; } 76 ulong bottom() const { return mBottom; } 77 ulong top() const { return mTop; } 78 79 private: 80 81 ulong mBottom; 82 ulong mTop; 83 }; 84 54 85 #endif // __QIWidgetValidator_h__
Note:
See TracChangeset
for help on using the changeset viewer.