certmanager/lib
cryptoconfigdialog.cpp00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include "cryptoconfigdialog.h"
00033 #include "cryptoconfigmodule.h"
00034 #include <klocale.h>
00035 #include <kaccelmanager.h>
00036
00037 Kleo::CryptoConfigDialog::CryptoConfigDialog( Kleo::CryptoConfig* config, QWidget *parent, const char* name )
00038 : KDialogBase( Swallow,
00039
00040 WStyle_Customize | WStyle_DialogBorder | WStyle_Maximize | WStyle_Title | WStyle_SysMenu,
00041 parent, name, true ,
00042 i18n( "Configure" ), Default|Cancel|Apply|Ok|User1,
00043 Ok, true , KGuiItem( i18n( "&Reset" ), "undo" ) )
00044 {
00045 mMainWidget = new CryptoConfigModule( config, this );
00046 setMainWidget( mMainWidget );
00047 connect( mMainWidget, SIGNAL( changed() ), SLOT( slotChanged() ) );
00048 enableButton( Apply, false );
00049
00050
00051 KAcceleratorManager::manage( this );
00052 }
00053
00054 void Kleo::CryptoConfigDialog::slotOk()
00055 {
00056 slotApply();
00057 accept();
00058 }
00059
00060 void Kleo::CryptoConfigDialog::slotCancel()
00061 {
00062 mMainWidget->cancel();
00063 reject();
00064 }
00065
00066 void Kleo::CryptoConfigDialog::slotDefault()
00067 {
00068 mMainWidget->defaults();
00069 slotChanged();
00070 }
00071
00072 void Kleo::CryptoConfigDialog::slotApply()
00073 {
00074 mMainWidget->save();
00075 enableButton( Apply, false );
00076 }
00077
00078 void Kleo::CryptoConfigDialog::slotUser1()
00079 {
00080 mMainWidget->reset();
00081 enableButton( Apply, false );
00082 }
00083
00084 void Kleo::CryptoConfigDialog::slotChanged()
00085 {
00086 enableButton( Apply, true );
00087 }
00088
00089 #include "cryptoconfigdialog.moc"
|