File indexing completed on 2024-10-27 04:50:59
0001 /* 0002 SPDX-FileCopyrightText: 2014-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "kmail_private_export.h" 0010 #include <QWidget> 0011 class QLabel; 0012 0013 class KMAILTESTS_TESTS_EXPORT CryptoStateIndicatorWidget : public QWidget 0014 { 0015 Q_OBJECT 0016 public: 0017 explicit CryptoStateIndicatorWidget(QWidget *parent = nullptr); 0018 ~CryptoStateIndicatorWidget() override; 0019 0020 void updateSignatureAndEncrypionStateIndicators(bool isSign, bool isEncrypted); 0021 0022 void setShowAlwaysIndicator(bool status); 0023 0024 private: 0025 void updateShowAlwaysIndicator(); 0026 QLabel *const mSignatureStateIndicator; 0027 QLabel *const mEncryptionStateIndicator; 0028 bool mShowAlwaysIndicator = true; 0029 bool mIsSign = false; 0030 bool mIsEncrypted = false; 0031 };