File indexing completed on 2025-01-05 04:49:43
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <MessageViewer/HeaderStylePlugin> 0010 0011 #include <QVariant> 0012 0013 namespace MessageViewer 0014 { 0015 class FancyHeaderStylePlugin : public MessageViewer::HeaderStylePlugin 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit FancyHeaderStylePlugin(QObject *parent = nullptr, const QList<QVariant> & = QList<QVariant>()); 0020 ~FancyHeaderStylePlugin() override; 0021 0022 HeaderStyle *headerStyle() const override; 0023 HeaderStrategy *headerStrategy() const override; 0024 HeaderStyleInterface *createView(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac, QObject *parent = nullptr) override; 0025 [[nodiscard]] QString name() const override; 0026 [[nodiscard]] int elidedTextSize() const override; 0027 [[nodiscard]] QString extraScreenCss(const QString &headerFont) const override; 0028 [[nodiscard]] QString extraPrintCss(const QString &headerFont) const override; 0029 [[nodiscard]] QString extraCommonCss(const QString &headerFont) const override; 0030 [[nodiscard]] QString attachmentHtml() const override; 0031 0032 private: 0033 HeaderStyle *const mHeaderStyle; 0034 HeaderStrategy *const mHeaderStrategy; 0035 }; 0036 }