Messagelib

templateparseremailaddressrequesterlineedit.cpp
1/*
2 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "templateparseremailaddressrequesterlineedit.h"
8#include <QHBoxLayout>
9#include <QLineEdit>
10
11using namespace TemplateParser;
12TemplateParserEmailAddressRequesterLineEdit::TemplateParserEmailAddressRequesterLineEdit(QWidget *parent)
13 : TemplateParser::TemplateParserEmailAddressRequesterBase(parent)
14 , mLineEdit(new QLineEdit(this))
15{
16 auto mainLayout = new QHBoxLayout(this);
17 mainLayout->setObjectName(QLatin1StringView("mainlayout"));
18 mainLayout->setContentsMargins({});
19 mLineEdit->setObjectName(QLatin1StringView("lineedit"));
20 mainLayout->addWidget(mLineEdit);
21 connect(mLineEdit, &QLineEdit::textChanged, this, &TemplateParserEmailAddressRequesterLineEdit::textChanged);
22}
23
24TemplateParserEmailAddressRequesterLineEdit::~TemplateParserEmailAddressRequesterLineEdit()
25{
26 disconnect(mLineEdit, &QLineEdit::textChanged, this, &TemplateParserEmailAddressRequesterLineEdit::textChanged);
27}
28
29QString TemplateParserEmailAddressRequesterLineEdit::text() const
30{
31 return mLineEdit->text();
32}
33
34void TemplateParserEmailAddressRequesterLineEdit::setText(const QString &str)
35{
36 mLineEdit->setText(str);
37}
38
39void TemplateParserEmailAddressRequesterLineEdit::clear()
40{
41 mLineEdit->clear();
42}
43
44#include "moc_templateparseremailaddressrequesterlineedit.cpp"
void clear()
void textChanged(const QString &text)
bool disconnect(const QMetaObject::Connection &connection)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.