Messagelib

plugineditorconverttextinterface.cpp
1/*
2 SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "plugineditorconverttextinterface.h"
8#include "plugineditorconverterbeforeconvertingdata.h"
9#include "plugineditorconverterinitialdata.h"
10
11#include <KActionCollection>
12
13using namespace MessageComposer;
14
15class MessageComposer::PluginEditorConvertTextInterfacePrivate
16{
17public:
18 PluginEditorConvertTextInterfacePrivate() = default;
19
20 QList<PluginActionType> mActionTypes;
21
22 QWidget *mParentWidget = nullptr;
23 QWidget *statusBarWidget = nullptr;
24 PluginEditorConvertText *plugin = nullptr;
25 KPIMTextEdit::RichTextComposer *mEditor = nullptr;
28};
29
30PluginEditorConvertTextInterface::PluginEditorConvertTextInterface(QObject *parent)
31 : QObject(parent)
32 , d(new MessageComposer::PluginEditorConvertTextInterfacePrivate)
33{
34}
35
36PluginEditorConvertTextInterface::~PluginEditorConvertTextInterface() = default;
37
38bool PluginEditorConvertTextInterface::reformatText()
39{
40 return false;
41}
42
43void PluginEditorConvertTextInterface::setParentWidget(QWidget *parent)
44{
45 d->mParentWidget = parent;
46}
47
48QWidget *PluginEditorConvertTextInterface::parentWidget() const
49{
50 return d->mParentWidget;
51}
52
53void PluginEditorConvertTextInterface::setActionType(const QList<PluginActionType> &type)
54{
55 d->mActionTypes = type;
56}
57
58QList<PluginActionType> PluginEditorConvertTextInterface::actionTypes() const
59{
60 return d->mActionTypes;
61}
62
63void PluginEditorConvertTextInterface::addActionType(PluginActionType type)
64{
65 d->mActionTypes += type;
66}
67
68void PluginEditorConvertTextInterface::createAction(KActionCollection *ac)
69{
70 Q_UNUSED(ac)
71}
72
73void PluginEditorConvertTextInterface::setInitialData(const PluginEditorConverterInitialData &data)
74{
75 d->mInitialData = data;
76}
77
78PluginEditorConverterInitialData PluginEditorConvertTextInterface::initialData() const
79{
80 return d->mInitialData;
81}
82
83void PluginEditorConvertTextInterface::setBeforeConvertingData(const PluginEditorConverterBeforeConvertingData &data)
84{
85 d->mBeforeConvertingData = data;
86}
87
88PluginEditorConverterBeforeConvertingData PluginEditorConvertTextInterface::beforeConvertingData() const
89{
90 return d->mBeforeConvertingData;
91}
92
93KPIMTextEdit::RichTextComposer *PluginEditorConvertTextInterface::richTextEditor() const
94{
95 return d->mEditor;
96}
97
98void PluginEditorConvertTextInterface::setRichTextEditor(KPIMTextEdit::RichTextComposer *richTextEditor)
99{
100 d->mEditor = richTextEditor;
101}
102
103void PluginEditorConvertTextInterface::reloadConfig()
104{
105 // Reimplement it
106}
107
108void PluginEditorConvertTextInterface::enableDisablePluginActions(bool richText)
109{
110 Q_UNUSED(richText)
111}
112
113void PluginEditorConvertTextInterface::setStatusBarWidget(QWidget *w)
114{
115 d->statusBarWidget = w;
116}
117
118QWidget *PluginEditorConvertTextInterface::statusBarWidget() const
119{
120 return d->statusBarWidget;
121}
122
123void PluginEditorConvertTextInterface::setPlugin(PluginEditorConvertText *plugin)
124{
125 d->plugin = plugin;
126}
127
128PluginEditorConvertText *PluginEditorConvertTextInterface::plugin() const
129{
130 return d->plugin;
131}
132
133#include "moc_plugineditorconverttextinterface.cpp"
The PluginActionType class.
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.