File indexing completed on 2025-03-09 04:54:37

0001 /*
0002    SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "messageviewer_export.h"
0010 #include <QMenu>
0011 namespace MessageViewer
0012 {
0013 /**
0014  * @brief The RemoteContentMenu class
0015  * @author Laurent Montel <montel@kde.org>
0016  */
0017 class MESSAGEVIEWER_EXPORT RemoteContentMenu : public QMenu
0018 {
0019     Q_OBJECT
0020 public:
0021     explicit RemoteContentMenu(QWidget *parent = nullptr);
0022     ~RemoteContentMenu() override;
0023 
0024     void updateMenu();
0025 
0026     [[nodiscard]] QStringList urls() const;
0027     void setUrls(const QStringList &urls);
0028 
0029     void clearUrls();
0030     void appendUrl(const QString &url);
0031 
0032 Q_SIGNALS:
0033     void updateEmail();
0034 
0035 private:
0036     MESSAGEVIEWER_NO_EXPORT void authorize(const QString &url);
0037     MESSAGEVIEWER_NO_EXPORT void slotConfigure();
0038     QStringList mUrls;
0039     QAction *const mConfigureRemoteContentAction;
0040     QList<QAction *> mListAction;
0041 };
0042 }