40 #include <klineedit.h>
43 #include <knuminput.h>
44 #include <kiconloader.h>
46 #include <kcomponentdata.h>
48 #ifndef KDEPIM_ONLY_KLEO
49 # include <kurlrequester.h>
52 #include <QApplication>
55 #include <QPushButton>
58 #include <QVBoxLayout>
60 #include <QHBoxLayout>
61 #include <QGridLayout>
62 #include <QScrollArea>
63 #include <QDesktopWidget>
76 class ScrollArea :
public QScrollArea {
78 explicit ScrollArea(
QWidget* p ) : QScrollArea( p ) {}
79 QSize sizeHint()
const {
80 const QSize wsz = widget() ? widget()->sizeHint() : QSize();
81 return QSize( wsz.width() + style()->pixelMetric( QStyle::PM_ScrollBarExtent ), QScrollArea::sizeHint().height() );
88 return KIcon( ss.replace( QRegExp( QLatin1String(
"[^a-zA-Z0-9_]") ), QLatin1String(
"-") ) );
94 const QStringList components = config->componentList();
95 unsigned int result = 0;
96 for ( QStringList::const_iterator it = components.begin() ; it != components.end() ; ++it )
97 if (
const Kleo::CryptoConfigComponent *
const comp = config->component( *it ) )
98 if ( !comp->groupList().empty() )
107 return KPageView::Plain;
127 void Kleo::CryptoConfigModule::init( Layout layout ) {
128 if ( QLayout * l = this->layout() )
131 Kleo::CryptoConfig *
const config = mConfig;
133 bool configOK =
false;
138 QVBoxLayout * vlay = 0;
141 if ( type == Plain ) {
143 QVBoxLayout * l =
new QVBoxLayout( w );
144 l->setSpacing( KDialog::spacingHint() );
146 QScrollArea * s =
new QScrollArea( w );
147 s->setFrameStyle( QFrame::NoFrame );
148 s->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
149 s->setWidgetResizable(
true );
151 vbox =
new QWidget( s->viewport() );
152 vlay =
new QVBoxLayout( vbox );
153 vlay->setMargin( 0 );
154 s->setWidget( vbox );
155 addPage( w, configOK ?
QString() : i18n(
"GpgConf Error") );
158 const QStringList components = config->componentList();
159 for ( QStringList::const_iterator it = components.begin(); it != components.end(); ++it ) {
161 Kleo::CryptoConfigComponent* comp = config->component( *it );
163 if ( comp->groupList().empty() )
167 compGUI->setObjectName( *it );
169 mComponentGUIs.append( compGUI.get() );
171 if ( type == Plain ) {
172 QGroupBox * gb =
new QGroupBox( comp->description(), vbox );
173 (
new QVBoxLayout( gb ) )->addWidget( compGUI.release() );
174 vlay->addWidget( gb );
177 vlay =
new QVBoxLayout( vbox );
178 vlay->setSpacing( KDialog::spacingHint() );
179 vlay->setMargin( 0 );
180 KPageWidgetItem *pageItem =
new KPageWidgetItem( vbox, comp->description() );
181 if ( type != Tabbed )
182 pageItem->setIcon(
loadIcon( comp->iconName() ) );
185 QScrollArea* scrollArea = type == Tabbed ?
new QScrollArea( vbox ) : new ScrollArea( vbox );
186 scrollArea->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
187 scrollArea->setWidgetResizable(
true );
189 vlay->addWidget( scrollArea );
190 const QSize compGUISize = compGUI->sizeHint();
191 scrollArea->setWidget( compGUI.release() );
194 const int deskHeight = QApplication::desktop()->height();
196 if (deskHeight > 1000)
198 else if (deskHeight > 650)
202 assert( scrollArea->widget() );
203 if ( type != Tabbed )
204 scrollArea->setMinimumHeight( qMin( compGUISize.height(), dialogHeight ) );
207 if ( mComponentGUIs.empty() ) {
208 const QString msg = i18n(
"The gpgconf tool used to provide the information "
209 "for this dialog does not seem to be installed "
210 "properly. It did not return any components. "
211 "Try running \"%1\" on the command line for more "
213 components.empty() ? QLatin1String(
"gpgconf --list-components") : QLatin1String(
"gpgconf --list-options gpg") );
214 QLabel *
label =
new QLabel( msg, vbox );
215 label->setWordWrap(
true);
216 label->setMinimumHeight( fontMetrics().lineSpacing() * 5 );
217 vlay->addWidget( label );
222 return mComponentGUIs.empty();
227 bool changed =
false;
228 QList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
229 for( ; it != mComponentGUIs.end(); ++it ) {
234 mConfig->sync(
true );
239 QList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
240 for( ; it != mComponentGUIs.end(); ++it ) {
247 QList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
248 for( ; it != mComponentGUIs.end(); ++it ) {
264 mComponent( component )
266 QGridLayout * glay =
new QGridLayout(
this );
267 glay->setSpacing( KDialog::spacingHint() );
268 const QStringList groups = mComponent->groupList();
269 if ( groups.size() > 1 ) {
271 for ( QStringList::const_iterator it = groups.begin(), end = groups.end() ; it != end; ++it ) {
272 Kleo::CryptoConfigGroup* group = mComponent->group( *it );
276 const QString title = group->description();
278 const int row = glay->rowCount();
279 glay->addWidget( hl, row, 0, 1, 3 );
282 }
else if ( !groups.empty() ) {
283 mGroupGUIs.append(
new CryptoConfigGroupGUI( module, mComponent->group( groups.front() ), glay,
this ) );
285 glay->setRowStretch( glay->rowCount(), 1 );
291 bool changed =
false;
292 QList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
293 for( ; it != mGroupGUIs.end(); ++it ) {
302 QList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
303 for( ; it != mGroupGUIs.end(); ++it )
309 QList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
310 for( ; it != mGroupGUIs.end(); ++it )
318 QGridLayout * glay,
QWidget* widget)
319 :
QObject( module ), mGroup( group )
321 const int startRow = glay->rowCount();
322 const QStringList entries = mGroup->entryList();
323 for( QStringList::const_iterator it = entries.begin(), end = entries.end() ; it != end; ++it ) {
324 Kleo::CryptoConfigEntry* entry = group->entry( *it );
327 kDebug(5150) <<
"entry" << *it <<
"too advanced, skipping";
333 mEntryGUIs.append( entryGUI );
337 const int endRow = glay->rowCount() - 1;
338 if ( endRow < startRow )
341 const QString iconName = group->iconName();
342 if ( iconName.isEmpty() )
345 QLabel * l =
new QLabel( widget );
346 l->setPixmap(
loadIcon( iconName ).pixmap( KIconLoader::SizeMedium, KIconLoader::SizeMedium ) );
347 glay->addWidget( l, startRow, 0, endRow-startRow+1, 1, Qt::AlignTop );
352 bool changed =
false;
353 QList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
354 for( ; it != mEntryGUIs.end(); ++it ) {
355 if ( (*it)->isChanged() ) {
365 QList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
366 for( ; it != mEntryGUIs.end(); ++it )
372 QList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
373 for( ; it != mEntryGUIs.end(); ++it )
374 (*it)->resetToDefault();
382 template <
typename T_W
idget>
384 return new T_Widget( m, e, n, l, p );
388 static const struct WidgetsByEntryName {
389 const char * entryGlob;
392 {
"*/*/debug-level", &_create<CryptoConfigEntryDebugLevel> },
393 {
"gpg/*/keyserver", &_create<CryptoConfigEntryKeyserver> }
399 &_create<CryptoConfigEntrySpinBox>,
402 &_create<CryptoConfigEntryLineEdit>,
403 &_create<CryptoConfigEntryLineEdit>,
406 &_create<CryptoConfigEntryLDAPURL>,
411 &_create<CryptoConfigEntryCheckBox>,
412 &_create<CryptoConfigEntryLineEdit>,
413 &_create<CryptoConfigEntrySpinBox>,
414 &_create<CryptoConfigEntrySpinBox>,
415 &_create<CryptoConfigEntryPath>,
416 &_create<CryptoConfigEntryURL>,
418 &_create<CryptoConfigEntryDirPath>,
426 const QString path = entry->path();
428 if ( QRegExp( QLatin1String(
widgetsByEntryName[i].entryGlob ), Qt::CaseSensitive, QRegExp::Wildcard ).exactMatch( path ) )
432 const unsigned int argType = entry->argType();
434 if ( entry->isList() )
436 return create( module, entry, entryName, glay, widget );
438 kWarning(5150) <<
"No widget implemented for list of type" << entry->argType();
441 return create( module, entry, entryName, glay, widget );
443 kWarning(5150) <<
"No widget implemented for type" << entry->argType();
452 Kleo::CryptoConfigEntry* entry,
454 :
QObject( module ), mEntry( entry ), mName( entryName ), mChanged( false )
461 QString descr = mEntry->description();
462 if ( descr.isEmpty() )
463 return QString::fromLatin1(
"<%1>" ).arg( mName );
464 if ( i18nc(
"Translate this to 'yes' or 'no' (use the English words!) "
465 "depending on whether your language uses "
466 "Sentence style capitalisation in GUI labels (yes) or not (no). "
467 "Context: We get some backend strings in that have the wrong "
468 "capitalizaion (in English, at least) so we need to force the "
469 "first character to upper-case. It is this behaviour you can "
470 "control for your language with this translation.",
"yes" ) == QLatin1String(
"yes" ) )
471 descr[0] = descr[0].toUpper();
477 mEntry->resetToDefault();
485 Kleo::CryptoConfigEntry* entry,
const QString& entryName,
486 QGridLayout * glay,
QWidget* widget )
489 const int row = glay->rowCount();
490 mLineEdit =
new KLineEdit( widget );
491 QLabel *label =
new QLabel(
description(), widget );
492 label->setBuddy( mLineEdit );
493 glay->addWidget( label, row, 1 );
494 glay->addWidget( mLineEdit, row, 2 );
495 if ( entry->isReadOnly() ) {
496 label->setEnabled(
false );
497 mLineEdit->setEnabled(
false );
505 mEntry->setStringValue( mLineEdit->text() );
510 mLineEdit->setText( mEntry->stringValue() );
515 static const struct {
519 { I18N_NOOP(
"0 - None (no debugging at all)" ),
"none" },
520 { I18N_NOOP(
"1 - Basic (some basic debug messages)" ),
"basic" },
521 { I18N_NOOP(
"2 - Advanced (more verbose debug messages)" ),
"advanced" },
522 { I18N_NOOP(
"3 - Expert (even more detailed messages)" ),
"expert" },
523 { I18N_NOOP(
"4 - Guru (all of the debug messages you can get)" ),
"guru" },
530 mComboBox( new QComboBox( widget ) )
532 QLabel *label =
new QLabel( i18n(
"Set the debugging level to"), widget );
533 label->setBuddy( mComboBox );
536 mComboBox->addItem( i18n(
debugLevels[i].label ) );
538 if ( entry->isReadOnly() ) {
539 label->setEnabled(
false );
540 mComboBox->setEnabled(
false );
542 connect( mComboBox, SIGNAL(currentIndexChanged(
int)), SLOT(
slotChanged()) );
545 const int row = glay->rowCount();
546 glay->addWidget( label, row, 1 );
547 glay->addWidget( mComboBox, row, 2 );
552 const unsigned int idx = mComboBox->currentIndex();
556 mEntry->setStringValue(
QString() );
561 const QString str = mEntry->stringValue();
564 mComboBox->setCurrentIndex( i );
567 mComboBox->setCurrentIndex( 0 );
574 Kleo::CryptoConfigEntry* entry,
const QString& entryName,
575 QGridLayout * glay,
QWidget* widget )
578 mFileNameRequester( 0 )
580 const int row = glay->rowCount();
582 #ifdef KDEPIM_ONLY_KLEO
585 mFileNameRequester->
setFilter( QDir::Files );
587 req = mUrlRequester =
new KUrlRequester( widget );
588 mUrlRequester->setMode( KFile::File | KFile::LocalOnly );
590 QLabel *label =
new QLabel(
description(), widget );
591 label->setBuddy( req );
592 glay->addWidget( label, row, 1 );
593 glay->addWidget( req, row, 2 );
594 if ( entry->isReadOnly() ) {
595 label->setEnabled(
false );
596 #ifndef KDEPIM_ONLY_KLEO
598 mUrlRequester->setEnabled(
false );
600 if ( mFileNameRequester )
601 mFileNameRequester->setEnabled(
false );
603 #ifndef KDEPIM_ONLY_KLEO
605 connect( mUrlRequester, SIGNAL(textChanged(
QString)),
608 if ( mFileNameRequester )
609 connect( mFileNameRequester, SIGNAL(fileNameChanged(
QString)),
616 #ifdef KDEPIM_ONLY_KLEO
617 mEntry->setURLValue( KUrl::fromPath( mFileNameRequester->fileName() ) );
619 mEntry->setURLValue( mUrlRequester->url() );
625 #ifdef KDEPIM_ONLY_KLEO
626 mFileNameRequester->setFileName( mEntry->urlValue().toLocalFile() );
628 mUrlRequester->setUrl( mEntry->urlValue() );
636 Kleo::CryptoConfigEntry* entry,
const QString& entryName,
637 QGridLayout * glay,
QWidget* widget )
640 mFileNameRequester( 0 )
642 const int row = glay->rowCount();
644 #ifdef KDEPIM_ONLY_KLEO
647 mFileNameRequester->
setFilter( QDir::Dirs );
649 req = mUrlRequester =
new KUrlRequester( widget );
650 mUrlRequester->setMode( KFile::Directory | KFile::LocalOnly );
652 QLabel *label =
new QLabel(
description(), widget );
653 label->setBuddy( req );
654 glay->addWidget( label, row, 1 );
655 glay->addWidget( req, row, 2 );
656 if ( entry->isReadOnly() ) {
657 label->setEnabled(
false );
658 #ifndef KDEPIM_ONLY_KLEO
660 mUrlRequester->setEnabled(
false );
662 if ( mFileNameRequester )
663 mFileNameRequester->setEnabled(
false );
665 #ifndef KDEPIM_ONLY_KLEO
667 connect( mUrlRequester, SIGNAL(textChanged(
QString)),
670 if ( mFileNameRequester )
671 connect( mFileNameRequester, SIGNAL(fileNameChanged(
QString)),
678 #ifdef KDEPIM_ONLY_KLEO
679 mEntry->setURLValue( KUrl::fromPath( mFileNameRequester->fileName() ) );
681 mEntry->setURLValue( mUrlRequester->url() );
687 #ifdef KDEPIM_ONLY_KLEO
688 mFileNameRequester->setFileName( mEntry->urlValue().toLocalFile() );
690 mUrlRequester->setUrl( mEntry->urlValue() );
698 Kleo::CryptoConfigEntry* entry,
const QString& entryName,
699 QGridLayout * glay,
QWidget* widget )
702 #ifndef KDEPIM_ONLY_KLEO
706 const int row = glay->rowCount();
708 #ifdef KDEPIM_ONLY_KLEO
709 req = mLineEdit =
new QLineEdit( widget );
711 req = mUrlRequester =
new KUrlRequester( widget );
712 mUrlRequester->setMode( KFile::File | KFile::ExistingOnly );
714 QLabel *label =
new QLabel(
description(), widget );
715 label->setBuddy( req );
716 glay->addWidget( label, row, 1 );
717 glay->addWidget( req, row, 2 );
718 if ( entry->isReadOnly() ) {
719 label->setEnabled(
false );
720 #ifndef KDEPIM_ONLY_KLEO
722 mUrlRequester->setEnabled(
false );
725 mLineEdit->setEnabled(
false );
727 connect( req, SIGNAL(textChanged(
QString)),
734 #ifdef KDEPIM_ONLY_KLEO
735 mEntry->setURLValue( KUrl( mLineEdit->text() ) );
737 mEntry->setURLValue( mUrlRequester->url() );
743 #ifdef KDEPIM_ONLY_KLEO
744 mLineEdit->setText( mEntry->urlValue().url() );
746 mUrlRequester->setUrl( mEntry->urlValue().url() );
754 Kleo::CryptoConfigEntry* entry,
const QString& entryName,
755 QGridLayout * glay,
QWidget* widget )
768 const int row = glay->rowCount();
769 mNumInput =
new KIntNumInput( widget );
770 QLabel *label =
new QLabel(
description(), widget );
771 label->setBuddy( mNumInput );
772 glay->addWidget( label, row, 1 );
773 glay->addWidget( mNumInput, row, 2 );
775 if ( entry->isReadOnly() ) {
776 label->setEnabled(
false );
777 mNumInput->setEnabled(
false );
779 if ( mKind == UInt || mKind == ListOfNone )
780 mNumInput->setMinimum( 0 );
781 connect( mNumInput, SIGNAL(valueChanged(
int)), SLOT(
slotChanged()) );
787 int value = mNumInput->value();
790 mEntry->setNumberOfTimesSet( value );
793 mEntry->setUIntValue( value );
796 mEntry->setIntValue( value );
806 value = mEntry->numberOfTimesSet();
809 value = mEntry->uintValue();
812 value = mEntry->intValue();
815 mNumInput->setValue( value );
822 Kleo::CryptoConfigEntry* entry,
const QString& entryName,
823 QGridLayout * glay,
QWidget* widget )
826 const int row = glay->rowCount();
827 mCheckBox =
new QCheckBox( widget );
828 glay->addWidget( mCheckBox, row, 1, 1, 2 );
830 if ( entry->isReadOnly() ) {
831 mCheckBox->setEnabled(
false );
833 connect( mCheckBox, SIGNAL(toggled(
bool)), SLOT(
slotChanged()) );
839 mEntry->setBoolValue( mCheckBox->isChecked() );
844 mCheckBox->setChecked( mEntry->boolValue() );
851 Kleo::CryptoConfigEntry* entry,
853 QGridLayout * glay,
QWidget* widget )
856 mLabel =
new QLabel( widget );
857 mPushButton =
new QPushButton( entry->isReadOnly() ? i18n(
"Show...") : i18n(
"Edit..." ), widget );
860 const int row = glay->rowCount();
861 QLabel *label =
new QLabel(
description(), widget );
862 label->setBuddy( mPushButton );
863 glay->addWidget( label, row, 1 );
864 QHBoxLayout * hlay =
new QHBoxLayout;
865 glay->addLayout( hlay, row, 2 );
866 hlay->addWidget( mLabel, 1 );
867 hlay->addWidget( mPushButton );
869 if ( entry->isReadOnly() )
870 mLabel->setEnabled(
false );
871 connect( mPushButton, SIGNAL(clicked()), SLOT(slotOpenDialog()) );
876 setURLList( mEntry->urlValueList() );
881 mEntry->setURLValueList( mURLList );
884 void Kleo::CryptoConfigEntryLDAPURL::slotOpenDialog()
888 KDialog dialog( mPushButton->parentWidget() );
889 dialog.setCaption( i18n(
"Configure LDAP Servers" ) );
890 if ( mEntry->isReadOnly() )
891 dialog.setButtons( KDialog::Ok );
893 dialog.setButtons( KDialog::Default|KDialog::Cancel|KDialog::Ok );
899 dialog.setMainWidget( dirserv );
900 connect( &dialog, SIGNAL(defaultClicked()), dirserv, SLOT(clear()) );
901 if ( dialog.exec() ) {
907 void Kleo::CryptoConfigEntryLDAPURL::setURLList(
const KUrl::List& urlList )
910 if ( mURLList.isEmpty() )
911 mLabel->setText( i18n(
"No server configured yet" ) );
913 mLabel->setText( i18np(
"1 server configured",
"%1 servers configured", mURLList.count() ) );
920 Kleo::CryptoConfigEntry* entry,
922 QGridLayout * glay,
QWidget* widget )
925 mLabel =
new QLabel( widget );
926 mPushButton =
new QPushButton( i18n(
"Edit..." ), widget );
929 const int row = glay->rowCount();
930 QLabel *label =
new QLabel( i18n(
"Use keyserver at"), widget );
931 label->setBuddy( mPushButton );
932 glay->addWidget( label, row, 1 );
933 QHBoxLayout * hlay =
new QHBoxLayout;
934 glay->addLayout( hlay, row, 2 );
935 hlay->addWidget( mLabel, 1 );
936 hlay->addWidget( mPushButton );
938 if ( entry->isReadOnly() ) {
939 mLabel->setEnabled(
false );
942 connect( mPushButton, SIGNAL(clicked()), SLOT(slotOpenDialog()) );
947 const QStringList list = str.split( QRegExp( QLatin1String(
"[\\s,]" ) ), QString::SkipEmptyParts );
951 result.
url = list.front();
952 Q_FOREACH(
const QString & kvpair, list.mid( 1 ) ) {
953 const int idx = kvpair.indexOf( QLatin1Char(
'=' ) );
957 const QString key = kvpair.left( idx );
958 const QString value = kvpair.mid( idx+1 );
959 if ( value.isEmpty() )
960 result.
options.push_back( qMakePair( key, QString::fromLatin1(
"") ) );
962 result.
options.push_back( qMakePair( key, value ) );
969 if ( keyserver.
options.empty() )
970 return keyserver.
url;
972 typedef QPair<QString,QString> Pair;
973 Q_FOREACH(
const Pair & pair, keyserver.
options )
974 if ( pair.second.isNull() )
975 result += QLatin1Char(
' ' ) + pair.first ;
977 result += QLatin1Char(
' ' ) + pair.first + QLatin1Char(
'=' ) + pair.second ;
984 mLabel->setText( mParsedKeyserver.url );
989 mParsedKeyserver.url = mLabel->text();
994 return str.isEmpty() ? KUrl::List() : KUrl( str ) ;
998 return urls.empty() ?
QString() : urls.front().url() ;
1001 void Kleo::CryptoConfigEntryKeyserver::slotOpenDialog()
1005 KDialog dialog( mPushButton->parentWidget() );
1006 dialog.setCaption( i18n(
"Configure Keyservers" ) );
1007 dialog.setButtons( KDialog::Default|KDialog::Cancel|KDialog::Ok );
1013 dialog.setMainWidget( &dirserv );
1014 connect( &dialog, SIGNAL(defaultClicked()), &dirserv, SLOT(clear()) );
1015 if ( dialog.exec() ) {
1021 #include "cryptoconfigmodule.moc"
1022 #include "cryptoconfigmodule_p.moc"
CryptoConfigEntryDebugLevel(CryptoConfigModule *module, Kleo::CryptoConfigEntry *entry, const QString &entryName, QGridLayout *layout, QWidget *parent=0)
CryptoConfigEntryLineEdit(CryptoConfigModule *module, Kleo::CryptoConfigEntry *entry, const QString &entryName, QGridLayout *layout, QWidget *parent=0)
static KPageView::FaceType determineJanusFace(const Kleo::CryptoConfig *config, Kleo::CryptoConfigModule::Layout layout, bool &ok)
CryptoConfigEntrySpinBox(CryptoConfigModule *module, Kleo::CryptoConfigEntry *entry, const QString &entryName, QGridLayout *layout, QWidget *parent=0)
static CryptoConfigEntryGUI * createEntryGUI(CryptoConfigModule *module, Kleo::CryptoConfigEntry *entry, const QString &entryName, QGridLayout *layout, QWidget *widget)
CryptoConfigEntryPath(CryptoConfigModule *module, Kleo::CryptoConfigEntry *entry, const QString &entryName, QGridLayout *layout, QWidget *parent=0)
static const unsigned int numDebugLevels
KLEO_EXPORT ParsedKeyserver parseKeyserver(const QString &str)
A widget corresponding to a component in the crypto config.
void setExistingOnly(bool on)
CryptoConfigEntryGUI(CryptoConfigModule *module, Kleo::CryptoConfigEntry *entry, const QString &entryName)
A class managing widgets corresponding to a group in the crypto config.
CryptoConfigEntryDirPath(CryptoConfigModule *module, Kleo::CryptoConfigEntry *entry, const QString &entryName, QGridLayout *layout, QWidget *parent=0)
static QString urls2string(const KUrl::List &urls)
CryptoConfigGroupGUI(CryptoConfigModule *module, Kleo::CryptoConfigGroup *group, QGridLayout *layout, QWidget *parent=0)
KIcon loadIcon(const QString &s)
CryptoConfigModule(Kleo::CryptoConfig *config, QWidget *parent=0)
static const struct @5 debugLevels[]
static unsigned int num_components_with_options(const Kleo::CryptoConfig *config)
KLEO_EXPORT QString assembleKeyserver(const ParsedKeyserver &keyserver)
static KUrl::List string2urls(const QString &str)
CryptoConfigEntryCheckBox(CryptoConfigModule *module, Kleo::CryptoConfigEntry *entry, const QString &entryName, QGridLayout *layout, QWidget *parent=0)
CryptoConfigEntryGUI *(* constructor)(CryptoConfigModule *, Kleo::CryptoConfigEntry *, const QString &, QGridLayout *, QWidget *)
static const unsigned int numWidgetsByEntryName
Crypto Config Module widget, dynamically generated from CryptoConfig It's a simple QWidget so that it...
static const struct WidgetsByEntryName widgetsByEntryName[]
QString description() const
CryptoConfigComponentGUI(CryptoConfigModule *module, Kleo::CryptoConfigComponent *component, QWidget *parent=0)
static const constructor listWidgets[CryptoConfigEntry::NumArgType]
CryptoConfigEntryURL(CryptoConfigModule *module, Kleo::CryptoConfigEntry *entry, const QString &entryName, QGridLayout *layout, QWidget *parent=0)
void setFilter(QDir::Filters f)
QVector< QPair< QString, QString > > options
Base class for the widget managers tied to an entry in the crypto config.
static const constructor scalarWidgets[CryptoConfigEntry::NumArgType]
CryptoConfigEntryKeyserver(CryptoConfigModule *module, Kleo::CryptoConfigEntry *entry, const QString &entryName, QGridLayout *layout, QWidget *parent=0)
CryptoConfigEntryLDAPURL(CryptoConfigModule *module, Kleo::CryptoConfigEntry *entry, const QString &entryName, QGridLayout *layout, QWidget *parent=0)