Debian Codegraph @

debian/missing-sources/ttf-parser/testing-tools/font-view/mainwindow.h

raw
1 #pragma once
2
3 #include <QMainWindow>
4
5 #ifdef WITH_FREETYPE
6 #include "freetypefont.h"
7 #endif
8
9 #ifdef WITH_FREETYPE
10 #include "harfbuzzfont.h"
11 #endif
12
13 #include "ttfparserfont.h"
14
15 namespace Ui { class MainWindow; }
16
17 class QSlider;
18
19 class MainWindow : public QMainWindow
20 {
21 Q_OBJECT
22
23 public:
24 MainWindow(QWidget *parent = nullptr);
25 ~MainWindow();
26
27 private:
28 void loadFont(const QString &path);
29 void reloadGlyphs();
30 void onVariationChanged();
31
32 private slots:
33 void on_chBoxDrawBboxes_stateChanged(int flag);
34 void on_chBoxDrawTtfParser_stateChanged(int flag);
35 void on_chBoxDrawFreeType_stateChanged(int flag);
36 void on_chBoxDrawHarfBuzz_stateChanged(int flag);
37
38 private:
39 struct VariationSlider
40 {
41 QSlider *slider;
42 Tag tag;
43 };
44
45 Ui::MainWindow * const ui;
46 QVector<VariationSlider> m_variationSliders;
47 TtfParserFont m_ttfpFont;
48 #ifdef WITH_FREETYPE
49 FreeTypeFont m_ftFont;
50 #endif
51 #ifdef WITH_HARFBUZZ
52 HarfBuzzFont m_hbFont;
53 #endif
54 };