Fcitx
Public Member Functions | List of all members
fcitx::InputMethodManager Class Reference

Class to manage all the input method relation information. More...

#include <fcitx/inputmethodmanager.h>

Inheritance diagram for fcitx::InputMethodManager:
Inheritance graph
[legend]
Collaboration diagram for fcitx::InputMethodManager:
Collaboration graph
[legend]

Public Member Functions

 InputMethodManager (AddonManager *addonManager)
 
void load (const std::function< void(InputMethodManager &)> &buildDefaultGroupCallback={})
 Load the input method information from disk. More...
 
void reset (const std::function< void(InputMethodManager &)> &buildDefaultGroupCallback={})
 Reset all the group information to initial state.
 
void refresh ()
 Load new input method configuration file from disk. More...
 
void save ()
 Save the input method information to disk. More...
 
std::vector< std::string > groups () const
 Return all the names of group by order.
 
int groupCount () const
 Return the number of groups.
 
void setCurrentGroup (const std::string &group)
 Set the name of current group, rest of the group order will be adjusted accordingly. More...
 
const InputMethodGroupcurrentGroup () const
 Return the current group.
 
void enumerateGroup (bool forward)
 Simply enumerate input method groups.
 
void enumerateGroupTo (const std::string &groupName)
 enumerate group to a certain group. More...
 
void setDefaultInputMethod (const std::string &name)
 Set default input method for current group. More...
 
const InputMethodGroupgroup (const std::string &name) const
 Return the input methdo group of given name.
 
void setGroup (InputMethodGroup newGroupInfo)
 Update the information of an existing group. More...
 
void addEmptyGroup (const std::string &name)
 Create a new empty group with given name.
 
void removeGroup (const std::string &name)
 Remove an existing group by name.
 
void setGroupOrder (const std::vector< std::string > &groups)
 Update the initial order of groups. More...
 
const InputMethodEntryentry (const std::string &name) const
 Return a given input method entry by name.
 
bool foreachEntries (const std::function< bool(const InputMethodEntry &entry)> &callback)
 Enumerate all the input method entries. More...
 
bool checkUpdate () const
 Check if there is new entries could be loaded. More...
 
 FCITX_DECLARE_SIGNAL (InputMethodManager, CurrentGroupAboutToChange, void(const std::string &group))
 Emit the signal when current group is about to change. More...
 
 FCITX_DECLARE_SIGNAL (InputMethodManager, CurrentGroupChanged, void(const std::string &group))
 
 FCITX_DECLARE_SIGNAL (InputMethodManager, GroupAdded, void(const std::string &group))
 Emit the signal when a new group is added. More...
 
 FCITX_DECLARE_SIGNAL (InputMethodManager, GroupRemoved, void(const std::string &group))
 Emit the signal when a group is removed. More...
 
- Public Member Functions inherited from fcitx::ConnectableObject
template<typename SignalType , typename F >
Connection connect (F &&func)
 
template<typename SignalType >
void disconnectAll ()
 

Additional Inherited Members

- Protected Member Functions inherited from fcitx::ConnectableObject
void destroy ()
 Allow user to notify the destroy event earlier. More...
 
template<typename SignalType , typename... Args>
auto emit (Args &&...args)
 
template<typename SignalType , typename... Args>
auto emit (Args &&...args) const
 
template<typename SignalType , typename Combiner = LastValue<typename std::function< typename SignalType::signalType>::result_type>>
void registerSignal ()
 
template<typename SignalType >
void unregisterSignal ()
 

Detailed Description

Class to manage all the input method relation information.

It will list all the available input methods from configuration file and addon. The configuration file is located under $XDG_DATA/fcitx5/inputmethod.

Additional runtime input method can be reported by input method addon by listInputMethods.

See also
InputMethodEngine::listInputMethods

Definition at line 42 of file inputmethodmanager.h.


The documentation for this class was generated from the following files: