Mailcommon

snippetdialog.h
1/*
2 snippet feature from kdevelop/plugins/snippet/
3
4 SPDX-FileCopyrightText: 2007 Robert Gruber <rgruber@users.sourceforge.net>
5 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include <QDialog>
13
15
17class QModelIndex;
18class QPushButton;
19
20namespace MailCommon
21{
22class SnippetWidget;
23class SnippetDialog : public QDialog
24{
26
27public:
28 explicit SnippetDialog(KActionCollection *actionCollection, bool inGroupMode, QWidget *parent = nullptr);
29 ~SnippetDialog() override;
30
31 void setName(const QString &name);
32 [[nodiscard]] QString name() const;
33
34 void setText(const QString &text);
35 [[nodiscard]] QString text() const;
36
37 void setSubject(const QString &text);
38 [[nodiscard]] QString subject() const;
39
40 void setKeySequence(const QKeySequence &sequence);
41 [[nodiscard]] QKeySequence keySequence() const;
42
43 void setKeyword(const QString &keyword);
44 [[nodiscard]] QString keyword() const;
45
46 void setTo(const QString &keyword);
47 [[nodiscard]] QString to() const;
48
49 void setCc(const QString &keyword);
50 [[nodiscard]] QString cc() const;
51
52 void setBcc(const QString &keyword);
53 [[nodiscard]] QString bcc() const;
54
55 void setGroupModel(QAbstractItemModel *model);
56
57 void setGroupIndex(const QModelIndex &index);
58 [[nodiscard]] QModelIndex groupIndex() const;
59
60 void setAttachment(const QString &keyword);
61 [[nodiscard]] QString attachment() const;
62
63private:
64 void slotTextChanged();
65 void slotGroupChanged();
66 bool snippetIsValid() const;
67 void writeConfig();
68 void readConfig();
69
70 SnippetWidget *const mSnippetWidget;
71 QPushButton *mOkButton = nullptr;
72 bool mInGroupMode = false;
73};
74}
The filter dialog.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:01 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.