Messagelib

customtemplatesmenu.h
1 /*
2  * SPDX-FileCopyrightText: 2006 Dmitry Morozhnikov <[email protected]>
3  *
4  * SPDX-License-Identifier: GPL-2.0-or-later
5  */
6 
7 #pragma once
8 
9 #include "templateparser_export.h"
10 
11 #include <QObject>
12 #include <memory>
13 
14 class KActionCollection;
15 class KActionMenu;
16 
17 namespace TemplateParser
18 {
19 class CustomTemplatesMenuPrivate;
20 /**
21  * @brief The CustomTemplatesMenu class
22  */
23 class TEMPLATEPARSER_EXPORT CustomTemplatesMenu : public QObject
24 {
25  Q_OBJECT
26 
27 public:
28  explicit CustomTemplatesMenu(QWidget *parent, KActionCollection *ac);
29  ~CustomTemplatesMenu() override;
30 
31  Q_REQUIRED_RESULT KActionMenu *replyActionMenu() const;
32  Q_REQUIRED_RESULT KActionMenu *replyAllActionMenu() const;
33  Q_REQUIRED_RESULT KActionMenu *forwardActionMenu() const;
34 
35 public Q_SLOTS:
36  void update();
37 
38 Q_SIGNALS:
39  void replyTemplateSelected(const QString &tmpl);
40  void replyAllTemplateSelected(const QString &tmpl);
41  void forwardTemplateSelected(const QString &tmpl);
42 
43 private Q_SLOTS:
44  void slotReplySelected(int idx);
45  void slotReplyAllSelected(int idx);
46  void slotForwardSelected(int idx);
47 
48 private:
49  void clear();
50  std::unique_ptr<CustomTemplatesMenuPrivate> const d;
51 };
52 }
53 
The CustomTemplatesMenu class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 23:04:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.