File indexing completed on 2025-02-02 04:11:35
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 "model/shapes/text.hpp" 0010 0011 #include "shape_tool_widget.hpp" 0012 0013 namespace glaxnimate::gui { 0014 0015 class TextToolWidget : public ShapeToolWidget 0016 { 0017 Q_OBJECT 0018 0019 public: 0020 TextToolWidget(QWidget* parent = nullptr); 0021 0022 QFont font() const; 0023 void set_font(const QFont& font); 0024 void set_document(model::Document* document); 0025 0026 void set_preview_text(const QString& text); 0027 0028 Q_SIGNALS: 0029 void font_changed(const QFont& font); 0030 void custom_font_selected(int database_index); 0031 0032 private: 0033 void on_font_changed(); 0034 class Private; 0035 Private* dd() const; 0036 }; 0037 0038 } // namespace glaxnimate::gui