KConfig 5.109.0
Public Types | Public Member Functions | List of all members
KEMailSettings

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. More...

#include <KEMailSettings>

Public Types

enum  Extension { POP3 , SMTP , OTHER }
 The various extensions allowed. More...
 
enum  Setting {
  ClientProgram , ClientTerminal , RealName , EmailAddress ,
  ReplyToAddress , Organization , OutServer , OutServerLogin ,
  OutServerPass , OutServerType , OutServerCommand , OutServerTLS ,
  InServer , InServerLogin , InServerPass , InServerType ,
  InServerMBXType , InServerTLS
}
 The list of settings that I thought of when I wrote this class. More...
 

Public Member Functions

 KEMailSettings ()
 Default constructor, just sets things up and sets the default profile as the current profile.
 
 KEMailSettings (const KEMailSettings &)=delete
 
 ~KEMailSettings ()
 Default destructor, nothing to see here.
 
QString currentProfileName () const
 Returns the name of the current profile.
 
QString defaultProfileName () const
 Returns the name of the default profile.
 
QString getSetting (KEMailSettings::Setting s) const
 Get one of the predefined "basic" settings.
 
KEMailSettingsoperator= (const KEMailSettings &)=delete
 
QStringList profiles () const
 List of profiles available.
 
void setDefault (const QString &def)
 Sets a new default.
 
void setProfile (const QString &s)
 Change the current profile.
 
void setSetting (KEMailSettings::Setting s, const QString &v)
 Set one of the predefined "basic" settings.
 

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.

Author
Alex Zepeda zipzi.nosp@m.ppy@.nosp@m.sonic.nosp@m..net

Member Enumeration Documentation

◆ Extension

The various extensions allowed.

◆ Setting

The list of settings that I thought of when I wrote this class.

Any extra settings thought of later can be accessed easily with getExtendedSetting and setExtendedSetting.

See also
getSetting()
setSetting()
getExtendedSetting()
setExtendedSetting()
Enumerator
OutServerType 
Deprecated:
since 5.0
OutServerCommand 
Deprecated:
since 5.0
OutServerTLS 
Deprecated:
since 5.0
InServerType 
Deprecated:
since 5.0
InServerMBXType 
Deprecated:
since 5.0
InServerTLS 
Deprecated:
since 5.0

Constructor & Destructor Documentation

◆ KEMailSettings()

KEMailSettings::KEMailSettings ( )

Default constructor, just sets things up and sets the default profile as the current profile.

◆ ~KEMailSettings()

KEMailSettings::~KEMailSettings ( )

Default destructor, nothing to see here.

Member Function Documentation

◆ currentProfileName()

QString KEMailSettings::currentProfileName ( ) const

Returns the name of the current profile.

Returns
what profile we're currently using
Deprecated:
Since 5.0

◆ defaultProfileName()

QString KEMailSettings::defaultProfileName ( ) const

Returns the name of the default profile.

Returns
the name of the one that's currently default QString() if none

◆ getSetting()

QString KEMailSettings::getSetting ( KEMailSettings::Setting  s) const

Get one of the predefined "basic" settings.

Parameters
sthe setting to get
Returns
the value of the setting, or QString() if not set

◆ profiles()

QStringList KEMailSettings::profiles ( ) const

List of profiles available.

Returns
the list of profiles

◆ setDefault()

void KEMailSettings::setDefault ( const QString &  def)

Sets a new default.

Parameters
defthe new default

◆ setProfile()

void KEMailSettings::setProfile ( const QString &  s)

Change the current profile.

Parameters
sthe name of the new profile

◆ setSetting()

void KEMailSettings::setSetting ( KEMailSettings::Setting  s,
const QString &  v 
)

Set one of the predefined "basic" settings.

Parameters
sthe setting to set
vthe new value of the setting, or QString() to unset