Messagelib

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

KDE's Doxygen guidelines are available online.