MailTransport
transportmanager.cpp
112 QDBusConnection::sessionBus().registerObject(DBUS_OBJECT_PATH, this, QDBusConnection::ExportScriptableSlots | QDBusConnection::ExportScriptableSignals);
114 auto watcher = new QDBusServiceWatcher(DBUS_SERVICE_NAME, QDBusConnection::sessionBus(), QDBusServiceWatcher::WatchForUnregistration, this);
119 QDBusConnection::sessionBus().connect(QString(), QString(), DBUS_INTERFACE_NAME, DBUS_CHANGE_SIGNAL, this, SLOT(slotTransportsChanged()));
247bool TransportManager::configureTransport(const QString &identifier, Transport *transport, QWidget *parent)
443 QObject::connect(MailTransport::TransportPluginManager::self(), &TransportPluginManager::updatePluginList, q, &TransportManager::updatePluginList);
449 const QList<MailTransport::TransportAbstractPlugin *> lstPlugins = MailTransport::TransportPluginManager::self()->pluginsList();
void reparseConfiguration()
bool sync() override
QStringList groupList() const override
void result(KJob *job)
The TransportAbstractPlugin class.
Definition transportabstractplugin.h:32
Abstract base class for all mail transport jobs.
Definition transportjob.h:31
Transport * transport() const
Returns the Transport object containing the mail transport settings.
Definition transportjob.cpp:67
Central transport management interface.
Definition transportmanager.h:35
MAILTRANSPORT_DEPRECATED void schedule(TransportJob *job)
Executes the given transport job.
Definition transportmanager.cpp:199
Q_SCRIPTABLE QStringList transportNames() const
Returns a list of transport names.
Definition transportmanager.cpp:308
void transportRemoved(int id, const QString &name)
Emitted when a transport is deleted.
Q_SCRIPTABLE void removeTransport(int id)
Deletes the specified transport.
Definition transportmanager.cpp:348
Q_SCRIPTABLE void changesCommitted()
Internal signal to synchronize all TransportManager instances.
void loadPasswordsAsync()
Tries to load passwords asynchronously from KWallet if needed.
Definition transportmanager.cpp:533
void passwordsChanged()
Emitted when passwords have been loaded from the wallet.
TransportType::List types() const
Returns a list of all available transport types.
Definition transportmanager.cpp:172
MAILTRANSPORT_DEPRECATED TransportJob * createTransportJob(Transport::Id transportId)
Creates a mail transport job for the given transport identifier.
Definition transportmanager.cpp:256
Q_SCRIPTABLE void setDefaultTransport(int id)
Sets the default transport.
Definition transportmanager.cpp:332
Transport * transportById(Transport::Id id, bool def=true) const
Returns the Transport object with the given id.
Definition transportmanager.cpp:140
Q_SCRIPTABLE QString defaultTransportName() const
Returns the default transport name.
Definition transportmanager.cpp:318
Q_SCRIPTABLE void transportsChanged()
Emitted when transport settings have changed (by this or any other TransportManager instance).
static TransportManager * self()
Returns the TransportManager instance.
Definition transportmanager.cpp:131
Transport * transportByName(const QString &name, bool def=true) const
Returns the transport object with the given name.
Definition transportmanager.cpp:154
bool showTransportCreationDialog(QWidget *parent, ShowCondition showCondition=Always)
Shows a dialog for creating and configuring a new transport.
Definition transportmanager.cpp:216
bool configureTransport(const QString &identifier, Transport *transport, QWidget *parent)
Open a configuration dialog for an existing transport.
Definition transportmanager.cpp:247
@ IfNoTransportExists
Only show the transport creation dialog if no transport currently.
Definition transportmanager.h:142
Q_SCRIPTABLE bool isEmpty() const
Returns true if there are no mail transports at all.
Definition transportmanager.cpp:293
Q_SCRIPTABLE int defaultTransportId() const
Returns the default transport identifier.
Definition transportmanager.cpp:327
QList< Transport * > transports() const
Returns a list of all available transports.
Definition transportmanager.cpp:167
Q_SCRIPTABLE QList< int > transportIds() const
Returns a list of transport identifiers.
Definition transportmanager.cpp:298
TransportManager()
Singleton class, the only instance resides in the static object sSelf.
Definition transportmanager.cpp:105
Transport * createTransport() const
Creates a new, empty Transport object.
Definition transportmanager.cpp:177
Represents the settings of a specific mail transport.
Definition transport.h:33
void migrateToWallet()
Try to migrate the password from the config file to the wallet.
Definition transport.cpp:286
void passwordLoaded()
Emitted when passwords have been loaded from QKeyChain.
bool needsWalletMigration() const
Returns true if the password was not stored in the wallet.
Definition transport.cpp:281
Transport * clone() const
Returns a deep copy of this Transport object which will no longer be automatically updated.
Definition transport.cpp:297
void updatePasswordState()
This function synchronizes the password of this transport with the password of the transport with the...
Definition transport.cpp:88
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
Internal file containing constant definitions etc.
Type type(const QSqlDatabase &db)
ButtonCode warningContinueCancel(QWidget *parent, const QString &text, const QString &title=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
Continue
ButtonCode questionTwoActionsList(QWidget *parent, const QString &text, const QStringList &strlist, const QString &title, const KGuiItem &primaryAction, const KGuiItem &secondaryAction, const QString &dontAskAgainName=QString(), Options options=Notify)
QString name(StandardAction id)
KGuiItem cancel()
ExportScriptableSlots
bool connect(const QString &service, const QString &path, const QString &interface, const QString &name, QObject *receiver, const char *slot)
bool registerObject(const QString &path, QObject *object, RegisterOptions options)
bool registerService(const QString &serviceName)
QDBusConnection sessionBus()
WatchForUnregistration
void serviceUnregistered(const QString &serviceName)
Accepted
int exec(ProcessEventsFlags flags)
void exit(int returnCode)
void clear()
bool contains(const AT &value) const const
bool isEmpty() const const
void reserve(qsizetype size)
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
QObject * parent() const const
double bounded(double highest)
QRandomGenerator * global()
bool isEmpty() const const
QString number(double n, char format, int precision)
int toInt(bool *ok, int base) const const
QStringList filter(QStringView str, Qt::CaseSensitivity cs) const const
The TransportAbstractPluginInfo struct.
Definition transportabstractplugin.h:20
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.