Messagelib

headerstyleplugin.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 <QObject>
10
11#include "messageviewer_export.h"
12#include <memory>
14class QActionGroup;
15class KActionMenu;
16namespace MessageViewer
17{
18class HeaderStyle;
19class HeaderStrategy;
20class HeaderStylePluginPrivate;
21class HeaderStyleInterface;
22/**
23 * @brief The HeaderStylePlugin class
24 * @author Laurent Montel <montel@kde.org>
25 */
26class MESSAGEVIEWER_EXPORT HeaderStylePlugin : public QObject
27{
28 Q_OBJECT
29public:
30 explicit HeaderStylePlugin(QObject *parent = nullptr);
31 ~HeaderStylePlugin() override;
32
33 virtual HeaderStyle *headerStyle() const = 0;
34 virtual HeaderStrategy *headerStrategy() const = 0;
35 virtual HeaderStyleInterface *createView(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac, QObject *parent = nullptr) = 0;
36 [[nodiscard]] virtual QString name() const = 0;
37 [[nodiscard]] virtual bool hasMargin() const;
38 [[nodiscard]] virtual QString alignment() const;
39 [[nodiscard]] virtual int elidedTextSize() const;
40
41 void setIsEnabled(bool enabled);
42 [[nodiscard]] bool isEnabled() const;
43
44 [[nodiscard]] virtual QString attachmentHtml() const;
45
46 [[nodiscard]] virtual bool hasConfigureDialog() const;
47
48 virtual void showConfigureDialog(QWidget *parent);
49
50 [[nodiscard]] virtual QString extraScreenCss(const QString &headerFont) const;
51 [[nodiscard]] virtual QString extraPrintCss(const QString &headerFont) const;
52 [[nodiscard]] virtual QString extraCommonCss(const QString &headerFont) const;
53
54private:
55 std::unique_ptr<HeaderStylePluginPrivate> const d;
56};
57}
The HeaderStrategy class.
The HeaderStyleInterface class.
The HeaderStylePlugin class.
This class encapsulates the visual appearance of message headers.
Definition headerstyle.h:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:37:31 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.