Mailcommon

snippetwidget.h
1/*
2 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include "mailcommon_export.h"
10#include <QAbstractItemModel>
11#include <QWidget>
13class SnippetWidgetPrivate;
14namespace MailCommon
15{
16/**
17 * @brief The SnippetWidget class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class MAILCOMMON_EXPORT SnippetWidget : public QWidget
21{
22 Q_OBJECT
23public:
24 explicit SnippetWidget(QWidget *parent = nullptr);
25 ~SnippetWidget() override;
26
27 void setName(const QString &name);
28 [[nodiscard]] QString name() const;
29
30 void setText(const QString &text);
31 [[nodiscard]] QString text() const;
32
33 void setKeySequence(const QKeySequence &sequence);
34 [[nodiscard]] QKeySequence keySequence() const;
35
36 void setKeyword(const QString &keyword);
37 [[nodiscard]] QString keyword() const;
38
39 void setTo(const QString &keyword);
40 [[nodiscard]] QString to() const;
41
42 void setCc(const QString &keyword);
43 [[nodiscard]] QString cc() const;
44
45 void setBcc(const QString &keyword);
46 [[nodiscard]] QString bcc() const;
47
48 void setGroupModel(QAbstractItemModel *model);
49 void setGroupIndex(const QModelIndex &index);
50
51 [[nodiscard]] QModelIndex groupIndex() const;
52 [[nodiscard]] bool snippetIsValid() const;
53
54 void setCheckActionCollections(const QList<KActionCollection *> &lst);
55
56 void setGroupSelected(bool b);
57
58 [[nodiscard]] bool isGroupSelected() const;
59 void clear();
60
61 [[nodiscard]] bool wasChanged() const;
62 void setWasChanged(bool b);
63
64 void setSubject(const QString &text);
65 [[nodiscard]] QString subject() const;
66
67 void setAttachment(const QString &keyword);
68 [[nodiscard]] QString attachment() const;
69
70Q_SIGNALS:
71 void textChanged(const QString &str);
72 void groupChanged(int index);
73
74private:
75 std::unique_ptr<SnippetWidgetPrivate> const d;
76};
77}
The SnippetWidget class.
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:12:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.