KTextAddons

emoticontexteditaction.h
1/*
2 SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org>
3 based on code from kopete
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#pragma once
9
10#include "textemoticonswidgets_export.h"
11#include <KActionMenu>
12namespace TextEmoticonsWidgets
13{
14/**
15 * @brief The TextEmoticonsWidgets::EmoticonTextEditAction class
16 *
17 * @short Action to select emojis.
18 *
19 * Opens an EmoticonTextEditSelector to select an emoji.
20 *
21 * @author Laurent Montel <montel@kde.org>
22 */
23class TEXTEMOTICONSWIDGETS_EXPORT EmoticonTextEditAction : public KActionMenu
24{
25 Q_OBJECT
26public:
27 explicit EmoticonTextEditAction(QObject *parent);
28 ~EmoticonTextEditAction() override;
29
30 /**
31 * Set whether the custom emoji category should be shown.
32 * @see customEmojiSupport()
33 */
34 void setCustomEmojiSupport(bool b);
35 /**
36 * Return whether the custom emoji category is enabled.
37 * @see setCustomEmojiSupport()
38 */
39 [[nodiscard]] bool customEmojiSupport() const;
40
41Q_SIGNALS:
42 /**
43 * This signal is emitted each time the user selects an emoji.
44 *
45 * @param character The actual emoji character
46 * @see EmoticonTextEditSelector::insertEmoticon
47 */
48 void insertEmoticon(const QString &);
49
50private:
51 class EmoticonTextEditActionPrivate;
52 std::unique_ptr<EmoticonTextEditActionPrivate> const d;
53};
54}
The TextEmoticonsWidgets::EmoticonTextEditAction class.
void insertEmoticon(const QString &)
This signal is emitted each time the user selects an emoji.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:51:28 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.