Libksieve

moveimapfolderwidget.cpp
1/*
2 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "moveimapfolderwidget.h"
8#include <KLineEditEventHandler>
9#include <KLocalizedString>
10#include <QHBoxLayout>
11#include <QLineEdit>
12using namespace KSieveUi;
13
14MoveImapFolderWidget::MoveImapFolderWidget(QWidget *parent)
15 : KSieveUi::AbstractMoveImapFolderWidget(parent)
16 , mLineEdit(new QLineEdit(this))
17{
18 auto mainLayout = new QHBoxLayout(this);
19 mainLayout->setObjectName(QLatin1StringView("mainlayout"));
20 mainLayout->setContentsMargins({});
22 mLineEdit->setObjectName(QLatin1StringView("lineedit"));
23 mLineEdit->setClearButtonEnabled(true);
24 mLineEdit->setPlaceholderText(i18nc("@info:placeholder", "Define Folder"));
25 mainLayout->addWidget(mLineEdit);
26 connect(mLineEdit, &QLineEdit::textChanged, this, &MoveImapFolderWidget::textChanged);
27}
28
29MoveImapFolderWidget::~MoveImapFolderWidget() = default;
30
31void MoveImapFolderWidget::setText(const QString &str)
32{
33 mLineEdit->setText(str);
34}
35
36QString MoveImapFolderWidget::text() const
37{
38 return mLineEdit->text();
39}
40
41void MoveImapFolderWidget::setSieveImapAccountSettings(const KSieveCore::SieveImapAccountSettings &account)
42{
43 Q_UNUSED(account)
44}
45
46#include "moc_moveimapfolderwidget.cpp"
The SieveImapAccountSettings class.
The AbstractMoveImapFolderWidget class.
QString i18nc(const char *context, const char *text, const TYPE &arg...)
void catchReturnKey(QObject *lineEdit)
void setText(const QString &)
void textChanged(const QString &text)
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:14:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.