File indexing completed on 2024-12-22 05:05:21
0001 // SPDX-FileCopyrightText: 2023 g10 Code GmbH 0002 // SPDX-FileContributor: Carl Schwan <carl.schwan@gnupg.com> 0003 // SPDX-License-Identifier: LGPL-2.0-or-later 0004 0005 #pragma once 0006 0007 #include "mimetreeparser_widgets_export.h" 0008 0009 #include <MimeTreeParserCore/PartModel> 0010 #include <QFrame> 0011 0012 class SignatureInfo; 0013 class QPaintEvent; 0014 class UrlHandler; 0015 0016 /// \internal 0017 class MIMETREEPARSER_WIDGETS_EXPORT MessageWidgetContainer : public QFrame 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 explicit MessageWidgetContainer(bool isSigned, 0023 const SignatureInfo &signatureInfo, 0024 PartModel::SecurityLevel signatureSecurityLevel, 0025 bool displaySignatureInfo, 0026 bool isEncrypted, 0027 const SignatureInfo &encryptionInfo, 0028 PartModel::SecurityLevel encryptionSecurityLevel, 0029 bool displayEncryptionInfo, 0030 UrlHandler *urlHandler, 0031 QWidget *parent = nullptr); 0032 ~MessageWidgetContainer() override; 0033 0034 protected: 0035 void paintEvent(QPaintEvent *event) override; 0036 bool event(QEvent *event) override; 0037 0038 private: 0039 void createLayout(); 0040 0041 bool m_isSigned; 0042 SignatureInfo const m_signatureInfo; 0043 PartModel::SecurityLevel m_signatureSecurityLevel; 0044 bool m_displaySignatureInfo; 0045 0046 bool m_isEncrypted; 0047 SignatureInfo const m_encryptionInfo; 0048 PartModel::SecurityLevel m_encryptionSecurityLevel; 0049 bool m_displayEncryptionInfo; 0050 0051 UrlHandler *const m_urlHandler; 0052 };