File indexing completed on 2025-01-19 04:46:50

0001 /*
0002   SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <MessageViewer/BodyPartURLHandler>
0010 class QUrlQuery;
0011 
0012 class ApplicationPgpKeyUrlHandler : public MessageViewer::Interface::BodyPartURLHandler
0013 {
0014 public:
0015     ApplicationPgpKeyUrlHandler() = default;
0016     QString name() const override;
0017     bool handleClick(MessageViewer::Viewer *viewerInstance, MimeTreeParser::Interface::BodyPart *part, const QString &path) const override;
0018     bool handleContextMenuRequest(MimeTreeParser::Interface::BodyPart *part, const QString &path, const QPoint &p) const override;
0019     QString statusBarMessage(MimeTreeParser::Interface::BodyPart *part, const QString &path) const override;
0020 
0021 private:
0022     [[nodiscard]] QUrlQuery decodePath(const QString &path) const;
0023 };