• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

libkleo

  • sources
  • kde-4.12
  • kdepim
  • libkleo
  • ui
cryptoconfigdialog.cpp
Go to the documentation of this file.
1 /*
2  cryptoconfigdialog.h
3 
4  This file is part of kgpgcertmanager
5  Copyright (c) 2004 Klarälvdalens Datakonsult AB
6 
7  Libkleopatra is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License,
9  version 2, as published by the Free Software Foundation.
10 
11  Libkleopatra is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 
20  In addition, as a special exception, the copyright holders give
21  permission to link the code of this program with any edition of
22  the Qt library by Trolltech AS, Norway (or with modified versions
23  of Qt that use the same license as Qt), and distribute linked
24  combinations including the two. You must obey the GNU General
25  Public License in all respects for all of the code used other than
26  Qt. If you modify this file, you may extend this exception to
27  your version of the file, but you are not obligated to do so. If
28  you do not wish to do so, delete this exception statement from
29  your version.
30 */
31 
32 #include "cryptoconfigdialog.h"
33 #include "cryptoconfigmodule.h"
34 #include <klocale.h>
35 #include <kacceleratormanager.h>
36 
37 Kleo::CryptoConfigDialog::CryptoConfigDialog( Kleo::CryptoConfig* config, QWidget *parent )
38  : KDialog( parent)
39 {
40  setCaption( i18n( "Configure GnuPG Backend" ) );
41  setButtons( Default|Cancel|Apply|Ok|User1 );
42  setDefaultButton( Ok );
43  setModal( true );
44  setButtonGuiItem( User1, KGuiItem( i18n( "&Reset" ), QLatin1String("edit-undo") ) );
45 //add style : Qt::WStyle_Customize | Qt::WStyle_DialogBorder | Qt::WStyle_Maximize | Qt::WStyle_Title | Qt::WStyle_SysMenu
46 
47  mMainWidget = new CryptoConfigModule( config, this );
48  setMainWidget( mMainWidget );
49  connect( mMainWidget, SIGNAL(changed()), SLOT(slotChanged()) );
50  enableButton( Apply, false );
51  if ( mMainWidget->hasError() ) {
52  showButton( Default, false );
53  showButton( User1, false );
54  showButton( Apply, false );
55  showButton( Ok, false );
56  }
57 
58  // Automatically assign accelerators
59  KAcceleratorManager::manage( this );
60  connect(this,SIGNAL(user1Clicked()),this,SLOT(slotUser1()));
61  connect(this,SIGNAL(cancelClicked()),this,SLOT(slotCancel()));
62  connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
63  connect(this,SIGNAL(defaultClicked()),this,SLOT(slotDefault()));
64  connect(this,SIGNAL(applyClicked()),this,SLOT(slotApply()));
65 }
66 
67 void Kleo::CryptoConfigDialog::slotOk()
68 {
69  slotApply();
70  accept();
71 }
72 
73 void Kleo::CryptoConfigDialog::slotCancel()
74 {
75  mMainWidget->cancel();
76  reject();
77 }
78 
79 void Kleo::CryptoConfigDialog::slotDefault()
80 {
81  mMainWidget->defaults();
82  slotChanged();
83 }
84 
85 void Kleo::CryptoConfigDialog::slotApply()
86 {
87  mMainWidget->save();
88  enableButton( Apply, false );
89 }
90 
91 void Kleo::CryptoConfigDialog::slotUser1() // reset
92 {
93  mMainWidget->reset();
94  enableButton( Apply, false );
95 }
96 
97 void Kleo::CryptoConfigDialog::slotChanged()
98 {
99  enableButton( Apply, true );
100 }
101 
102 #include "cryptoconfigdialog.moc"
QWidget
Kleo::CryptoConfigDialog::slotChanged
void slotChanged()
Definition: cryptoconfigdialog.cpp:97
KDialog
Kleo::CryptoConfigDialog::slotDefault
void slotDefault()
Definition: cryptoconfigdialog.cpp:79
Kleo::CryptoConfigDialog::slotApply
void slotApply()
Definition: cryptoconfigdialog.cpp:85
Kleo::CryptoConfigModule
Crypto Config Module widget, dynamically generated from CryptoConfig It's a simple QWidget so that it...
Definition: cryptoconfigmodule.h:57
cryptoconfigmodule.h
cryptoconfigdialog.h
Kleo::CryptoConfigDialog::slotCancel
void slotCancel()
Definition: cryptoconfigdialog.cpp:73
Kleo::CryptoConfigModule::hasError
bool hasError() const
Definition: cryptoconfigmodule.cpp:221
Kleo::CryptoConfigDialog::CryptoConfigDialog
CryptoConfigDialog(Kleo::CryptoConfig *config, QWidget *parent=0)
Definition: cryptoconfigdialog.cpp:37
Kleo::CryptoConfigDialog::slotUser1
void slotUser1()
Definition: cryptoconfigdialog.cpp:91
Kleo::CryptoConfigDialog::slotOk
void slotOk()
Definition: cryptoconfigdialog.cpp:67
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:57:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkleo

Skip menu "libkleo"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal