summaryrefslogtreecommitdiffstats
path: root/kexi/kexiutils/validator.h
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/kexiutils/validator.h')
-rw-r--r--kexi/kexiutils/validator.h62
1 files changed, 31 insertions, 31 deletions
diff --git a/kexi/kexiutils/validator.h b/kexi/kexiutils/validator.h
index 5a33d4c6..b5c6e6cc 100644
--- a/kexi/kexiutils/validator.h
+++ b/kexi/kexiutils/validator.h
@@ -22,32 +22,32 @@
#include "kexiutils_export.h"
-#include <qvalidator.h>
-#include <qvariant.h>
-#include <qstring.h>
+#include <tqvalidator.h>
+#include <tqvariant.h>
+#include <tqstring.h>
#include <klocale.h>
namespace KexiUtils {
-//! @short A validator extending QValidator with offline-checking for value's validity
+//! @short A validator extending TQValidator with offline-checking for value's validity
/*!
The offline-checking for value's validity is provided by \ref Validator::check() method.
The validator groups two purposes into one container:
- string validator for line editors (online checking, "on typing");
- - offline-checking for QVariant values, reimplementing validate().
+ - offline-checking for TQVariant values, reimplementing validate().
It also offers error and warning messages for check() method.
You may need to reimplement:
- - QValidator::State IdentifierValidator::validate( QString& input, int& pos ) const;
- - Result check(const QString &valueName, QVariant v, QString &message, QString &details);
+ - TQValidator::State IdentifierValidator::validate( TQString& input, int& pos ) const;
+ - Result check(const TQString &valueName, TQVariant v, TQString &message, TQString &details);
*/
-class KEXIUTILS_EXPORT Validator : public QValidator
+class KEXIUTILS_EXPORT Validator : public TQValidator
{
public:
typedef enum Result { Error = 0, Ok = 1, Warning = 2 };
- Validator(QObject * parent = 0, const char * name = 0);
+ Validator(TQObject * tqparent = 0, const char * name = 0);
virtual ~Validator();
/*! Sets accepting empty values on (true) or off (false).
@@ -67,14 +67,14 @@ class KEXIUTILS_EXPORT Validator : public QValidator
\a valueName can be used to contruct \a message as well, for example:
"[valueName] is not a valid login name".
Depending on acceptsEmptyValue(), immediately accepts empty values or not. */
- Result check(const QString &valueName, const QVariant& v, QString &message,
- QString &details);
+ Result check(const TQString &valueName, const TQVariant& v, TQString &message,
+ TQString &details);
- /*! This implementation always returns value QValidator::Acceptable. */
- virtual QValidator::State validate ( QString & input, int & pos ) const;
+ /*! This implementation always returns value TQValidator::Acceptable. */
+ virtual TQValidator::State validate ( TQString & input, int & pos ) const;
//! A generic error/warning message
- static const QString msgColumnNotEmpty() {
+ static const TQString msgColumnNotEmpty() {
return I18N_NOOP("\"%1\" value has to be entered.");
}
@@ -83,15 +83,15 @@ class KEXIUTILS_EXPORT Validator : public QValidator
protected:
/* Used by check(), for reimplementation, by default returns \a Error.*/
- virtual Result internalCheck(const QString &valueName, const QVariant& v,
- QString &message, QString &details);
+ virtual Result internalCheck(const TQString &valueName, const TQVariant& v,
+ TQString &message, TQString &details);
bool m_acceptsEmptyValue : 1;
friend class MultiValidator;
};
-//! @short A validator groupping multiple QValidators
+//! @short A validator groupping multiple TQValidators
/*! MultiValidator behaves like normal KexiUtils::Validator,
but it allows to add define more than one different validator.
Given validation is successful if every subvalidator accepted given value.
@@ -105,10 +105,10 @@ class KEXIUTILS_EXPORT Validator : public QValidator
no validator returned error;
- Ok is returned only if exactly all subvalidators returned Ok.
- If there is no subvalidators defined, Error is always returned.
- - If a given subvalidator is not of class Validator but ust QValidator,
+ - If a given subvalidator is not of class Validator but ust TQValidator,
it's assumed it's check() method returned Ok.
- - result of calling validate() (a method implemented for QValidator)
+ - result of calling validate() (a method implemented for TQValidator)
depends on value of validate() returned by subvalidators:
- Invalid is returned if at least one subvalidator returned Invalid
- Intermediate is returned if at least one subvalidator returned Intermediate
@@ -122,35 +122,35 @@ class KEXIUTILS_EXPORT MultiValidator : public Validator
public:
/*! Constructs multivalidator with no subvalidators defined.
You can add more validators with addSubvalidator(). */
- MultiValidator(QObject * parent = 0, const char * name = 0);
+ MultiValidator(TQObject * tqparent = 0, const char * name = 0);
/*! Constructs multivalidator with one validator \a validator.
- It will be owned if has no parent defined.
+ It will be owned if has no tqparent defined.
You can add more validators with addSubvalidator(). */
- MultiValidator(QValidator *validator, QObject * parent = 0, const char * name = 0);
+ MultiValidator(TQValidator *validator, TQObject * tqparent = 0, const char * name = 0);
/*! Adds validator \a validator as another subvalidator.
Subvalidator will be owned by this multivalidator if \a owned is true
- and its parent is NULL. */
- void addSubvalidator( QValidator* validator, bool owned = true );
+ and its tqparent is NULL. */
+ void addSubvalidator( TQValidator* validator, bool owned = true );
/*! Reimplemented to call validate() on subvalidators. */
- virtual QValidator::State validate ( QString & input, int & pos ) const;
+ virtual TQValidator::State validate ( TQString & input, int & pos ) const;
- /*! Calls QValidator::fixup() on every subvalidator.
+ /*! Calls TQValidator::fixup() on every subvalidator.
This may be senseless to use this methog in certain cases
(can return weir results), so think twice before.. */
- virtual void fixup ( QString & input ) const;
+ virtual void fixup ( TQString & input ) const;
private:
virtual Validator::Result internalCheck(
- const QString &valueName, const QVariant& v,
- QString &message, QString &details);
+ const TQString &valueName, const TQVariant& v,
+ TQString &message, TQString &details);
protected:
- QPtrList<QValidator> m_ownedSubValidators;
- QValueList<QValidator*> m_subValidators;
+ TQPtrList<TQValidator> m_ownedSubValidators;
+ TQValueList<TQValidator*> m_subValidators;
};
}