Libksieve
managesievewidget.cpp
63 connect(d->mTreeView, &ManageSieveTreeView::customContextMenuRequested, this, &ManageSieveWidget::slotContextMenuRequested);
65 connect(d->mTreeView, &ManageSieveTreeView::itemDoubleClicked, this, &ManageSieveWidget::slotDoubleClicked);
66 connect(d->mTreeView, &ManageSieveTreeView::itemSelectionChanged, this, &ManageSieveWidget::slotUpdateButtons);
67 connect(d->mTreeView, &ManageSieveTreeView::itemChanged, this, &ManageSieveWidget::slotItemChanged);
68 connect(this, &ManageSieveWidget::updateSieveSettingsDone, this, &ManageSieveWidget::updateSieveSettingsFinished);
81 disconnect(d->mTreeView, &ManageSieveTreeView::itemSelectionChanged, this, &ManageSieveWidget::slotUpdateButtons);
87 slotSystemNetworkOnlineStateChanged(PimCommon::NetworkManager::self()->networkConfigureManager()->isOnline());
155 menu.addAction(QIcon::fromTheme(QStringLiteral("edit-rename")), i18n("Rename Script..."), this, &ManageSieveWidget::slotRenameScript);
157 menu.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18n("Delete Script"), this, &ManageSieveWidget::slotDeleteScript);
166 menu.addAction(QIcon::fromTheme(QStringLiteral("document-new")), i18n("New Script..."), this, &ManageSieveWidget::slotNewScript);
168 menu.addAction(KStandardGuiItem::cancel().icon(), KStandardGuiItem::cancel().text(), this, &ManageSieveWidget::slotCancelFetch);
231 QInputDialog::getText(this, i18n("New Sieve Script"), i18n("Please enter a name for the new Sieve script:"), QLineEdit::Normal, i18n("unnamed"), &ok);
259 const QStringList currentCapabilities = currentItem->data(0, SIEVE_SERVER_CAPABILITIES).toStringList();
266 newItem->setFlags(newItem->flags() & (Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable));
296 const KSieveUi::SieveImapAccountSettings sieveimapaccountsettings = parent->data(0, SIEVE_SERVER_IMAP_SETTINGS).value<KSieveUi::SieveImapAccountSettings>();
297 const QStringList currentCapabilities = parent->data(0, SIEVE_SERVER_CAPABILITIES).toStringList();
350 connect(job, &GenerateGlobalScriptJob::error, this, &ManageSieveWidget::slotGenerateGlobalScriptError);
374 qCWarning(LIBKSIEVE_LOG) << "MManageSieveWidget::slotGenerateGlobalScriptError: error: " << errorStr;
420 const QString newName = QInputDialog::getText(this, i18n("Rename Script"), i18n("Script Name:"), QLineEdit::Normal, currentItem->text(0));
444 void ManageSieveWidget::slotRenameFinished(const QUrl &oldUrl, const QUrl &newUrl, const QString &errorStr, bool success)
446 qCDebug(LIBKSIEVE_LOG) << " void ManageSieveWidget::slotRenameResult(KManageSieve::SieveJob *job, bool success)" << success;
458 qCDebug(LIBKSIEVE_LOG) << " void ManageSieveWidget::slotRenameResult(KManageSieve::SieveJob *job, bool success)" << success;
534 void ManageSieveWidget::slotGotList(KManageSieve::SieveJob *job, bool success, const QStringList &listScript, const QString &activeScript)
536 // qCDebug(LIBKSIEVE_LOG) << "void ManageSieveWidget::slotGotList(KManageSieve::SieveJob *job, bool success, const QStringList &listScript, const QString
568 item->setFlags(item->flags() & (Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable));
579 bool hasKep14EditorMode = Util::hasKep14Support(job->sieveCapabilities(), listScript, activeScript);
590 } else if (Util::hasKep14CapabilitySupport(job->sieveCapabilities())) { // We don't have user script but server support kep14
597 parent->setData(0, SIEVE_SERVER_IMAP_SETTINGS, QVariant::fromValue(job->property("sieveimapaccountsettings").value<KSieveUi::SieveImapAccountSettings>()));
646 void ManageSieveWidget::enableDisableActions(bool &newScriptAction, bool &editScriptAction, bool &deleteScriptAction, bool &desactivateScriptAction)
void customContextMenuRequested(const QPoint &pos)
RemoveFilename
void itemChanged(QTreeWidgetItem *item, int column)
Definition: autocreatescriptdialog.h:13
Qt::CheckState checkState(int column) const const
QString name(const QVariant &location)
static SieveJob * activate(const QUrl &url)
Activates the script with the given sieve url.
Definition: sievejob.cpp:380
KGuiItem ok()
QTreeWidgetItem * child(int index) const const
QMap::const_iterator constBegin() const const
const QObjectList & children() const const
bool contains(const QString &str, Qt::CaseSensitivity cs) const const
void result(KManageSieve::SieveJob *job, bool success, const QString &script, bool active)
This signal is emitted for all kind of jobs when they have finished.
T value() const const
static SieveJob * del(const QUrl &url)
Deletes the script with the given sieve url.
Definition: sievejob.cpp:327
virtual void setData(int column, int role, const QVariant &value)
void onlineStateChanged(bool isOnline)
virtual QVariant data(int column, int role) const const
void clear()
KGuiItem cancel()
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool isEmpty() const const
void clear()
KGuiItem del()
void setPath(const QString &path, QUrl::ParsingMode mode)
Normal
void setFlags(Qt::ItemFlags flags)
enabled
QVariant property(const char *name) const const
ButtonCode warningContinueCancel(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
int toInt(bool *ok) const const
bool isEmpty() const const
bool isEmpty() const const
QString trimmed() const const
QMap::const_iterator constEnd() const const
void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
QString path(QUrl::ComponentFormattingOptions options) const const
QStringList sieveCapabilities() const
Returns the sieve capabilities of the IMAP server.
Definition: sievejob.cpp:254
QTreeWidgetItem * currentItem() const const
void addChild(QTreeWidgetItem *child)
QString getText(QWidget *parent, const QString &title, const QString &label, QLineEdit::EchoMode mode, const QString &text, bool *ok, Qt::WindowFlags flags, Qt::InputMethodHints inputMethodHints)
QVariant fromValue(const T &value)
QTreeWidgetItem * parent() const const
QAbstractItemView::State state() const const
const Key key(const T &value, const Key &defaultKey) const const
QString i18n(const char *text, const TYPE &arg...)
void itemSelectionChanged()
void setCheckState(int column, Qt::CheckState state)
Qt::ItemFlags flags() const const
QStringList toStringList() const const
QUrl adjusted(QUrl::FormattingOptions options) const const
Definition: response.h:12
void setText(int column, const QString &text)
bool toBool() const const
Unchecked
bool isValid() const const
The SieveImapAccountSettings class.
Definition: sieveimapaccountsettings.h:17
QIcon fromTheme(const QString &name)
QMap::iterator insert(const Key &key, const T &value)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QList< QAction * > actions() const const
QObject * parent() const const
int childCount() const const
QString text(int column) const const
static SieveJob * deactivate(const QUrl &url)
Deactivates the script with the given sieve url.
Definition: sievejob.cpp:340
void itemDoubleClicked(QTreeWidgetItem *item, int column)
static SieveJob * rename(const QUrl &url, const QString &newName)
Rename the script with the given sieve url and new name newName.
Definition: sievejob.cpp:352
Q_EMITQ_EMIT
QTreeWidgetItem * takeChild(int index)
singleShot
ItemIsUserCheckable
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Apr 17 2021 23:09:33 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Apr 17 2021 23:09:33 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.