Messagelib

templateparseremailaddressrequesterlineedit.cpp
1 /*
2  SPDX-FileCopyrightText: 2017-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "templateparseremailaddressrequesterlineedit.h"
8 #include <QHBoxLayout>
9 #include <QLineEdit>
10 
11 using namespace TemplateParser;
12 TemplateParserEmailAddressRequesterLineEdit::TemplateParserEmailAddressRequesterLineEdit(QWidget *parent)
14  , mLineEdit(new QLineEdit(this))
15 {
16  auto mainLayout = new QHBoxLayout(this);
17  mainLayout->setObjectName(QStringLiteral("mainlayout"));
18  mainLayout->setContentsMargins({});
19  mLineEdit->setObjectName(QStringLiteral("lineedit"));
20  mainLayout->addWidget(mLineEdit);
21  connect(mLineEdit, &QLineEdit::textChanged, this, &TemplateParserEmailAddressRequesterLineEdit::textChanged);
22 }
23 
24 TemplateParserEmailAddressRequesterLineEdit::~TemplateParserEmailAddressRequesterLineEdit()
25 {
26  disconnect(mLineEdit, &QLineEdit::textChanged, this, &TemplateParserEmailAddressRequesterLineEdit::textChanged);
27 }
28 
29 QString TemplateParserEmailAddressRequesterLineEdit::text() const
30 {
31  return mLineEdit->text();
32 }
33 
34 void TemplateParserEmailAddressRequesterLineEdit::setText(const QString &str)
35 {
36  mLineEdit->setText(str);
37 }
38 
39 void TemplateParserEmailAddressRequesterLineEdit::clear()
40 {
41  mLineEdit->clear();
42 }
void textChanged(const QString &text)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
void clear()
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Dec 4 2021 23:12:54 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.