KPimTextEdit

richtextcomposeractions.h
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kpimtextedit_export.h"
10#include "richtextcomposer.h"
11#include <QObject>
13class QTextCharFormat;
14class QAction;
15namespace KPIMTextEdit
16{
17class RichTextComposerControler;
18/**
19 * @brief The RichTextComposerActions class
20 * @author Laurent Montel <montel@kde.org>
21 */
22class KPIMTEXTEDIT_EXPORT RichTextComposerActions : public QObject
23{
24 Q_OBJECT
25public:
26 explicit RichTextComposerActions(KPIMTextEdit::RichTextComposerControler *controller, QObject *parent = nullptr);
27 ~RichTextComposerActions() override;
28
29 void createActions(KActionCollection *ac);
30 [[nodiscard]] int numberOfActions() const;
31
32 [[nodiscard]] QList<QAction *> richTextActionList() const;
33
34 void uncheckActionFormatPainter();
35 void updateActionStates();
36 void textModeChanged(KPIMTextEdit::RichTextComposer::Mode mode);
37
38public Q_SLOTS:
39 void setActionsEnabled(bool enabled);
40
41private:
42 KPIMTEXTEDIT_NO_EXPORT void slotUpdateCharFormatActions(const QTextCharFormat &format);
43 KPIMTEXTEDIT_NO_EXPORT void slotUpdateMiscActions();
44
45 KPIMTEXTEDIT_NO_EXPORT void setHeadingLevel(int level);
46 KPIMTEXTEDIT_NO_EXPORT void setListStyle(int _styleindex);
47 class RichTextComposerActionsPrivate;
48 std::unique_ptr<RichTextComposerActionsPrivate> const d;
49};
50}
The RichTextComposerActions class.
The RichTextComposerControler class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:45 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.