File indexing completed on 2025-02-02 04:11:28
0001 /* 0002 * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best> 0003 * 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #ifndef FONT_FONTSTYLEDIALOG_H 0008 #define FONT_FONTSTYLEDIALOG_H 0009 0010 #include <memory> 0011 #include <QDialog> 0012 0013 #include "model/assets/embedded_font.hpp" 0014 0015 namespace glaxnimate::gui::font { 0016 0017 class FontStyleDialog : public QDialog 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 FontStyleDialog(QWidget* parent = nullptr); 0023 ~FontStyleDialog(); 0024 0025 void set_font(const QFont& font); 0026 QFont selected_font() const; 0027 QStringList favourites() const; 0028 void set_favourites(const QStringList& fav); 0029 0030 void set_preview_text(const QString& text); 0031 0032 model::CustomFont custom_font() const; 0033 0034 protected: 0035 void changeEvent ( QEvent* e ) override; 0036 void showEvent(QShowEvent* e) override; 0037 0038 private: 0039 class Private; 0040 std::unique_ptr<Private> d; 0041 }; 0042 0043 } 0044 0045 #endif // FONT_FONTSTYLEDIALOG_H