-rw-r--r-- | pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp | 51 | ||||
-rw-r--r-- | pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.h | 8 |
2 files changed, 53 insertions, 6 deletions
diff --git a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp index 8afea76..525bdaa 100644 --- a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp +++ b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp @@ -87,7 +87,39 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n i = 0; - KPrefsWidRadios * compr = addWidRadios(i18n("Compression:") ,&(prefs->mCompression), filePage); - compr->addRadio(i18n("none")); - compr->addRadio(i18n("gzip")); - compr->addRadio(i18n("bzip2")); - fileLayout->addMultiCellWidget( (QWidget*)compr->groupBox(),i,i,0,1); + QLabel* kcfg_compression_label = new QLabel(i18n("Compression:"), filePage); + fileLayout->addWidget(kcfg_compression_label,i,0); + kcfg_compression = new QComboBox(filePage, "kcfg_compression"); + kcfg_compression->insertItem(i18n("None")); + kcfg_compression->insertItem(i18n("gzip")); + //US not yet supported: kcfg_compression->insertItem(i18n("bzip2")); + fileLayout->addWidget( kcfg_compression,i,1); + ++i; + + QLabel* kcfg_crypt_label = new QLabel(i18n("Encryption:"), filePage); + fileLayout->addWidget(kcfg_crypt_label,i,0); + kcfg_cryptAlgo = new QComboBox(filePage, "kcfg_cryptAlgo"); + kcfg_cryptAlgo->insertItem(i18n("Blowfish (128 bit)")); +#ifdef CONFIG_PWMANAGER_GCRY + kcfg_cryptAlgo->insertItem(i18n("AES-128, Rijndael (128 bit)")); + kcfg_cryptAlgo->insertItem(i18n("AES-192, Rijndael (192 bit)")); + kcfg_cryptAlgo->insertItem(i18n("AES-256, Rijndael (256 bit)")); + kcfg_cryptAlgo->insertItem(i18n("Triple-DES (168 bit)")); + kcfg_cryptAlgo->insertItem(i18n("Twofish (256 bit)")); + kcfg_cryptAlgo->insertItem(i18n("Twofish-128 (128 bit)")); +#endif // CONFIG_PWMANAGER_GCRY + fileLayout->addWidget( kcfg_cryptAlgo,i,1); + ++i; + + QLabel* kcfg_hash_label = new QLabel(i18n("Hashing:"), filePage); + fileLayout->addWidget(kcfg_hash_label,i,0); + kcfg_hashAlgo = new QComboBox(filePage, "kcfg_hashAlgo"); + kcfg_hashAlgo->insertItem(i18n("SHA-160, SHA1 (160 bit)")); +#ifdef CONFIG_PWMANAGER_GCRY + kcfg_hashAlgo->insertItem(i18n("SHA-256 (256 bit)")); + kcfg_hashAlgo->insertItem(i18n("SHA-384 (384 bit)")); + kcfg_hashAlgo->insertItem(i18n("SHA-512 (512 bit)")); + kcfg_hashAlgo->insertItem(i18n("MD5 (128 bit)")); + kcfg_hashAlgo->insertItem(i18n("RIPE-MD-160 (160 bit)")); + kcfg_hashAlgo->insertItem(i18n("Tiger (192 bit)")); +#endif // CONFIG_PWMANAGER_GCRY + fileLayout->addWidget( kcfg_hashAlgo,i,1); ++i; @@ -229,2 +261,3 @@ void PWMConfigWidget::usrReadConfig() + setFilePermissions(prefs->mFilePermissions); @@ -237,2 +270,5 @@ void PWMConfigWidget::usrReadConfig() + kcfg_compression->setCurrentItem(prefs->mCompression); + kcfg_cryptAlgo->setCurrentItem(prefs->mCryptAlgo); + kcfg_hashAlgo->setCurrentItem(prefs->mHashAlgo); } @@ -251,2 +287,7 @@ void PWMConfigWidget::usrWriteConfig() prefs->mXTermCommand = xtermLineEdit->text(); + + prefs->mCompression = kcfg_compression->currentItem(); + prefs->mCryptAlgo = kcfg_cryptAlgo->currentItem(); + prefs->mHashAlgo = kcfg_hashAlgo->currentItem(); + } diff --git a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.h b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.h index 1c7f5bf..0fad6af 100644 --- a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.h +++ b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.h @@ -32,2 +32,4 @@ class PWMPrefs; class KURLRequester; +class QComboBox; + @@ -53,3 +55,7 @@ class PWMConfigWidget : public KPrefsWidget QLineEdit* xtermLineEdit; - + QComboBox* kcfg_compression; + QComboBox* kcfg_cryptAlgo; + QComboBox* kcfg_hashAlgo; + + private: |