#include <broker.h>
Inherits TQObject, and TDEShared.
Public Types | |
typedef TDESharedPtr< Broker > | Ptr |
Signals | |
void | configurationChanged () |
Public Member Functions | |
DefaultDictionary * | defaultDictionary () const |
Dictionary * | dictionary (const TQString &language=TQString::null, const TQString &client=TQString::null) const |
TQStringList | clients () const |
TQStringList | languages () const |
Settings * | settings () const |
Static Public Member Functions | |
static Broker * | openBroker (TDESharedConfig *config=0) |
Protected Member Functions | |
void | changed () |
Friends | |
class | Settings |
Detailed Description
Class used to deal with dictionaries.
This class manages all dictionaries. It's the top level KSpell2 class, you can think of it as the kernel or manager of the KSpell2 architecture.
Member Function Documentation
◆ clients()
TQStringList KSpell2::Broker::clients | ( | ) | const |
Returns names of all supported clients (e.g.
ISpell, ASpell)
Definition at line 158 of file broker.cpp.
◆ configurationChanged
|
signal |
Signal is emitted whenever the Settings object associated with this Broker changes.
◆ defaultDictionary()
DefaultDictionary * KSpell2::Broker::defaultDictionary | ( | ) | const |
Function returns the so-called DefaultDictionary.
It's a special form a dictionary which automatically mutates according to changes tot the KSpell2::Settings object. You also can't delete it like other dictionaries since it's owned by the Broker and it will take care of it.
Definition at line 108 of file broker.cpp.
◆ dictionary()
Dictionary * KSpell2::Broker::dictionary | ( | const TQString & | language = TQString::null , |
const TQString & | client = TQString::null |
||
) | const |
Returns dictionary for the given language and preferred client.
- Parameters
-
language specifies the language of the dictionary. If an empty string will be passed the default language will be used. Has to be one of the values returned by languages() client specifies the preferred client. If no client is specified a client which supports the given language is picked. If a few clients supports the same language the one with the biggest reliability value is returned.
Definition at line 113 of file broker.cpp.
◆ languages()
TQStringList KSpell2::Broker::languages | ( | ) | const |
Returns a list of supported languages.
Definition at line 163 of file broker.cpp.
◆ openBroker()
|
static |
Constructs the broker.
It's very important that you assign it to Broker::Ptr as soon as possible. Broker is reference counted so if you don't want to have it deleted under you simply have to hold it in a Broker::Ptr for as long as you're using it.
- Parameters
-
config is the name of config file which broker should use to read default language and default client values. If no value will be passed Broker will use global tdespellrc file.
Definition at line 58 of file broker.cpp.
◆ settings()
Settings * KSpell2::Broker::settings | ( | ) | const |
Returns the Settings object used by the broker.
Definition at line 168 of file broker.cpp.
The documentation for this class was generated from the following files: