-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
103 lines (67 loc) · 2.38 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QSet>
#include <QSettings>
#include <unicodesubrange.h>
#include "fnbfont.h"
#include "tableeditor.h"
#include <unordered_map>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
FnbFont font;
std::set<QChar> charsToAdd;
TableEditor* tableEditor;
UnicodeSubrange* unicodeSubrange;
QSettings settings;
std::unordered_map<FnbGlyphInfo*, QRectF> glyphHitZones;
float scale = 1, previewSliderPercent = 0.8;
QPoint translate = QPoint(32,10), panInit;
bool panning = false;
mutable FnbGlyphInfo* currentGlyph = nullptr;
MainWindow(QWidget *parent = nullptr);
~MainWindow();
void DrawMainUI(QPaintEvent* e);
void wheelEvent(QWheelEvent* e);
void closeEvent(QCloseEvent* e);
void MousePress(QMouseEvent* e);
void MouseMove(QMouseEvent* e);
void MouseRelease(QMouseEvent* e);
void KeyboardControls(QKeyEvent* e);
bool eventFilter(QObject *watched, QEvent *event);
void SetCurrentGlyph(FnbGlyphInfo *g);
void UpdateFontPreview(QFont f);
private slots:
void on_loadFont_clicked();
void on_unicodeSubranges_clicked();
void on_CreateFont_clicked();
void on_saveFont_clicked();
void on_fontComboBox_currentFontChanged(const QFont &f);
void on_fontBold_clicked(bool checked);
void on_fontItalic_clicked(bool checked);
void on_character_textChanged(const QString &arg1);
void on_charPosX_valueChanged(int arg1);
void on_charPosY_valueChanged(int arg1);
void on_charWidth_valueChanged(int arg1);
void on_charHeight_valueChanged(int arg1);
void on_charLeftBearing_valueChanged(int arg1);
void on_charHorizontalAdvance_valueChanged(int arg1);
void on_charDescent_valueChanged(int arg1);
void on_newFont_clicked();
void on_loadPNGAtlas_clicked();
void on_zoomPercent_valueChanged(int arg1);
void on_zoom100_clicked();
void on_previewDrawStringHeight_sliderMoved(int position);
void on_delGlyph_clicked();
void on_copyGlyph_clicked();
void on_SplashLabel_linkActivated(const QString &link);
void on_tableEditor_clicked();
public:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H