MailCommon::SnippetWidget Class
class MailCommon::SnippetWidgetThe SnippetWidget class. More...
| Header: | #include <MailCommon/SnippetWidget> |
| CMake: | find_package(KPim6MailCommon REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::MailCommon) |
| Inherits: | QWidget |
Public Functions
| SnippetWidget(QWidget *parent = nullptr) | |
| virtual | ~SnippetWidget() override |
| QString | attachment() const |
| QString | bcc() const |
| QString | cc() const |
| void | clear() |
| QModelIndex | groupIndex() const |
| bool | isGroupSelected() const |
| QKeySequence | keySequence() const |
| QString | keyword() const |
| QString | name() const |
| void | setAttachment(const QString &keyword) |
| void | setBcc(const QString &keyword) |
| void | setCc(const QString &keyword) |
| void | setCheckActionCollections(const QList<KActionCollection *> &lst) |
| void | setGroupIndex(const QModelIndex &index) |
| void | setGroupModel(QAbstractItemModel *model) |
| void | setGroupSelected(bool b) |
| void | setKeySequence(const QKeySequence &sequence) |
| void | setKeyword(const QString &keyword) |
| void | setName(const QString &name) |
| void | setSubject(const QString &text) |
| void | setText(const QString &text) |
| void | setTo(const QString &keyword) |
| void | setWasChanged(bool b) |
| bool | snippetIsValid() const |
| QString | subject() const |
| QString | text() const |
| QString | to() const |
| bool | wasChanged() const |
Signals
| void | groupChanged(int index) |
| void | textChanged(const QString &str) |
Detailed Description
Author: Laurent Montel <montel@kde.org>
Member Function Documentation
[explicit] SnippetWidget::SnippetWidget(QWidget *parent = nullptr)
Constructs a snippet widget.
parent The parent widget
[override virtual noexcept] SnippetWidget::~SnippetWidget()
Destroys the snippet widget.
QString SnippetWidget::attachment() const
Returns the attachment path for this snippet.
Returns The attachment path
See also setAttachment().
QString SnippetWidget::bcc() const
Returns the "BCC" email addresses for this snippet.
Returns The email addresses
See also setBcc().
QString SnippetWidget::cc() const
Returns the "CC" email addresses for this snippet.
Returns The email addresses
See also setCc().
void SnippetWidget::clear()
Clears all fields in the widget.
[signal] void SnippetWidget::groupChanged(int index)
Emitted when the group selection has changed.
index The new group index
QModelIndex SnippetWidget::groupIndex() const
Returns the current group index.
Returns The model index of the selected group
See also setGroupIndex().
bool SnippetWidget::isGroupSelected() const
Returns whether a snippet group is selected.
Returns True if a group is selected, false otherwise
QKeySequence SnippetWidget::keySequence() const
Returns the keyboard shortcut for this snippet.
Returns The key sequence
See also setKeySequence().
QString SnippetWidget::keyword() const
Returns the keyword that triggers this snippet.
Returns The trigger keyword
See also setKeyword().
QString SnippetWidget::name() const
Returns the name of the snippet.
Returns The snippet name
See also setName().
void SnippetWidget::setAttachment(const QString &keyword)
Sets the attachment path for this snippet.
keyword The attachment path
See also attachment().
void SnippetWidget::setBcc(const QString &keyword)
Sets the "BCC" email addresses for this snippet.
keyword The email addresses
See also bcc().
void SnippetWidget::setCc(const QString &keyword)
Sets the "CC" email addresses for this snippet.
keyword The email addresses
See also cc().
void SnippetWidget::setCheckActionCollections(const QList<KActionCollection *> &lst)
Sets the action collections for checking keyboard shortcut conflicts.
lst The list of action collections
void SnippetWidget::setGroupIndex(const QModelIndex &index)
Sets the current group index.
index The model index of the group
See also groupIndex().
void SnippetWidget::setGroupModel(QAbstractItemModel *model)
Sets the group model for organizing snippets.
model The abstract item model
void SnippetWidget::setGroupSelected(bool b)
Sets whether the snippet group is selected.
b True if the group is selected
See also isGroupSelected().
void SnippetWidget::setKeySequence(const QKeySequence &sequence)
Sets the keyboard shortcut for this snippet.
sequence The key sequence
See also keySequence().
void SnippetWidget::setKeyword(const QString &keyword)
Sets the keyword that triggers this snippet.
keyword The trigger keyword
See also keyword().
void SnippetWidget::setName(const QString &name)
Sets the name of the snippet.
name The snippet name
See also name().
void SnippetWidget::setSubject(const QString &text)
Sets the subject line for this snippet.
text The subject text
See also subject().
void SnippetWidget::setText(const QString &text)
Sets the text content of the snippet.
text The snippet text
See also text().
void SnippetWidget::setTo(const QString &keyword)
Sets the "To" email address for this snippet.
keyword The email address
See also to().
void SnippetWidget::setWasChanged(bool b)
Sets the modified state of the snippet.
b True if the snippet was changed
See also wasChanged().
bool SnippetWidget::snippetIsValid() const
Checks if the snippet is valid for saving.
Returns True if the snippet is valid, false otherwise
QString SnippetWidget::subject() const
Returns the subject line for this snippet.
Returns The subject text
See also setSubject().
QString SnippetWidget::text() const
Returns the text content of the snippet.
Returns The snippet text
See also setText().
[signal] void SnippetWidget::textChanged(const QString &str)
Emitted when the text content of the snippet has changed.
str The new text
QString SnippetWidget::to() const
Returns the "To" email address for this snippet.
Returns The email address
See also setTo().
bool SnippetWidget::wasChanged() const
Returns whether the snippet was modified.
Returns True if the snippet was changed
See also setWasChanged().