File indexing completed on 2025-01-05 04:49:29
0001 /* 0002 SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #include "sharetextpurposemenuwidget.h" 0007 #include "sharetextplugineditorinterface.h" 0008 #include <TextCustomEditor/RichTextEditor> 0009 SharetextPurposeMenuWidget::SharetextPurposeMenuWidget(QWidget *parentWidget, QObject *parent) 0010 : PimCommon::PurposeMenuWidget(parentWidget, parent) 0011 { 0012 } 0013 0014 SharetextPurposeMenuWidget::~SharetextPurposeMenuWidget() = default; 0015 0016 QByteArray SharetextPurposeMenuWidget::text() 0017 { 0018 if (mInterface) { 0019 return mInterface->richTextEditor()->toPlainText().toUtf8(); 0020 } 0021 return {}; 0022 } 0023 0024 void SharetextPurposeMenuWidget::setEditorWidget(ShareTextPluginEditorInterface *interface) 0025 { 0026 mInterface = interface; 0027 } 0028 0029 #include "moc_sharetextpurposemenuwidget.cpp"