KTextAddons

emoticoncategorybuttons.h
1/*
2 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "textemoticonswidgets_private_export.h"
10#include <QWidget>
11class QHBoxLayout;
12class QButtonGroup;
13namespace TextEmoticonsCore
14{
15class EmoticonCategory;
16}
17namespace TextEmoticonsWidgets
18{
19class TEXTEMOTICONSWIDGETS_TESTS_EXPORT EmoticonCategoryButtons : public QWidget
20{
21 Q_OBJECT
22public:
23 explicit EmoticonCategoryButtons(QWidget *parent = nullptr);
24 ~EmoticonCategoryButtons() override;
25
26 void setCategories(const QList<TextEmoticonsCore::EmoticonCategory> &categories, bool hasCustomSupport);
27
28 [[nodiscard]] bool wasLoaded() const;
29
30Q_SIGNALS:
31 void categorySelected(const QString &category);
32
33protected:
34 void wheelEvent(QWheelEvent *e) override;
35
36private:
37 TEXTEMOTICONSWIDGETS_NO_EXPORT void addButton(const QString &name, const QString &category, const QString &toolTip);
38 QHBoxLayout *const mMainLayout;
39 QButtonGroup *const mButtonGroup;
40 bool mWasLoaded = false;
41};
42}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:48:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.