KConfig

kemailsettings.h
1 /*
2  SPDX-FileCopyrightText: 2000 Alex Zepeda <[email protected]>
3 
4  SPDX-License-Identifier: BSD-2-Clause
5 */
6 
7 #ifndef _KEMAILSETTINGS_H
8 #define _KEMAILSETTINGS_H
9 
10 #include <QCoreApplication> // Q_DECLARE_TR_FUNCTIONS
11 #include <QStringList>
12 
13 #include <kconfigcore_export.h>
14 
15 class KEMailSettingsPrivate;
16 
28 class KCONFIGCORE_EXPORT KEMailSettings
29 {
30  Q_DECLARE_TR_FUNCTIONS(KEMailSettings)
31 public:
41  enum Setting {
42  ClientProgram,
43  ClientTerminal,
44  RealName,
45  EmailAddress,
46  ReplyToAddress,
48  OutServer,
49  OutServerLogin,
50  OutServerPass,
51 #if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0)
52 
64 #else
65  OutServerType_DEPRECATED_DO_NOT_USE,
66  OutServerCommand_DEPRECATED_DO_NOT_USE,
67  OutServerTLS_DEPRECATED_DO_NOT_USE,
68 #endif
69  InServer,
70  InServerLogin,
71  InServerPass,
72 #if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0)
73 
84  InServerTLS
85 #endif
86  };
87 
91  enum Extension {
92  POP3,
93  SMTP,
94  OTHER
95  };
96 
101  KEMailSettings();
102 
103  KEMailSettings(const KEMailSettings &) = delete;
104  KEMailSettings& operator=(const KEMailSettings &) = delete;
105 
109  ~KEMailSettings();
110 
115  QStringList profiles() const;
116 
117 #if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0)
118 
123  KCONFIGCORE_DEPRECATED_VERSION(5, 0, "API planned to be changed")
124  QString currentProfileName() const;
125  // see https://git.reviewboard.kde.org/r/111910/
126 #endif
127 
132  void setProfile(const QString &s);
133 
138  QString defaultProfileName() const;
139 
144  void setDefault(const QString &def);
145 
152  QString getSetting(KEMailSettings::Setting s) const;
153 
160  void setSetting(KEMailSettings::Setting s, const QString &v);
161 
162 private:
163  KEMailSettingsPrivate *const p;
164 };
165 
166 #endif
Organization
Setting
The list of settings that I thought of when I wrote this class.
Extension
The various extensions allowed.
This is just a small class to facilitate accessing e-mail settings in a sane way, and allowing any pr...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 22:48:41 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.