Mailcommon
snippetsmanager.cpp
2 SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
237 dlg->setKeySequence(QKeySequence::fromString(index.data(SnippetsModel::KeySequenceRole).toString()));
242 q->connect(dlg, &SnippetDialog::accepted, q, [dlg, this, oldGroupIndex, index, oldSnippetName]() {
297 Q_EMIT mModel->updateActionCollection(snippetName, QString(), QKeySequence(), QString(), QString(), QString(), QString(), QString(), QString());
423 initializeAction(info.newName, info.keySequence, info.text, info.subject, info.to, info.cc, info.bcc, info.attachment);
491 iFound = text.indexOf(QRegularExpression(QStringLiteral("\\$[A-Za-z\\-_0-9\\s]*\\$")), iEnd + 1);
499 QPointer<SnippetVariableDialog> dlg = new SnippetVariableDialog(variableName, &tempLocalVariables, mParent);
536 SnippetsManager::SnippetsManager(KActionCollection *actionCollection, QObject *parent, QWidget *parentWidget)
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
QString xi18nc(const char *context, const char *text, const TYPE &arg...)
QAction * deleteSnippetAction() const
Returns the action that handles deleting the currently selected snippet.
Definition: snippetsmanager.cpp:641
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)
QAction * editSnippetAction() const
Returns the action that handles editing the currently selected snippet.
Definition: snippetsmanager.cpp:636
QIcon fromTheme(const QString &name)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QItemSelectionModel * selectionModel() const
Returns the selection model that is used by the manager to select the snippet or snippet group to wor...
Definition: snippetsmanager.cpp:626
QAction * addSnippetGroupAction() const
Returns the action that handles adding new snippet groups.
Definition: snippetsmanager.cpp:646
QAction * deleteSnippetGroupAction() const
Returns the action that handles deleting the currently selected snippet group.
Definition: snippetsmanager.cpp:656
ClearAndSelect
QVariant data(int role) const const
QString selectedName() const
Returns the name of the currently selected snippet or snippet group.
Definition: snippetsmanager.cpp:675
QAction * insertSnippetAction() const
Returns the action that handles inserting a snippet into the editor.
Definition: snippetsmanager.cpp:661
QString i18n(const char *text, const TYPE &arg...)
bool isEmpty() const const
void setText(const QString &text)
KGuiItem remove()
QAction * addSnippetAction() const
Returns the action that handles adding new snippets.
Definition: snippetsmanager.cpp:631
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const const
bool isValid() const const
bool toBool() const const
QString & replace(int position, int n, QChar after)
int row() const const
QKeySequence fromString(const QString &str, QKeySequence::SequenceFormat format)
bool setProperty(const char *name, const QVariant &value)
bool snippetGroupSelected() const
Returns whether the currently selected item is a snippet group.
Definition: snippetsmanager.cpp:666
void triggered(bool checked)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QAbstractItemModel * model() const
Returns the model that represents the snippets.
Definition: snippetsmanager.cpp:621
QModelIndex parent() const const
QChar * data()
SnippetsManager(KActionCollection *actionCollection, QObject *parent=nullptr, QWidget *widget=nullptr)
Creates a new snippets manager.
Definition: snippetsmanager.cpp:536
QString mid(int position, int n) const const
QAction * editSnippetGroupAction() const
Returns the action that handles editing the currently selected snippet group.
Definition: snippetsmanager.cpp:651
QString toString() const const
QAction * save(const QObject *recvr, const char *slot, QObject *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Oct 1 2023 04:00:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Oct 1 2023 04:00:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.