File indexing completed on 2025-01-26 04:47:03
0001 /* 0002 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "akregatorpart_export.h" 0010 #include "frame.h" 0011 0012 class KActionCollection; 0013 0014 namespace Akregator 0015 { 0016 class ArticleViewerWebEngineWidgetNg; 0017 class AKREGATOR_EXPORT WebEngineFrame : public Frame 0018 { 0019 Q_OBJECT 0020 public: 0021 explicit WebEngineFrame(KActionCollection *ac, QWidget *parent = nullptr); 0022 ~WebEngineFrame() override; 0023 0024 [[nodiscard]] QUrl url() const override; 0025 [[nodiscard]] bool openUrl(const OpenUrlRequest &request) override; 0026 void loadConfig(const KConfigGroup &, const QString &) override; 0027 [[nodiscard]] bool saveConfig(KConfigGroup &, const QString &) override; 0028 0029 [[nodiscard]] qreal zoomFactor() const override; 0030 0031 public Q_SLOTS: 0032 void slotReload() override; 0033 void slotStop() override; 0034 0035 void slotZoomChangeInFrame(int frameId, qreal value); 0036 void slotCopyInFrame(int frameId); 0037 void slotPrintInFrame(int frameId); 0038 void slotPrintPreviewInFrame(int frameId); 0039 void slotFindTextInFrame(int frameId); 0040 void slotTextToSpeechInFrame(int frameId); 0041 void slotSaveLinkAsInFrame(int frameId); 0042 void slotCopyLinkAsInFrame(int frameId); 0043 void slotSaveImageOnDiskInFrame(int frameId); 0044 void slotCopyImageLocationInFrame(int frameId); 0045 void slotMute(int frameId, bool mute); 0046 0047 Q_SIGNALS: 0048 void signalIconChanged(Akregator::Frame *, const QIcon &icon); 0049 void webPageMutedOrAudibleChanged(Akregator::Frame *, bool isAudioMuted, bool wasRecentlyAudible); 0050 0051 private Q_SLOTS: 0052 void slotTitleChanged(const QString &title); 0053 void slotProgressChanged(int progress); 0054 void slotLoadStarted(); 0055 void slotLoadFinished(); 0056 void slotWebPageMutedOrAudibleChanged(bool isAudioMuted, bool wasRecentlyAudible); 0057 0058 private: 0059 void loadUrl(const QUrl &url); 0060 Akregator::ArticleViewerWebEngineWidgetNg *mArticleViewerWidgetNg = nullptr; 0061 }; 0062 }