File indexing completed on 2024-12-22 04:56:52

0001 /*
0002     SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003     SPDX-License-Identifier: LGPL-2.0-or-later
0004 */
0005 
0006 #pragma once
0007 
0008 #include <TextCustomEditor/RichTextBrowser>
0009 
0010 class NewMailNotificationHistoryBrowserText : public TextCustomEditor::RichTextBrowser
0011 {
0012     Q_OBJECT
0013 public:
0014     explicit NewMailNotificationHistoryBrowserText(QWidget *parent = nullptr);
0015     ~NewMailNotificationHistoryBrowserText() override;
0016 
0017 protected:
0018     void doSetSource(const QUrl &url, QTextDocument::ResourceType type = QTextDocument::UnknownResource) override;
0019 
0020 Q_SIGNALS:
0021     void clearHistory();
0022     void openMail(const QString &mailIdentifier);
0023     void openFolder(const QString &folderIdentifier);
0024 
0025 protected:
0026     void addExtraMenuEntry(QMenu *menu, QPoint pos) override;
0027 
0028 private:
0029     void slotOpenMail(const QString &identifier);
0030     void slotSelectFolder(const QString &identifier);
0031 };