Messagelib

headerstyleplugin.cpp
1 /*
2  SPDX-FileCopyrightText: 2015-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "headerstyleplugin.h"
8 
9 using namespace MessageViewer;
10 class MessageViewer::HeaderStylePluginPrivate
11 {
12 public:
13  HeaderStylePluginPrivate() = default;
14 
15  bool mIsEnabled = false;
16  bool mShowEmoticons = true;
17 };
18 
19 HeaderStylePlugin::HeaderStylePlugin(QObject *parent)
20  : QObject(parent)
21  , d(new MessageViewer::HeaderStylePluginPrivate)
22 {
23 }
24 
25 HeaderStylePlugin::~HeaderStylePlugin() = default;
26 
27 bool HeaderStylePlugin::hasMargin() const
28 {
29  return true;
30 }
31 
32 QString HeaderStylePlugin::alignment() const
33 {
34  return QStringLiteral("left");
35 }
36 
37 int HeaderStylePlugin::elidedTextSize() const
38 {
39  return -1;
40 }
41 
42 void HeaderStylePlugin::setIsEnabled(bool enabled)
43 {
44  d->mIsEnabled = enabled;
45 }
46 
47 bool HeaderStylePlugin::isEnabled() const
48 {
49  return d->mIsEnabled;
50 }
51 
52 QString HeaderStylePlugin::attachmentHtml() const
53 {
54  return {};
55 }
56 
57 bool HeaderStylePlugin::hasConfigureDialog() const
58 {
59  return false;
60 }
61 
62 void HeaderStylePlugin::showConfigureDialog(QWidget *parent)
63 {
64  Q_UNUSED(parent)
65  // Reimplement
66 }
67 
68 QString HeaderStylePlugin::extraScreenCss(const QString &headerFont) const
69 {
70  Q_UNUSED(headerFont)
71  return {};
72 }
73 
74 QString HeaderStylePlugin::extraPrintCss(const QString &headerFont) const
75 {
76  Q_UNUSED(headerFont)
77  return {};
78 }
79 
80 QString HeaderStylePlugin::extraCommonCss(const QString &headerFont) const
81 {
82  Q_UNUSED(headerFont)
83  return {};
84 }
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:05:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.