• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kontact

  • sources
  • kde-4.12
  • kdepim
  • kontact
  • src
kontactconfiguredialog.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KMail, the KDE mail client.
3  Copyright (c) 2012 Montel Laurent <montel@kde.org>
4 
5  KMail is free software; you can redistribute it and/or modify it
6  under the terms of the GNU General Public License, version 2, as
7  published by the Free Software Foundation.
8 
9  KMail is distributed in the hope that it will be useful, but
10  WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License along
15  with this program; if not, write to the Free Software Foundation, Inc.,
16  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 #include "kontactconfiguredialog.h"
19 
20 #include <KDebug>
21 
22 #include <QDBusReply>
23 #include <QDBusInterface>
24 
25 using namespace Kontact;
26 
27 KontactConfigureDialog::KontactConfigureDialog( QWidget *parent )
28  : KSettings::Dialog( parent )
29 {
30  connect( this, SIGNAL(okClicked()), SLOT(slotOk()) );
31  connect( this, SIGNAL(applyClicked()), SLOT(slotApply()) );
32 }
33 
34 KontactConfigureDialog::~KontactConfigureDialog()
35 {
36 }
37 
38 void KontactConfigureDialog::emitConfigChanged()
39 {
40  //Add code from plugins which needs to be call when we close kontact dialog config
41  QDBusInterface iface( QLatin1String("org.kde.kmail"), QLatin1String("/KMail"), QLatin1String("org.kde.kmail.kmail"),
42  QDBusConnection::sessionBus() );
43  if ( !iface.isValid() ) {
44  return;
45  }
46 
47  QDBusReply<void> reply;
48  if ( !( reply = iface.call( QLatin1String("updateConfig") ) ).isValid() ) {
49  QDBusError err = iface.lastError();
50  kError() << "Communication problem with KMail. "
51  << "Error message was:" << err.name() << ": \"" << err.message() << "\"";
52  }
53 }
54 
55 void KontactConfigureDialog::slotApply()
56 {
57  slotApplyClicked();
58  emitConfigChanged();
59 }
60 
61 void KontactConfigureDialog::slotOk()
62 {
63  slotOkClicked();
64  emitConfigChanged();
65 }
66 
67 #include "kontactconfiguredialog.moc"
QWidget
Kontact::KontactConfigureDialog::slotOk
void slotOk()
Definition: kontactconfiguredialog.cpp:61
kontactconfiguredialog.h
Kontact::KontactConfigureDialog::KontactConfigureDialog
KontactConfigureDialog(QWidget *parent=0)
Definition: kontactconfiguredialog.cpp:27
Kontact::KontactConfigureDialog::slotApply
void slotApply()
Definition: kontactconfiguredialog.cpp:55
Kontact::KontactConfigureDialog::emitConfigChanged
void emitConfigChanged()
Definition: kontactconfiguredialog.cpp:38
Kontact::KontactConfigureDialog::~KontactConfigureDialog
~KontactConfigureDialog()
Definition: kontactconfiguredialog.cpp:34
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:30 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kontact

Skip menu "kontact"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal