Messagelib

headerstyleinterface.h
1 /*
2  SPDX-FileCopyrightText: 2015-2020 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef HEADERSTYLEINTERFACE_H
8 #define HEADERSTYLEINTERFACE_H
9 
10 #include <QObject>
11 #include "messageviewer_export.h"
12 class KToggleAction;
13 class KActionCollection;
14 class QAction;
15 class QActionGroup;
16 class KActionMenu;
17 namespace MessageViewer {
18 class HeaderStyle;
19 class HeaderStylePlugin;
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 protected:
42  void addHelpTextAction(QAction *act, const QString &text);
43  void addActionToMenu(KActionMenu *menu, QActionGroup *actionGroup);
44  QList<KToggleAction *> mAction;
45  HeaderStylePlugin *const mHeaderStylePlugin;
46 };
47 }
48 #endif // HEADERSTYLEINTERFACE_H
The HeaderStyleInterface class.
The HeaderStylePlugin class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 23:14:04 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.