File indexing completed on 2024-05-12 05:12:50
0001 /* 0002 This file is part of Akregator. 0003 0004 SPDX-FileCopyrightText: 2005 Frank Osterfeld <osterfeld@kde.org> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0 0007 */ 0008 0009 #pragma once 0010 0011 #include "actionmanager.h" 0012 #include <PimCommon/ShareServiceUrlManager> 0013 0014 #include <memory> 0015 0016 class QAction; 0017 class KActionCollection; 0018 0019 class QWidget; 0020 0021 namespace WebEngineViewer 0022 { 0023 class ZoomActionMenu; 0024 } 0025 0026 namespace Akregator 0027 { 0028 class ArticleListView; 0029 class MainWidget; 0030 class Part; 0031 class SubscriptionListView; 0032 class TabWidget; 0033 class TreeNode; 0034 class TrayIcon; 0035 0036 /** 0037 * Akregator-specific implementation of the ActionManager interface 0038 */ 0039 class ActionManagerImpl : public ActionManager 0040 { 0041 Q_OBJECT 0042 0043 public: 0044 explicit ActionManagerImpl(Part *part, QObject *parent = nullptr); 0045 ~ActionManagerImpl() override; 0046 0047 QAction *action(const QString &name) override; 0048 QWidget *container(const QString &name) override; 0049 0050 void initMainWidget(MainWidget *mainWidget); 0051 void initArticleListView(ArticleListView *articleList); 0052 void initSubscriptionListView(SubscriptionListView *subscriptionListView); 0053 void initTabWidget(TabWidget *tabWidget); 0054 0055 void setArticleActionsEnabled(bool enabled) override; 0056 void setTrayIcon(TrayIcon *trayIcon); 0057 KActionCollection *actionCollection() const; 0058 WebEngineViewer::ZoomActionMenu *zoomActionMenu() const override; 0059 [[nodiscard]] QString quickSearchLineText() const; 0060 0061 public Q_SLOTS: 0062 0063 void slotNodeSelected(Akregator::TreeNode *node); 0064 void slotSettingsChanged(); 0065 0066 private Q_SLOTS: 0067 void slotServiceUrlSelected(PimCommon::ShareServiceUrlManager::ServiceType type); 0068 0069 private: 0070 void initPart(); 0071 0072 friend class NodeSelectVisitor; 0073 class NodeSelectVisitor; 0074 0075 class ActionManagerImplPrivate; 0076 std::unique_ptr<ActionManagerImplPrivate> const d; 0077 }; 0078 } // namespace Akregator