• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

mailtransport

transportconfigwidget.cpp

00001 /*
00002     Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com>
00003 
00004     Based on MailTransport code by:
00005     Copyright (c) 2006 - 2007 Volker Krause <vkrause@kde.org>
00006     Copyright (c) 2007 KovoKs <kovoks@kovoks.nl>
00007 
00008     Based on KMail code by:
00009     Copyright (c) 2001-2002 Michael Haeckel <haeckel@kde.org>
00010 
00011     This library is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU Library General Public License as published by
00013     the Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     This library is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00019     License for more details.
00020 
00021     You should have received a copy of the GNU Library General Public License
00022     along with this library; see the file COPYING.LIB.  If not, write to the
00023     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00024     02110-1301, USA.
00025 */
00026 
00027 #include "transportconfigwidget.h"
00028 #include "transportconfigwidget_p.h"
00029 #include "transport.h"
00030 #include "transportmanager.h"
00031 
00032 #include <KConfigDialogManager>
00033 #include <KDebug>
00034 
00035 using namespace MailTransport;
00036 
00037 TransportConfigWidget::TransportConfigWidget( Transport *transport, QWidget *parent )
00038   : QWidget( parent ), d_ptr( new TransportConfigWidgetPrivate )
00039 {
00040   init( transport );
00041 }
00042 
00043 TransportConfigWidget::TransportConfigWidget( TransportConfigWidgetPrivate &dd,
00044                                               Transport *transport, QWidget *parent )
00045   : QWidget( parent ), d_ptr( &dd )
00046 {
00047   init( transport );
00048 }
00049 
00050 TransportConfigWidget::~ TransportConfigWidget()
00051 {
00052   delete d_ptr;
00053 }
00054 
00055 void TransportConfigWidget::init( Transport *transport )
00056 {
00057   Q_D( TransportConfigWidget );
00058   kDebug() << "this" << this << "d" << d;
00059   Q_ASSERT( transport );
00060   d->transport = transport;
00061 
00062   d->manager = new KConfigDialogManager( this, transport );
00063   //d->manager->updateWidgets(); // no-op; ui is set up in subclasses.
00064 }
00065 
00066 KConfigDialogManager *TransportConfigWidget::configManager() const
00067 {
00068   Q_D( const TransportConfigWidget );
00069   Q_ASSERT( d->manager );
00070   return d->manager;
00071 }
00072 
00073 void TransportConfigWidget::apply()
00074 {
00075   Q_D( TransportConfigWidget );
00076   d->manager->updateSettings();
00077   d->transport->forceUniqueName();
00078   d->transport->writeConfig();
00079   kDebug() << "Config written.";
00080 }
00081 
00082 #include "transportconfigwidget.moc"

mailtransport

Skip menu "mailtransport"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal