diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
commit | 2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch) | |
tree | 18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/isbnvalidator.h | |
parent | 1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff) | |
download | tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip |
TQt4 port tellico
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/isbnvalidator.h')
-rw-r--r-- | src/isbnvalidator.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/isbnvalidator.h b/src/isbnvalidator.h index 763f7ff..0747823 100644 --- a/src/isbnvalidator.h +++ b/src/isbnvalidator.h @@ -14,7 +14,7 @@ #ifndef ISBNVALIDATOR_H #define ISBNVALIDATOR_H -#include <qvalidator.h> +#include <tqvalidator.h> namespace Tellico { @@ -25,9 +25,9 @@ namespace Tellico { * @see http://www.eblong.com/zarf/bookscan/ * @see http://doc.trolltech.com/qq/qq01-seriously-weird-qregexp.html */ -class ISBNValidator : public QValidator { +class ISBNValidator : public TQValidator { public: - ISBNValidator(QObject* parent, const char* name=0); + ISBNValidator(TQObject* tqparent, const char* name=0); /** * Certain conditions are checked. Character, length and position @@ -40,7 +40,7 @@ public: * @param pos The position of the cursor * @return The condition of the text */ - virtual QValidator::State validate(QString& input, int& pos) const; + virtual TQValidator::State validate(TQString& input, int& pos) const; /** * The input string is examined. Hyphens are inserted appropriately, @@ -110,12 +110,12 @@ public: * * @param input The raw string, hyphens included */ - virtual void fixup(QString& input) const; - static void staticFixup(QString& input); + virtual void fixup(TQString& input) const; + static void staticFixup(TQString& input); - static QString isbn10(QString isbn13); - static QString isbn13(QString isbn10); - static QString cleanValue(QString isbn); + static TQString isbn10(TQString isbn13); + static TQString isbn13(TQString isbn10); + static TQString cleanValue(TQString isbn); private: static struct isbn_band { @@ -125,11 +125,11 @@ private: unsigned int Last; } bands[]; - QValidator::State validate10(QString& input, int& pos) const; - QValidator::State validate13(QString& input, int& pos) const; + TQValidator::State validate10(TQString& input, int& pos) const; + TQValidator::State validate13(TQString& input, int& pos) const; - static void fixup10(QString& input); - static void fixup13(QString& input); + static void fixup10(TQString& input); + static void fixup13(TQString& input); /** * This function calculates and returns the ISBN checksum. The @@ -140,8 +140,8 @@ private: * * @param input The raw string, with no hyphens */ - static QChar checkSum10(const QString& input); - static QChar checkSum13(const QString& input); + static TQChar checkSum10(const TQString& input); + static TQChar checkSum13(const TQString& input); }; } // end namespace |