Sonnet::DictionaryComboBox Class
A combo box for selecting the dictionary used for spell checking. More...
| Header: | #include <Sonnet/DictionaryComboBox> | 
| CMake: | find_package(KF6 REQUIRED COMPONENTS Sonnet)target_link_libraries(mytarget PRIVATE KF6::SonnetUi) | 
| Inherits: | QComboBox | 
Public Functions
| DictionaryComboBox(QWidget *parent = nullptr) | |
| bool | assignByDictionnary(const QString &dictionary) | 
| bool | assignDictionnaryName(const QString &name) | 
| QString | currentDictionary() const | 
| QString | currentDictionaryName() const | 
| void | reloadCombo() | 
| void | setCurrentByDictionary(const QString &dictionary) | 
| void | setCurrentByDictionaryName(const QString &dictionaryName) | 
Signals
| void | dictionaryChanged(const QString &dictionary) | 
| void | dictionaryNameChanged(const QString &dictionaryName) | 
Detailed Description
Member Function Documentation
[explicit] DictionaryComboBox::DictionaryComboBox(QWidget *parent = nullptr)
Constructor
bool DictionaryComboBox::assignByDictionnary(const QString &dictionary)
Sets the current dictionary to the given dictionary Return true if dictionary was found.
bool DictionaryComboBox::assignDictionnaryName(const QString &name)
Sets the current dictionaryName to the given dictionaryName Return true if dictionary was found.
QString DictionaryComboBox::currentDictionary() const
Returns the current dictionary, for example "de_CH"
QString DictionaryComboBox::currentDictionaryName() const
Returns the current dictionary name, for example "German (Switzerland)"
[signal] void DictionaryComboBox::dictionaryChanged(const QString &dictionary)
Emitted whenever the current dictionary changes. Either by user intervention or on setCurrentByDictionaryName() or on setCurrentByDictionary(). For example "de_CH".
[signal] void DictionaryComboBox::dictionaryNameChanged(const QString &dictionaryName)
Emitted whenever the current dictionary changes. Either by user intervention or on setCurrentByDictionaryName() or on setCurrentByDictionary(). For example "German (Switzerland)".
void DictionaryComboBox::reloadCombo()
Clears the widget and reloads the dictionaries from Sonnet. Remember to set the dictionary you want selected after calling this function.
void DictionaryComboBox::setCurrentByDictionary(const QString &dictionary)
Sets the current dictionary to the given dictionary.
void DictionaryComboBox::setCurrentByDictionaryName(const QString &dictionaryName)
Sets the current dictionaryName to the given dictionaryName