File indexing completed on 2024-12-29 04:54:48

0001 /*
0002    SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #include "sievepurposemenuwidget.h"
0007 
0008 #include <KSieveUi/SieveEditorWidget>
0009 
0010 using namespace KSieveUi;
0011 SievePurposeMenuWidget::SievePurposeMenuWidget(QWidget *parentWidget, QObject *parent)
0012     : PimCommon::PurposeMenuWidget(parentWidget, parent)
0013 {
0014 }
0015 
0016 SievePurposeMenuWidget::~SievePurposeMenuWidget() = default;
0017 
0018 QByteArray SievePurposeMenuWidget::text()
0019 {
0020     if (mSieveEditorWidget) {
0021         return mSieveEditorWidget->script().toUtf8();
0022     }
0023     return {};
0024 }
0025 
0026 void SievePurposeMenuWidget::setEditorWidget(SieveEditorWidget *editor)
0027 {
0028     mSieveEditorWidget = editor;
0029 }
0030 
0031 #include "moc_sievepurposemenuwidget.cpp"