Messagelib

plugineditorgrammarcustomtoolsviewinterface.cpp
1/*
2 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "plugineditorgrammarcustomtoolsviewinterface.h"
8#include <KPIMTextEdit/RichTextComposer>
9using namespace MessageComposer;
10class MessageComposer::PluginEditorGrammarCustomToolsViewInterfacePrivate
11{
12public:
13 QWidget *mParentWidget = nullptr;
14 KPIMTextEdit::RichTextComposer *mEditor = nullptr;
15};
16
17PluginEditorGrammarCustomToolsViewInterface::PluginEditorGrammarCustomToolsViewInterface(QWidget *parent)
18 : PimCommon::CustomToolsViewInterface(parent)
19 , d(new PluginEditorGrammarCustomToolsViewInterfacePrivate)
20{
21}
22
23PluginEditorGrammarCustomToolsViewInterface::~PluginEditorGrammarCustomToolsViewInterface() = default;
24
25void PluginEditorGrammarCustomToolsViewInterface::setParentWidget(QWidget *parent)
26{
27 d->mParentWidget = parent;
28}
29
30QWidget *PluginEditorGrammarCustomToolsViewInterface::parentWidget() const
31{
32 return d->mParentWidget;
33}
34
35KPIMTextEdit::RichTextComposer *PluginEditorGrammarCustomToolsViewInterface::richTextEditor() const
36{
37 return d->mEditor;
38}
39
40void PluginEditorGrammarCustomToolsViewInterface::setRichTextEditor(KPIMTextEdit::RichTextComposer *richTextEditor)
41{
42 d->mEditor = richTextEditor;
43}
44
45PluginGrammarAction::PluginGrammarAction() = default;
46
47QString PluginGrammarAction::replacement() const
48{
49 return mReplacement;
50}
51
52void PluginGrammarAction::setReplacement(const QString &replacement)
53{
54 mReplacement = replacement;
55}
56
57int PluginGrammarAction::start() const
58{
59 return mStart;
60}
61
62void PluginGrammarAction::setStart(int start)
63{
64 mStart = start;
65}
66
67int PluginGrammarAction::length() const
68{
69 return mLength;
70}
71
72void PluginGrammarAction::setLength(int end)
73{
74 mLength = end;
75}
76
77QStringList PluginGrammarAction::suggestions() const
78{
79 return mSuggestions;
80}
81
82void PluginGrammarAction::setSuggestions(const QStringList &suggestions)
83{
84 mSuggestions = suggestions;
85}
86
87int PluginGrammarAction::blockId() const
88{
89 return mBlockId;
90}
91
92void PluginGrammarAction::setBlockId(int blockId)
93{
94 mBlockId = blockId;
95}
96
97QStringList PluginGrammarAction::infoUrls() const
98{
99 return mInfoUrls;
100}
101
102void PluginGrammarAction::setInfoUrls(const QStringList &urls)
103{
104 mInfoUrls = urls;
105}
106
108{
109 d << "start " << t.start();
110 d << "length " << t.length();
111 d << "blockId " << t.blockId();
112 d << "suggestion " << t.suggestions();
113 d << "replacement " << t.replacement();
114 d << "urls " << t.infoUrls();
115 return d;
116}
117
118#include "moc_plugineditorgrammarcustomtoolsviewinterface.cpp"
Q_SCRIPTABLE QString start(QString train="")
Q_SCRIPTABLE Q_NOREPLY void start()
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
QAction * end(const QObject *recvr, const char *slot, QObject *parent)
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.