Warning, file /graphics/glaxnimate/src/gui/emoji/emoji_dialog.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best> 0003 * 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <memory> 0010 0011 #include <QDialog> 0012 #include <QDir> 0013 0014 0015 namespace glaxnimate::emoji { 0016 0017 struct EmojiSetSlugFormat; 0018 struct EmojiSet; 0019 0020 class EmojiDialog : public QDialog 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 enum DisplayMode 0026 { 0027 Text, 0028 Image 0029 }; 0030 0031 EmojiDialog(QWidget* parent = nullptr); 0032 ~EmojiDialog(); 0033 0034 void set_emoji_font(const QFont& font); 0035 const QFont& emoji_font() const; 0036 0037 void set_image_path(const QDir& path); 0038 const QDir& image_path() const; 0039 0040 void set_image_suffix(const QString& suffix); 0041 const QString& image_suffix() const; 0042 0043 void set_image_slug_format(const EmojiSetSlugFormat& slug); 0044 const EmojiSetSlugFormat& image_slug_format() const; 0045 0046 void from_emoji_set(const EmojiSet& set, int size); 0047 0048 void load_emoji(DisplayMode mode); 0049 0050 QString current_unicode() const; 0051 QString current_slug() const; 0052 0053 Q_SIGNALS: 0054 void selected_unicode(const QString& emoji); 0055 void selected_slug(const QString& emoji); 0056 0057 protected: 0058 void timerEvent(QTimerEvent *event) override; 0059 void showEvent(QShowEvent* e) override; 0060 void resizeEvent(QResizeEvent * event) override; 0061 0062 private: 0063 class Private; 0064 std::unique_ptr<Private> d; 0065 }; 0066 0067 } // namespace glaxnimate::emoji