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 EnterpriseHeaderStylePlugin : public MessageViewer::HeaderStylePlugin 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit EnterpriseHeaderStylePlugin(QObject *parent = nullptr, const QList<QVariant> & = QList<QVariant>()); 0020 ~EnterpriseHeaderStylePlugin() 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]] bool hasMargin() const override; 0027 [[nodiscard]] QString alignment() const override; 0028 [[nodiscard]] int elidedTextSize() const override; 0029 0030 private: 0031 HeaderStyle *const mHeaderStyle; 0032 HeaderStrategy *const mHeaderStrategy; 0033 }; 0034 }