File indexing completed on 2025-02-02 04:11:27

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 <QAbstractItemDelegate>
0010 #include <QFontDatabase>
0011 
0012 namespace glaxnimate::gui::font {
0013 
0014 
0015 class FontDelegate : public QAbstractItemDelegate
0016 {
0017 public:
0018     explicit FontDelegate(QObject *parent = nullptr);
0019 
0020     // painting
0021     void paint(QPainter *painter,
0022                const QStyleOptionViewItem &option,
0023                const QModelIndex &index) const override;
0024 
0025     QSize sizeHint(const QStyleOptionViewItem &option,
0026                    const QModelIndex &index) const override;
0027 
0028 //     const QIcon truetype;
0029 //     const QIcon bitmap;
0030     QFontDatabase::WritingSystem writingSystem;
0031 };
0032 
0033 } // namespace glaxnimate::gui::font