diff options
Diffstat (limited to 'doc/man/man3/tqvalidator.3qt')
-rw-r--r-- | doc/man/man3/tqvalidator.3qt | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/doc/man/man3/tqvalidator.3qt b/doc/man/man3/tqvalidator.3qt index b0d607cd1..3805d1be6 100644 --- a/doc/man/man3/tqvalidator.3qt +++ b/doc/man/man3/tqvalidator.3qt @@ -1,5 +1,5 @@ '\" t -.TH QValidator 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQValidator 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,21 +7,21 @@ .ad l .nh .SH NAME -QValidator \- Validation of input text +TQValidator \- Validation of input text .SH SYNOPSIS -\fC#include <ntqvalidator.h>\fR +\fC#include <tqvalidator.h>\fR .PP Inherits TQObject. .PP -Inherited by QIntValidator, QDoubleValidator, and TQRegExpValidator. +Inherited by QIntValidator, TQDoubleValidator, and TQRegExpValidator. .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQValidator\fR ( TQObject * parent, const char * name = 0 )" +.BI "\fBTQValidator\fR ( TQObject * parent, const char * name = 0 )" .br .ti -1c -.BI "\fB~QValidator\fR ()" +.BI "\fB~TQValidator\fR ()" .br .ti -1c .BI "enum \fBState\fR { Invalid, Intermediate, Valid = Intermediate, Acceptable }" @@ -34,15 +34,15 @@ Inherited by QIntValidator, QDoubleValidator, and TQRegExpValidator. .br .in -1c .SH DESCRIPTION -The QValidator class provides validation of input text. +The TQValidator class provides validation of input text. .PP -The class itself is abstract. Two subclasses, QIntValidator and QDoubleValidator, provide basic numeric-range checking, and TQRegExpValidator provides general checking using a custom regular expression. +The class itself is abstract. Two subclasses, QIntValidator and TQDoubleValidator, provide basic numeric-range checking, and TQRegExpValidator provides general checking using a custom regular expression. .PP -If the built-in validators aren't sufficient, you can subclass QValidator. The class has two virtual functions: validate() and fixup(). +If the built-in validators aren't sufficient, you can subclass TQValidator. The class has two virtual functions: validate() and fixup(). .PP validate() must be implemented by every subclass. It returns Invalid, Intermediate or Acceptable depending on whether its argument is valid (for the subclass's definition of valid). .PP -These three states require some explanation. An Invalid string is \fIclearly\fR invalid. Intermediate is less obvious: the concept of validity is slippery when the string is incomplete (still being edited). QValidator defines Intermediate as the property of a string that is neither clearly invalid nor acceptable as a final result. Acceptable means that the string is acceptable as a final result. One might say that any string that is a plausible intermediate state during entry of an Acceptable string is Intermediate. +These three states require some explanation. An Invalid string is \fIclearly\fR invalid. Intermediate is less obvious: the concept of validity is slippery when the string is incomplete (still being edited). TQValidator defines Intermediate as the property of a string that is neither clearly invalid nor acceptable as a final result. Acceptable means that the string is acceptable as a final result. One might say that any string that is a plausible intermediate state during entry of an Acceptable string is Intermediate. .PP Here are some examples: .IP @@ -58,36 +58,36 @@ For a spin box that accepts lengths, "11cm" and "1in" are Acceptable, "11" and t .PP fixup() is provided for validators that can repair some user errors. The default implementation does nothing. TQLineEdit, for example, will call fixup() if the user presses Enter (or Return) and the content is not currently valid. This allows the fixup() function the opportunity of performing some magic to make an Invalid string Acceptable. .PP -QValidator is typically used with TQLineEdit, TQSpinBox and TQComboBox. +TQValidator is typically used with TQLineEdit, TQSpinBox and TQComboBox. .PP See also Miscellaneous Classes. .SS "Member Type Documentation" -.SH "QValidator::State" +.SH "TQValidator::State" This enum type defines the states in which a validated string can exist. .TP -\fCQValidator::Invalid\fR - the string is \fIclearly\fR invalid. +\fCTQValidator::Invalid\fR - the string is \fIclearly\fR invalid. .TP -\fCQValidator::Intermediate\fR - the string is a plausible intermediate value during editing. +\fCTQValidator::Intermediate\fR - the string is a plausible intermediate value during editing. .TP -\fCQValidator::Acceptable\fR - the string is acceptable as a final result, i.e. it is valid. +\fCTQValidator::Acceptable\fR - the string is acceptable as a final result, i.e. it is valid. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QValidator::QValidator ( TQObject * parent, const char * name = 0 )" +.SH "TQValidator::TQValidator ( TQObject * parent, const char * name = 0 )" Sets up the validator. The \fIparent\fR and \fIname\fR parameters are passed on to the TQObject constructor. -.SH "QValidator::~QValidator ()" +.SH "TQValidator::~TQValidator ()" Destroys the validator, freeing any storage and other resources used. -.SH "void QValidator::fixup ( TQString & input ) const\fC [virtual]\fR" +.SH "void TQValidator::fixup ( TQString & input ) const\fC [virtual]\fR" This function attempts to change \fIinput\fR to be valid according to this validator's rules. It need not result in a valid string: callers of this function must re-test afterwards; the default does nothing. .PP Reimplementations of this function can change \fIinput\fR even if they do not produce a valid string. For example, an ISBN validator might want to delete every character except digits and "-", even if the result is still not a valid ISBN; a surname validator might want to remove whitespace from the start and end of the string, even if the resulting string is not in the list of accepted surnames. -.SH "State QValidator::validate ( TQString & input, int & pos ) const\fC [pure virtual]\fR" +.SH "State TQValidator::validate ( TQString & input, int & pos ) const\fC [pure virtual]\fR" This pure virtual function returns Invalid if \fIinput\fR is invalid according to this validator's rules, Intermediate if it is likely that a little more editing will make the input acceptable (e.g. the user types '4' into a widget which accepts integers between 10 and 99) and Acceptable if the input is valid. .PP The function can change \fIinput\fR and \fIpos\fR (the cursor position) if it wants to. .PP -Reimplemented in QIntValidator, QDoubleValidator, and TQRegExpValidator. +Reimplemented in QIntValidator, TQDoubleValidator, and TQRegExpValidator. .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqvalidator.html +.BR http://doc.trolltech.com/tqvalidator.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the |