KEMailSettings Class
Access to e-mail settings. More...
Header: | #include <KEMailSettings> |
CMake: | find_package(KF6 REQUIRED COMPONENTS Config) target_link_libraries(mytarget PRIVATE KF6::ConfigCore) |
Public Types
enum | Setting { ClientProgram, ClientTerminal, RealName, EmailAddress, ReplyToAddress, Organization } |
Public Functions
KEMailSettings() | |
QString | defaultProfileName() const |
QString | getSetting(KEMailSettings::Setting s) const |
QStringList | profiles() const |
void | setDefault(const QString &def) |
void | setProfile(const QString &s) |
void | setSetting(KEMailSettings::Setting s, const QString &v) |
Detailed Description
This is just a small class to facilitate accessing e-mail settings in a sane way, and allowing any program to manage multiple e-mail profiles effortlessly
The default profile is automatically selected in the constructor.
Member Type Documentation
enum KEMailSettings::Setting
The list of settings that I thought of when I wrote this class.
Constant | Value |
---|---|
KEMailSettings::ClientProgram | 0 |
KEMailSettings::ClientTerminal | 1 |
KEMailSettings::RealName | 2 |
KEMailSettings::EmailAddress | 3 |
KEMailSettings::ReplyToAddress | 4 |
KEMailSettings::Organization | 5 |
See also getSetting() and setSetting().
Member Function Documentation
KEMailSettings::KEMailSettings()
Default constructor, just sets things up and sets the default profile as the current profile
QString KEMailSettings::defaultProfileName() const
Returns the name of the default profile.
QString KEMailSettings::getSetting(KEMailSettings::Setting s) const
Get one of the predefined "basic" settings.
s the setting to get
Returns the value of the setting, or QString() if not set
QStringList KEMailSettings::profiles() const
Returns the list of profiles available.
void KEMailSettings::setDefault(const QString &def)
Sets a new default.
def the new default
void KEMailSettings::setProfile(const QString &s)
Change the current profile.
s the name of the new profile
void KEMailSettings::setSetting(KEMailSettings::Setting s, const QString &v)
Set one of the predefined "basic" settings.
s the setting to set
v the new value of the setting, or QString() to unset