MailTransport
transportmanager.cpp
110 TransportManager::TransportManager()
122 QDBusConnection::sessionBus().registerObject(DBUS_OBJECT_PATH, this, QDBusConnection::ExportScriptableSlots | QDBusConnection::ExportScriptableSignals);
124 auto watcher = new QDBusServiceWatcher(DBUS_SERVICE_NAME, QDBusConnection::sessionBus(), QDBusServiceWatcher::WatchForUnregistration, this);
129 QDBusConnection::sessionBus().connect(QString(), QString(), DBUS_INTERFACE_NAME, DBUS_CHANGE_SIGNAL, this, SLOT(slotTransportsChanged()));
239 bool TransportManager::showTransportCreationDialog(QWidget *parent, ShowCondition showCondition)
270 bool TransportManager::configureTransport(const QString &identifier, Transport *transport, QWidget *parent)
466 QObject::connect(MailTransport::TransportPluginManager::self(), &TransportPluginManager::updatePluginList, q, &TransportManager::updatePluginList);
472 const QVector<MailTransport::TransportAbstractPlugin *> lstPlugins = MailTransport::TransportPluginManager::self()->pluginsList();
double bounded(double highest)
Transport * createTransport() const
Creates a new, empty Transport object.
Definition: transportmanager.cpp:187
bool connect(const QString &service, const QString &path, const QString &interface, const QString &name, QObject *receiver, const char *slot)
Central transport management interface.
Definition: transportmanager.h:34
Transport * transportByName(const QString &name, bool def=true) const
Returns the transport object with the given name.
Definition: transportmanager.cpp:164
Q_SCRIPTABLE QString defaultTransportName() const
Returns the default transport name.
Definition: transportmanager.cpp:341
Abstract base class for all mail transport jobs.
Definition: transportjob.h:30
Q_SCRIPTABLE int defaultTransportId() const
Returns the default transport identifier.
Definition: transportmanager.cpp:350
Transport * transportById(int id, bool def=true) const
Returns the Transport object with the given id.
Definition: transportmanager.cpp:150
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
QString number(int n, int base)
Transport * clone() const
Returns a deep copy of this Transport object which will no longer be automatically updated.
Definition: transport.cpp:302
virtual Q_SCRIPTABLE void start()=0
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)
Q_EMITQ_EMIT
void result(KJob *job)
int removeAll(const T &value)
Type type(const QSqlDatabase &db)
void addTransport(Transport *transport)
Adds the given transport.
Definition: transportmanager.cpp:195
QList< Transport * > transports() const
Returns a list of all available transports.
Definition: transportmanager.cpp:177
Q_SCRIPTABLE void setDefaultTransport(int id)
Sets the default transport.
Definition: transportmanager.cpp:355
void passwordsChanged()
Emitted when passwords have been loaded from the wallet.
QString getSetting(KEMailSettings::Setting s) const
bool registerObject(const QString &path, QObject *object, QDBusConnection::RegisterOptions options)
int exec(QEventLoop::ProcessEventsFlags flags)
Q_SCRIPTABLE void transportsChanged()
Emitted when transport settings have changed (by this or any other TransportManager instance).
void serviceUnregistered(const QString &serviceName)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void exit(int returnCode)
Q_SCRIPTABLE QVector< int > transportIds() const
Returns a list of transport identifiers.
Definition: transportmanager.cpp:321
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)
QStringList types(Mode mode=Writing)
MAILTRANSPORT_DEPRECATED TransportJob * createTransportJob(int transportId)
Creates a mail transport job for the given transport identifier.
Definition: transportmanager.cpp:279
void reserve(int alloc)
KGuiItem cancel()
Q_SCRIPTABLE QStringList transportNames() const
Returns a list of transport names.
Definition: transportmanager.cpp:331
QString i18n(const char *text, const TYPE &arg...)
The TransportAbstractPluginInfo struct.
Definition: transportabstractplugin.h:20
QDBusConnection sessionBus()
bool registerService(const QString &serviceName)
ShowCondition
Describes when to show the transport creation dialog.
Definition: transportmanager.h:146
The TransportAbstractPlugin class.
Definition: transportabstractplugin.h:31
Q_SCRIPTABLE void changesCommitted()
Internal signal to synchronize all TransportManager instances.
static TransportManager * self()
Returns the TransportManager instance.
Definition: transportmanager.cpp:141
bool contains(const T &value) const const
int toInt(bool *ok, int base) const const
bool isEmpty() const const
Accepted
KSharedConfigPtr config()
void createDefaultTransport()
Tries to create a transport based on KEMailSettings.
Definition: transportmanager.cpp:225
void reserve(int size)
Represents the settings of a specific mail transport.
Definition: transport.h:32
void migrateToWallet()
Try to migrate the password from the config file to the wallet.
Definition: transport.cpp:291
MAILTRANSPORT_DEPRECATED void schedule(TransportJob *job)
Executes the given transport job.
Definition: transportmanager.cpp:208
void passwordLoaded()
Emitted when passwords have been loaded from QKeyChain.
ExportScriptableSlots
bool showTransportCreationDialog(QWidget *parent, ShowCondition showCondition=Always)
Shows a dialog for creating and configuring a new transport.
Definition: transportmanager.cpp:239
const char * name(StandardAction id)
bool needsWalletMigration() const
Returns true if the password was not stored in the wallet.
Definition: transport.cpp:286
void loadPasswordsAsync()
Tries to load passwords asynchronously from KWallet if needed.
Definition: transportmanager.cpp:556
void clear()
void updatePasswordState()
This function synchronizes the password of this transport with the password of the transport with the...
Definition: transport.cpp:93
bool configureTransport(const QString &identifier, Transport *transport, QWidget *parent)
Open a configuration dialog for an existing transport.
Definition: transportmanager.cpp:270
Q_INVOKABLE bool isValid() const
Returns true if this transport is valid, ie.
Definition: transport.cpp:43
@ IfNoTransportExists
Only show the transport creation dialog if no transport currently.
Definition: transportmanager.h:148
Q_SCRIPTABLE bool isEmpty() const
Returns true if there are no mail transports at all.
Definition: transportmanager.cpp:316
QObject * parent() const const
TransportType::List types() const
Returns a list of all available transport types.
Definition: transportmanager.cpp:182
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:371
WatchForUnregistration
QRandomGenerator * global()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Mar 23 2023 04:19:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Mar 23 2023 04:19:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.