File indexing completed on 2024-10-13 08:12:43

0001 /*
0002     SPDX-FileCopyrightText: 2002 Jean-Baptiste Mardelle <bj@altern.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #include "conf_encryption.h"
0007 
0008 Encryption::Encryption( QWidget* parent )
0009     : QWidget( parent ), Ui_Encryption()
0010 {
0011     setupUi( this );
0012     connect(kcfg_EncryptFilesTo, &QCheckBox::toggled, this, &Encryption::encrypt_files_to_toggled);
0013     connect(kcfg_AllowCustomEncryptionOptions, &QCheckBox::toggled, this, &Encryption::allow_custom_option_toggled);
0014     connect(encrypt_to_always, &QCheckBox::toggled, this, &Encryption::encrypt_to_always_toggled);
0015 }
0016 
0017 void Encryption::encrypt_to_always_toggled(bool isOn)
0018 {
0019     always_key->setEnabled(isOn);
0020 }
0021 
0022 
0023 void Encryption::encrypt_files_to_toggled(bool isOn)
0024 {
0025     file_key->setEnabled(isOn);
0026 }
0027 
0028 
0029 void Encryption::allow_custom_option_toggled(bool isOn)
0030 {
0031     kcfg_CustomEncryptionOptions->setEnabled(isOn);
0032 }