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->ui.kcfg_host->setFocus(); 00062 d->manager->addWidget( this ); // otherwise it doesn't find out about these widgets 00063 d->manager->updateWidgets(); 00064 00065 if( d->ui.kcfg_host->url().isEmpty() ) { 00066 // Locate sendmail. 00067 // This is imperfect, because it shows the standard path if an empty path 00068 // is saved in the config. 00069 d->ui.kcfg_host->setText( KStandardDirs::findExe( QLatin1String( "sendmail" ) ) ); 00070 } 00071 } 00072 00073 #include "sendmailconfigwidget.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 7 2012 23:58:59 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 7 2012 23:58:59 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.