KCDDB

kcddbconfig.cpp
1 /*
2  SPDX-FileCopyrightText: 2002 Rik Hemsley (rikkus) <[email protected]>
3  SPDX-FileCopyrightText: 2002 Benjamin Meyer <[email protected]>
4  SPDX-FileCopyrightText: 2002 Nadeem Hasan <[email protected]>
5  SPDX-FileCopyrightText: 2003 Richard Lärkäng <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #include <kcddbconfig.h>
11 
12 #include <KEMailSettings>
13 
14 namespace KCDDB
15 {
16  Config::Config()
17  : ConfigBase()
18  {
19  loadEmailSettings();
20  }
21 
22  void Config::loadEmailSettings()
23  {
24  KEMailSettings kes;
25  kes.setProfile( kes.defaultProfileName() );
26 
27  static_cast<KConfigSkeleton::ItemString *>(findItem(QLatin1String( "emailAddress" )))
28  ->setDefaultValue(kes.getSetting( KEMailSettings::EmailAddress ));
29  static_cast<KConfigSkeleton::ItemString *>(findItem(QLatin1String( "replyTo" )))
30  ->setDefaultValue(kes.getSetting( KEMailSettings::ReplyToAddress ));
31  static_cast<KConfigSkeleton::ItemString *>(findItem(QLatin1String( "smtpHostname" )))
32  ->setDefaultValue(kes.getSetting( KEMailSettings::OutServer ));
33  }
34 
35  void Config::reparse()
36  {
37  loadEmailSettings();
38 
39  load();
40  }
41 }
42 
43 // vim:tabstop=2:shiftwidth=2:expandtab:cinoptions=(s,U1,m1
QAction * load(const QObject *recvr, const char *slot, QObject *parent)
QString defaultProfileName() const
void setProfile(const QString &s)
QString getSetting(KEMailSettings::Setting s) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 23:10:08 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.