MailTransport

transportconfigwidget.cpp
1/*
2 SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
3
4 Based on MailTransport code by:
5 SPDX-FileCopyrightText: 2006-2007 Volker Krause <vkrause@kde.org>
6 SPDX-FileCopyrightText: 2007 KovoKs <kovoks@kovoks.nl>
7
8 Based on KMail code by:
9 SPDX-FileCopyrightText: 2001-2002 Michael Haeckel <haeckel@kde.org>
10
11 SPDX-License-Identifier: LGPL-2.0-or-later
12*/
13
14#include "transportconfigwidget.h"
15#include "transport.h"
16#include "transportconfigwidget_p.h"
17
18#include "mailtransport_debug.h"
19#include <KConfigDialogManager>
20
21using namespace MailTransport;
22
24 : QWidget(parent)
25 , d_ptr(new TransportConfigWidgetPrivate)
26{
27 init(transport);
28}
29
30TransportConfigWidget::TransportConfigWidget(TransportConfigWidgetPrivate &dd, Transport *transport, QWidget *parent)
31 : QWidget(parent)
32 , d_ptr(&dd)
33{
34 init(transport);
35}
36
38
39void TransportConfigWidget::init(Transport *transport)
40{
42 qCDebug(MAILTRANSPORT_LOG) << "this" << this << "d" << d;
43 Q_ASSERT(transport);
44 d->transport = transport;
45
46 d->manager = new KConfigDialogManager(this, transport);
47}
48
50{
52 Q_ASSERT(d->manager);
53 return d->manager;
54}
55
57{
59 d->manager->updateSettings();
60 d->transport->forceUniqueName();
61 d->transport->save();
62 qCDebug(MAILTRANSPORT_LOG) << "Config written.";
63}
64
65#include "moc_transportconfigwidget.cpp"
virtual void apply()
Saves the transport's settings.
KConfigDialogManager * configManager() const
TransportConfigWidget(Transport *transport, QWidget *parent=nullptr)
Creates a new mail transport configuration widget for the given Transport object.
~TransportConfigWidget() override
Destroys the widget.
Represents the settings of a specific mail transport.
Definition transport.h:33
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.