KPimTextEdit

richtextcomposerwidget.cpp
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "richtextcomposerwidget.h"
8using namespace Qt::Literals::StringLiterals;
9
10#include "kpimtextedit/richtextcomposer.h"
11#include <QHBoxLayout>
12#include <TextCustomEditor/RichTextEditorWidget>
13
14using namespace KPIMTextEdit;
15
16class Q_DECL_HIDDEN KPIMTextEdit::RichTextComposerWidgetPrivate
17{
18public:
19 RichTextComposerWidgetPrivate() = default;
20
21 KPIMTextEdit::RichTextComposer *richTextComposer = nullptr;
22};
23
24RichTextComposerWidget::RichTextComposerWidget(QWidget *parent)
25 : QWidget(parent)
26 , d(new KPIMTextEdit::RichTextComposerWidgetPrivate)
27{
28 auto layout = new QHBoxLayout(this);
29 layout->setContentsMargins({});
30 d->richTextComposer = new KPIMTextEdit::RichTextComposer(this);
31 d->richTextComposer->setObjectName("richtextcomposer"_L1);
32 auto editorWidget = new TextCustomEditor::RichTextEditorWidget(d->richTextComposer, this);
33 layout->addWidget(editorWidget);
34}
35
36RichTextComposerWidget::~RichTextComposerWidget() = default;
37
38KPIMTextEdit::RichTextComposer *RichTextComposerWidget::richTextComposer() const
39{
40 return d->richTextComposer;
41}
42
43#include "moc_richtextcomposerwidget.cpp"
The RichTextComposer class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:35:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.