Messagelib

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

KDE's Doxygen guidelines are available online.