File indexing completed on 2024-04-28 03:53:09
0001 /* 0002 SPDX-FileCopyrightText: 2010 Casey Link <unnamedrambler@gmail.com> 0003 SPDX-FileCopyrightText: 2009-2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net> 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KEMAILVALIDATOR_H 0008 #define KEMAILVALIDATOR_H 0009 0010 #include "kcompletion_export.h" 0011 0012 #include <QValidator> 0013 0014 /** 0015 An input validator that checks for valid email addresses. 0016 @see KEmailAddress::isValidSimpleAddress 0017 @since 6.0 0018 */ 0019 class KCOMPLETION_EXPORT KEmailValidator : public QValidator 0020 { 0021 Q_OBJECT 0022 public: 0023 explicit KEmailValidator(QObject *parent = nullptr); 0024 ~KEmailValidator(); 0025 0026 State validate(QString &str, int &pos) const override; 0027 void fixup(QString &str) const override; 0028 }; 0029 0030 #endif