MailTransport::TransportConfigWidget Class
class MailTransport::TransportConfigWidget| Header: | #include <MailTransport/TransportConfigWidget> |
| CMake: | find_package(KPim6MailTransport REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::MailTransport) |
| Inherits: | QWidget |
Public Functions
| TransportConfigWidget(MailTransport::Transport *transport, QWidget *parent = nullptr) | |
| virtual | ~TransportConfigWidget() override |
Public Slots
| virtual void | apply() |
Detailed Description
@internal
Abstract configuration widget for a mail transport. It makes sure that the configured transport has a unique name, and takes care of writing its settings to the config file. If it is a new transport, the caller must still call TransportManager::addTransport() to register the transport.
Concrete configuration is done in subclasses SMTPConfigWidget.
To configure a transport from applications, use TransportManager::configureTransport(). You still need to call TransportManager::addTransport() if this is a new transport, not registered with TransportManager.
Author: Constantin Berzan <exit3219@gmail.com>
Member Function Documentation
[explicit] TransportConfigWidget::TransportConfigWidget(MailTransport::Transport *transport, QWidget *parent = nullptr)
Creates a new mail transport configuration widget for the given Transport object. transport The Transport object to configure. parent The parent widget.
[override virtual noexcept] TransportConfigWidget::~TransportConfigWidget()
Destroys the widget.
[virtual slot] void TransportConfigWidget::apply()
Saves the transport's settings.
The base implementation writes the settings to the config file and makes sure the transport has a unique name. Reimplement in derived classes to save your custom settings, and call the base implementation.