MailTransport
transportmanagementwidgetng.cpp
37TransportManagementWidgetNgPrivate::TransportManagementWidgetNgPrivate(TransportManagementWidgetNg *parent)
68 connect(d->ui.transportTreeView, &QTreeView::customContextMenuRequested, this, [this](QPoint p) {
71 connect(d->ui.transportTreeView->selectionModel(), &QItemSelectionModel::selectionChanged, this, [this]() {
74 connect(d->ui.transportOnCurrentActivity, &QCheckBox::checkStateChanged, this, [this](Qt::CheckState state) {
90void TransportManagementWidgetNg::setTransportActivitiesAbstract(TransportActivitiesAbstract *activitiesAbstract)
111 if (index.data(TransportModel::TransportRoles::DefaultRole).toInt() == TransportManager::self()->defaultTransportId()) {
133 const QModelIndex modelIndex = ui.transportTreeView->model()->index(index.row(), TransportModel::TransportRoles::TransportIdentifierRole);
155 ? i18n("Do you want to remove outgoing account '%1'?", ui.transportTreeView->selectionModel()->selectedRows().constFirst().data().toString())
156 : i18np("Do you really want to remove this %1 outgoing account?", "Do you really want to remove these %1 outgoing accounts?", nbAccount);
159 KMessageBox::questionTwoActions(q, msg, i18nc("@title:window", "Remove outgoing account?"), KStandardGuiItem::remove(), KStandardGuiItem::cancel());
167 const QModelIndex modelIndex = ui.transportTreeView->model()->index(index.row(), TransportModel::TransportRoles::TransportIdentifierRole);
182 const QModelIndex modelIndex = ui.transportTreeView->model()->index(index.row(), TransportModel::TransportRoles::TransportIdentifierRole);
189 menu.addAction(QIcon::fromTheme(QStringLiteral("list-add")), i18nc("@action:inmenu", "Add…"), q, [this]() {
194 menu.addAction(QIcon::fromTheme(QStringLiteral("document-edit")), i18nc("@action:inmenu", "Modify…"), q, [this]() {
197 menu.addAction(QIcon::fromTheme(QStringLiteral("edit-rename")), i18nc("@action:inmenu", "Rename"), q, [this]() {
201 menu.addAction(QIcon::fromTheme(QStringLiteral("list-remove")), i18nc("@action:inmenu", "Remove"), q, [this]() {
205 if (index.data(TransportModel::TransportRoles::DefaultRole).toInt() != TransportManager::self()->defaultTransportId()) {
A widget to manage mail transports.
Definition transportmanagementwidgetng.h:24
~TransportManagementWidgetNg() override
Destroys the widget.
Q_SCRIPTABLE void removeTransport(int id)
Deletes the specified transport.
Definition transportmanager.cpp:348
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
static TransportManager * self()
Returns the TransportManager instance.
Definition transportmanager.cpp:131
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
Q_SCRIPTABLE int defaultTransportId() const
Returns the default transport identifier.
Definition transportmanager.cpp:327
Represents the settings of a specific mail transport.
Definition transport.h:33
QString i18np(const char *singular, const char *plural, const TYPE &arg...)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
ButtonCode questionTwoActions(QWidget *parent, const QString &text, const QString &title, const KGuiItem &primaryAction, const KGuiItem &secondaryAction, const QString &dontAskAgainName=QString(), Options options=Notify)
KGuiItem remove()
KGuiItem cancel()
void clicked(bool checked)
void doubleClicked(const QModelIndex &index)
QIcon fromTheme(const QString &name)
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
void reserve(qsizetype size)
QVariant data(int role) const const
bool isValid() const const
int row() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
CheckState
CustomContextMenu
int toInt(bool *ok) const const
void customContextMenuRequested(const QPoint &pos)
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
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.