KDEUI
Go to the documentation of this file.
30 class DictionaryComboBox::Private
35 void slotDictionaryChanged(
int idx );
38 void DictionaryComboBox::Private::slotDictionaryChanged(
int idx )
41 emit q->dictionaryChanged( q->itemData( idx ).toString() );
42 emit q->dictionaryNameChanged( q->itemText( idx ) );
47 :
KComboBox( parent ), d( new DictionaryComboBox::Private( this ) )
50 connect(
this, SIGNAL(activated(
int)),
51 SLOT(slotDictionaryChanged(
int)) );
66 return itemData( currentIndex() ).toString();
71 if ( name.isEmpty() || name == currentText() )
74 int idx = findText( name );
80 setCurrentIndex( idx );
81 d->slotDictionaryChanged( idx );
86 if ( dictionary.isEmpty() || dictionary == itemData( currentIndex() ).toString() )
89 int idx = findData( dictionary );
91 kDebug() <<
"dictionary not found" << dictionary;
95 setCurrentIndex( idx );
96 d->slotDictionaryChanged( idx );
104 QMapIterator<QString, QString> i( dictionaries );
105 while ( i.hasNext() ) {
107 kDebug() <<
"Populate combo:" << i.key() <<
":" << i.value();
108 addItem( i.key(), i.value() );
115 #include "dictionarycombobox.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 21:59:22 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.