00001 /*************************************************************************** 00002 latin1validator.h - description 00003 ------------------- 00004 begin : Fri Dec 01 2005 00005 copyright : (C) 2005-2006 by Ben Swerts 00006 email : bswerts@users.sourceforge.net 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00020 00021 #ifndef LATIN1VALIDATOR_H 00022 #define LATIN1VALIDATOR_H 00023 00025 00026 // Base class header file 00027 #include <qvalidator.h> 00028 00030 00031 class Latin1Validator: public QValidator 00032 { 00033 public: 00034 Latin1Validator(QObject* parent, const char* name = 0); // Constructor 00035 ~Latin1Validator(); // Destructor 00036 00037 void fixup(QString& input) const; // fixes the string by removeing unwanted characters 00038 State validate(QString& input, int& pos) const; // checks for the presence of non-latin1 characters 00039 }; 00040 00041 #endif 00042