// qvalidator.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtGui Python extension module. // // Copyright (c) 2007 // Phil Thompson // // This file is part of PyQt. // // This copy of PyQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by // the Free Software Foundation and appearing in the file LICENSE included in the // packaging of this file. // // PyQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class QValidator : QObject { %TypeHeaderCode #include %End public: explicit QValidator(QObject *parent /TransferThis/); virtual ~QValidator(); enum State { Invalid, Intermediate, Acceptable, }; virtual QValidator::State validate(QString &, int & /In,Out/) const = 0; virtual void fixup(QString &) const; %If (Qt_4_3_0 -) void setLocale(const QLocale &locale); %End %If (Qt_4_3_0 -) QLocale locale() const; %End private: QValidator(const QValidator &); }; class QIntValidator : QValidator { %TypeHeaderCode #include %End public: explicit QIntValidator(QObject *parent /TransferThis/); QIntValidator(int bottom, int top, QObject *parent /TransferThis/); virtual ~QIntValidator(); virtual QValidator::State validate(QString &, int & /In,Out/) const; void setBottom(int); void setTop(int); virtual void setRange(int bottom, int top); int bottom() const; int top() const; private: QIntValidator(const QIntValidator &); }; class QDoubleValidator : QValidator { %TypeHeaderCode #include %End public: explicit QDoubleValidator(QObject *parent /TransferThis/); QDoubleValidator(double bottom, double top, int decimals, QObject *parent /TransferThis/); virtual ~QDoubleValidator(); virtual QValidator::State validate(QString &, int & /In,Out/) const; virtual void setRange(double bottom, double top, int decimals = 0); void setBottom(double); void setTop(double); void setDecimals(int); double bottom() const; double top() const; int decimals() const; %If (Qt_4_3_0 -) enum Notation { StandardNotation, ScientificNotation, }; %End %If (Qt_4_3_0 -) void setNotation(QDoubleValidator::Notation); %End %If (Qt_4_3_0 -) QDoubleValidator::Notation notation() const; %End private: QDoubleValidator(const QDoubleValidator &); }; class QRegExpValidator : QValidator { %TypeHeaderCode #include %End public: explicit QRegExpValidator(QObject *parent /TransferThis/); QRegExpValidator(const QRegExp &rx, QObject *parent /TransferThis/); virtual ~QRegExpValidator(); virtual QValidator::State validate(QString &input, int &pos /In,Out/) const; void setRegExp(const QRegExp &rx); const QRegExp ®Exp() const; private: QRegExpValidator(const QRegExpValidator &); };