1 /*
2    SPDX-FileCopyrightText: 2014-2021 Laurent Montel <montel@kde.org>
3 
4    SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "kmail_private_export.h"
10 #include <QWidget>
11 class QLabel;
12 
13 class KMAILTESTS_TESTS_EXPORT CryptoStateIndicatorWidget : public QWidget
14 {
15     Q_OBJECT
16 public:
17     explicit CryptoStateIndicatorWidget(QWidget *parent = nullptr);
18     ~CryptoStateIndicatorWidget() override;
19 
20     void updateSignatureAndEncrypionStateIndicators(bool isSign, bool isEncrypted);
21 
22     void setShowAlwaysIndicator(bool status);
23 
24 private:
25     void updateShowAlwaysIndicator();
26     QLabel *const mSignatureStateIndicator;
27     QLabel *const mEncryptionStateIndicator;
28     bool mShowAlwaysIndicator = true;
29     bool mIsSign = false;
30     bool mIsEncrypted = false;
31 };
32 
33