IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QVirtualKeyboardDictionaryManager Class

Dictionary management for application-defined dictionaries.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QVirtualKeyboardDictionaryManager Class

  • Header: QVirtualKeyboardDictionaryManager

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS VirtualKeyboard)

    target_link_libraries(mytarget PRIVATE Qt6::VirtualKeyboard)

  • qmake: QT += virtualkeyboard

  • Inherits: QObject

  • Group: QVirtualKeyboardDictionaryManager is part of qtvirtualkeyboard-cpp-for-apps

Detailed Description

This class allows you to manage dictionaries for virtual keyboard input methods. Dictionaries are application-defined and can be activated in the desired context.

Dictionaries do not refer to the built-in dictionaries of the input method, but to the application's own dictionaries (for example, a phonebook application).

The following operations are supported by the dictionary manager:

  • Create dictionaries using the createDictionary() function.

  • Add or modify content of the dictionary instance.

  • Activate dictionaries by adding them to the list of base dictionaries or extra dictionaries.

To activate dictionaries from QML, use the VirtualKeyboard attached type.

Property Documentation

 

[read-only] activeDictionaries : const QStringList

This property holds the list of currently active dictionaries.

This property holds the list of active dictionaries, which is a combination of unique names included in baseDictionaries and extraDictionaries.

Access functions:

  • activeDictionaries() const

Notifier signal:

  • void activeDictionariesChanged()

[read-only] availableDictionaries : const QStringList

This property holds the list of all dictionaries.

This property holds the names of all existing dictionaries.

Access functions:

  • availableDictionaries() const

Notifier signal:

  • void availableDictionariesChanged()

baseDictionaries : QStringList

This property holds the list of currently active base dictionaries.

This property holds the names of base dictionaries. The application manages this property.

Access functions:

  • baseDictionaries() const

  • void setBaseDictionaries(const &baseDictionaries)

Notifier signal:

  • void baseDictionariesChanged()

extraDictionaries : QStringList

This property holds the list of currently active extra dictionaries.

This property holds the names of extra dictionaries. The application manages this property.

Access functions:

  • extraDictionaries() const

  • void setExtraDictionaries(const &extraDictionaries)

Notifier signal:

  • void extraDictionariesChanged()

Member Function Documentation

 

QVirtualKeyboardDictionary *QVirtualKeyboardDictionaryManager::createDictionary(const QString &name)

Create a dictionary with the given name or return the dictionary if it already exists.

The dictionary instance is owned by the dictionary manager and must not be destroyed manually. To free memory allocated for the dictionary, the application may reset the contents of the dictionary.

See Also

See also dictionary()

QVirtualKeyboardDictionary *QVirtualKeyboardDictionaryManager::dictionary(const QString &name) const

Returns an existing dictionary with the given name if it exists, otherwise returns nullptr.

See Also

See also createDictionary()

[static] QVirtualKeyboardDictionaryManager *QVirtualKeyboardDictionaryManager::instance()

Returns the singleton instance of the QVirtualKeyboardDictionaryManager.

All the functionalities must be called from the main thread.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+