File indexing completed on 2024-12-29 04:54:51
0001 /* 0002 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "ksieveui_private_export.h" 0010 #include <QLineEdit> 0011 class QRegularExpressionValidator; 0012 namespace KSieveUi 0013 { 0014 class KSIEVEUI_TESTS_EXPORT LineEditValidator : public QLineEdit 0015 { 0016 Q_OBJECT 0017 public: 0018 explicit LineEditValidator(QWidget *parent = nullptr); 0019 ~LineEditValidator() override; 0020 0021 [[nodiscard]] bool setRegularExpressionPattern(const QString &pattern); 0022 0023 private: 0024 void initialize(); 0025 QRegularExpressionValidator *mValidator = nullptr; 0026 }; 0027 }