File indexing completed on 2024-06-16 04:46:58
0001 /* 0002 SPDX-FileCopyrightText: 2013-2015 Christian Dávid <christian-david@web.de> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef IBANVALIDATOR_H 0007 #define IBANVALIDATOR_H 0008 0009 #include "kmm_base_widgets_export.h" 0010 0011 #include <QValidator> 0012 0013 #include "kmymoneyvalidationfeedback.h" 0014 0015 namespace eWidgets { 0016 namespace ValidationFeedback { 0017 enum class MessageType; 0018 } 0019 } 0020 0021 class KMM_BASE_WIDGETS_EXPORT ibanValidator : public QValidator 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 explicit ibanValidator(QObject* parent = 0); 0027 State validate(QString&, int&) const final override; 0028 State validate(const QString&) const; 0029 void fixup(QString&) const final override; 0030 0031 static QPair<eWidgets::ValidationFeedback::MessageType, QString> validateWithMessage(const QString&); 0032 }; 0033 0034 #endif // IBANVALIDATOR_H