Libksieve

addresslineedit.h
1 /*
2  SPDX-FileCopyrightText: 2013-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 #pragma once
7 
8 #include "ksieveui_private_export.h"
9 #include <KSieveUi/AbstractSelectEmailLineEdit>
10 #include <QLineEdit>
11 namespace KSieveUi
12 {
13 class KSIEVEUI_TESTS_EXPORT AddressLineEdit : public AbstractSelectEmailLineEdit
14 {
15  Q_OBJECT
16 public:
17  explicit AddressLineEdit(QWidget *parent = nullptr);
18  ~AddressLineEdit() override;
19 
20  void setText(const QString &str) override;
21  Q_REQUIRED_RESULT QString text() const override;
22  Q_REQUIRED_RESULT bool isValid() const override;
23 
24 protected:
25  void focusOutEvent(QFocusEvent *ev) override;
26 
27 private:
28  void slotTextChanged();
29  void verifyAddress();
30  QLineEdit *mLineEdit = nullptr;
31  QString mNegativeBackground;
32  bool mEmailIsInvalid = true;
33 };
34 }
35 
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 16 2021 23:09:33 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.