Libksieve

sievepurposemenuwidget.cpp
1/*
2 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6#include "sievepurposemenuwidget.h"
7
8#include <KSieveUi/SieveEditorWidget>
9
10using namespace KSieveUi;
11SievePurposeMenuWidget::SievePurposeMenuWidget(QWidget *parentWidget, QObject *parent)
12 : PimCommon::PurposeMenuWidget(parentWidget, parent)
13{
14}
15
16SievePurposeMenuWidget::~SievePurposeMenuWidget() = default;
17
18QByteArray SievePurposeMenuWidget::text()
19{
20 if (mSieveEditorWidget) {
21 return mSieveEditorWidget->script().toUtf8();
22 }
23 return {};
24}
25
26void SievePurposeMenuWidget::setEditorWidget(SieveEditorWidget *editor)
27{
28 mSieveEditorWidget = editor;
29}
30
31#include "moc_sievepurposemenuwidget.cpp"
The SieveEditorWidget class.
QByteArray toUtf8() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.