libyui-qt
 
Loading...
Searching...
No Matches
QY2CharValidator.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: QY2CharValidator.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23 This is a pure Qt object - it can be used independently of YaST2.
24
25/-*/
26
27
28#ifndef QY2CharValidator_h
29#define QY2CharValidator_h
30
31#include <qvalidator.h>
32
33
34class QY2CharValidator : public QValidator
35{
36 Q_OBJECT
37
38public:
39
46 QY2CharValidator( const QString & initialValidChars,
47 QObject * parent = 0,
48 const char * name = 0 );
49
54
60 virtual State validate( QString & input, int & pos ) const;
61
66 void setValidChars( const QString & newValidChars )
67 { _validChars = newValidChars; }
68
72 QString validChars() const { return _validChars; }
73
74protected:
75
76 QString _validChars;
77};
78
79#endif // QY2CharValidator_h
QString validChars() const
Definition QY2CharValidator.h:72
virtual State validate(QString &input, int &pos) const
Definition QY2CharValidator.cc:51
QY2CharValidator(const QString &initialValidChars, QObject *parent=0, const char *name=0)
Definition QY2CharValidator.cc:34
void setValidChars(const QString &newValidChars)
Definition QY2CharValidator.h:66
~QY2CharValidator()
Definition QY2CharValidator.cc:44