| 1 | /* |
| 2 | This file is part of the KDE project |
| 3 | SPDX-FileCopyrightText: 2007 Andreas Hartmetz <ahartmetz@gmail.com> |
| 4 | |
| 5 | SPDX-License-Identifier: LGPL-2.0-or-later |
| 6 | */ |
| 7 | |
| 8 | #ifndef KSSLCERTIFICATEBOX_H |
| 9 | #define KSSLCERTIFICATEBOX_H |
| 10 | |
| 11 | #include "kiowidgets_export.h" |
| 12 | |
| 13 | #include <QWidget> |
| 14 | |
| 15 | #include <memory> |
| 16 | |
| 17 | class QSslCertificate; |
| 18 | |
| 19 | class KSslCertificateBoxPrivate; |
| 20 | |
| 21 | /*! |
| 22 | * \class KSslCertificateBox |
| 23 | * \inmodule KIOWidgets |
| 24 | */ |
| 25 | class KIOWIDGETS_EXPORT KSslCertificateBox : public QWidget |
| 26 | { |
| 27 | Q_OBJECT |
| 28 | public: |
| 29 | /*! |
| 30 | * \value Subject |
| 31 | * \value Issuer |
| 32 | */ |
| 33 | enum CertificateParty { |
| 34 | Subject = 0, |
| 35 | Issuer, |
| 36 | }; |
| 37 | |
| 38 | explicit KSslCertificateBox(QWidget *parent = nullptr); |
| 39 | ~KSslCertificateBox() override; |
| 40 | |
| 41 | /*! |
| 42 | * |
| 43 | */ |
| 44 | void setCertificate(const QSslCertificate &cert, CertificateParty party); |
| 45 | |
| 46 | /*! |
| 47 | * |
| 48 | */ |
| 49 | void clear(); |
| 50 | |
| 51 | std::unique_ptr<KSslCertificateBoxPrivate> const d; |
| 52 | }; |
| 53 | |
| 54 | #endif // KSSLCERTIFICATEBOX_H |
| 55 | |