• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

mailtransport

sendmailconfigwidget.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 "sendmailconfigwidget.h"
00028 #include "transportconfigwidget_p.h"
00029 #include "ui_sendmailsettings.h"
00030 
00031 #include <KStandardDirs>
00032 
00033 using namespace MailTransport;
00034 
00035 class MailTransport::SendmailConfigWidgetPrivate : public TransportConfigWidgetPrivate
00036 {
00037   public:
00038     ::Ui::SendmailSettings ui;
00039 
00040 };
00041 
00042 SendmailConfigWidget::SendmailConfigWidget( Transport *transport, QWidget *parent )
00043   : TransportConfigWidget( *new SendmailConfigWidgetPrivate, transport, parent )
00044 {
00045   init();
00046 }
00047 
00048 SendmailConfigWidget::SendmailConfigWidget( SendmailConfigWidgetPrivate &dd,
00049                                             Transport *transport, QWidget *parent )
00050   : TransportConfigWidget( dd, transport, parent )
00051 {
00052   init();
00053 }
00054 
00055 void SendmailConfigWidget::init()
00056 {
00057   Q_D( SendmailConfigWidget );
00058 
00059   d->ui.setupUi( this );
00060   d->ui.kcfg_host->setMode( KFile::File|KFile::ExistingOnly|KFile::LocalOnly );
00061   d->manager->addWidget( this ); // otherwise it doesn't find out about these widgets
00062   d->manager->updateWidgets();
00063 
00064   if( d->ui.kcfg_host->url().isEmpty() ) {
00065     // Locate sendmail.
00066     // This is imperfect, because it shows the standard path if an empty path
00067     // is saved in the config.
00068     d->ui.kcfg_host->setText( KStandardDirs::findExe( QLatin1String( "sendmail" ) ) );
00069   }
00070 }
00071 
00072 #include "sendmailconfigwidget.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
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • 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.1
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