Messagelib

viewerpurposemenuwidget.cpp
1 /*
2  SPDX-FileCopyrightText: 2020-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 #include "viewerpurposemenuwidget.h"
7 
8 #include <MessageViewer/MailWebEngineView>
9 
10 using namespace MessageViewer;
11 
12 MailfilterPurposeMenuWidget::MailfilterPurposeMenuWidget(QWidget *parentWidget, QObject *parent)
13  : PimCommon::PurposeMenuWidget(parentWidget, parent)
14 {
15 }
16 
17 MailfilterPurposeMenuWidget::~MailfilterPurposeMenuWidget() = default;
18 
19 QByteArray MailfilterPurposeMenuWidget::text()
20 {
21  if (mViewer) {
22  return mViewer->selectedText().toUtf8();
23  }
24  return {};
25 }
26 
27 void MailfilterPurposeMenuWidget::setViewer(MailWebEngineView *viewer)
28 {
29  mViewer = viewer;
30 }
The MailWebEngineView class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Dec 2 2021 23:06:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.