Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

QY2CharValidator.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                          contributed Qt objects                      |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       QY2CharValidator.h
00014 
00015   Author:     Stefan Hundhammer <sh@suse.de>
00016 
00017   This is a pure Qt object - it can be used independently of YaST2.
00018 
00019 /-*/
00020 
00021 // -*- c++ -*-
00022 
00023 
00024 #ifndef QY2CharValidator_h
00025 #define QY2CharValidator_h
00026 
00027 #include <qvalidator.h>
00028 
00029 
00030 class QY2CharValidator : public QValidator
00031 {
00032     Q_OBJECT
00033 
00034 public:
00035 
00042     QY2CharValidator( const QString &   initialValidChars,
00043                       QObject *         parent  = 0,
00044                       const char *      name    = 0 );
00045 
00049     ~QY2CharValidator();
00050 
00056     virtual State validate( QString & input, int & pos ) const;
00057 
00062     void setValidChars( const QString & newValidChars )
00063         { _validChars = newValidChars; }
00064 
00068     QString validChars() const { return _validChars; }
00069 
00070 protected:
00071 
00072     QString _validChars;
00073 };
00074 
00075 #endif // QY2CharValidator_h

Generated on Wed Nov 12 06:11:15 2008 for yast2-qt by  doxygen 1.3.9.1