Messagelib

headerstyleinterface.h
1 /*
2  SPDX-FileCopyrightText: 2015-2022 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "messageviewer_export.h"
10 #include <QObject>
11 class KToggleAction;
12 class KActionCollection;
13 class QAction;
14 class QActionGroup;
15 class KActionMenu;
16 namespace MessageViewer
17 {
18 class HeaderStyle;
19 class HeaderStylePlugin;
20 /**
21  * @brief The HeaderStyleInterface class
22  * @author Laurent Montel <[email protected]>
23  */
24 class MESSAGEVIEWER_EXPORT HeaderStyleInterface : public QObject
25 {
26  Q_OBJECT
27 public:
28  explicit HeaderStyleInterface(MessageViewer::HeaderStylePlugin *, QObject *parent = nullptr);
29  ~HeaderStyleInterface() override;
30  Q_REQUIRED_RESULT QList<KToggleAction *> action() const;
31  virtual void createAction(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac) = 0;
32  virtual void activateAction() = 0;
33  Q_REQUIRED_RESULT HeaderStylePlugin *headerStylePlugin() const;
34 
35 Q_SIGNALS:
36  void styleChanged(MessageViewer::HeaderStylePlugin *plugin);
37  void styleUpdated();
38 
39 protected Q_SLOTS:
40  void slotStyleChanged();
41 
42 protected:
43  void addHelpTextAction(QAction *act, const QString &text);
44  void addActionToMenu(KActionMenu *menu, QActionGroup *actionGroup);
45  QList<KToggleAction *> mAction;
46  HeaderStylePlugin *const mHeaderStylePlugin;
47 };
48 }
The HeaderStyleInterface class.
The HeaderStylePlugin class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jan 15 2022 23:05:52 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.