File indexing completed on 2025-03-09 04:54:33
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "headerstyleplugin.h" 0008 0009 using namespace MessageViewer; 0010 class MessageViewer::HeaderStylePluginPrivate 0011 { 0012 public: 0013 HeaderStylePluginPrivate() = default; 0014 0015 bool mIsEnabled = false; 0016 bool mShowEmoticons = true; 0017 }; 0018 0019 HeaderStylePlugin::HeaderStylePlugin(QObject *parent) 0020 : QObject(parent) 0021 , d(new MessageViewer::HeaderStylePluginPrivate) 0022 { 0023 } 0024 0025 HeaderStylePlugin::~HeaderStylePlugin() = default; 0026 0027 bool HeaderStylePlugin::hasMargin() const 0028 { 0029 return true; 0030 } 0031 0032 QString HeaderStylePlugin::alignment() const 0033 { 0034 return QStringLiteral("left"); 0035 } 0036 0037 int HeaderStylePlugin::elidedTextSize() const 0038 { 0039 return -1; 0040 } 0041 0042 void HeaderStylePlugin::setIsEnabled(bool enabled) 0043 { 0044 d->mIsEnabled = enabled; 0045 } 0046 0047 bool HeaderStylePlugin::isEnabled() const 0048 { 0049 return d->mIsEnabled; 0050 } 0051 0052 QString HeaderStylePlugin::attachmentHtml() const 0053 { 0054 return {}; 0055 } 0056 0057 bool HeaderStylePlugin::hasConfigureDialog() const 0058 { 0059 return false; 0060 } 0061 0062 void HeaderStylePlugin::showConfigureDialog(QWidget *parent) 0063 { 0064 Q_UNUSED(parent) 0065 // Reimplement 0066 } 0067 0068 QString HeaderStylePlugin::extraScreenCss(const QString &headerFont) const 0069 { 0070 Q_UNUSED(headerFont) 0071 return {}; 0072 } 0073 0074 QString HeaderStylePlugin::extraPrintCss(const QString &headerFont) const 0075 { 0076 Q_UNUSED(headerFont) 0077 return {}; 0078 } 0079 0080 QString HeaderStylePlugin::extraCommonCss(const QString &headerFont) const 0081 { 0082 Q_UNUSED(headerFont) 0083 return {}; 0084 } 0085 0086 #include "moc_headerstyleplugin.cpp"