Typo.
[ttfautohint.git] / frontend / maingui.h
blob9c7bebc4a59f025c4b00e6e2d4d2abcc31a441dc
1 // maingui.h
3 // Copyright (C) 2012-2013 by Werner Lemberg.
4 //
5 // This file is part of the ttfautohint library, and may only be used,
6 // modified, and distributed under the terms given in `COPYING'. By
7 // continuing to use, modify, or distribute this file you indicate that you
8 // have read `COPYING' and understand and accept it fully.
9 //
10 // The file `COPYING' mentioned in the previous paragraph is distributed
11 // with the ttfautohint library.
14 #ifndef __MAINGUI_H__
15 #define __MAINGUI_H__
17 #include <config.h>
19 #include <QtGui>
20 #include "ddlineedit.h"
21 #include "ttlineedit.h"
23 #include <stdio.h>
24 #include <ttfautohint.h>
25 #include <numberset.h>
27 class QAction;
28 class QButtonGroup;
29 class QCheckBox;
30 class QComboBox;
31 class QFile;
32 class QLabel;
33 class QLocale;
34 class QMenu;
35 class QPushButton;
36 class QSpinBox;
38 class Drag_Drop_Line_Edit;
39 class Tooltip_Line_Edit;
41 class Main_GUI
42 : public QMainWindow
44 Q_OBJECT
46 public:
47 Main_GUI(int, int, int,
48 bool, bool,
49 bool, int,
50 const char*,
51 bool, bool, bool,
52 bool, bool, const char*, bool,
53 bool);
54 ~Main_GUI();
56 protected:
57 void closeEvent(QCloseEvent*);
59 private slots:
60 void about();
61 void browse_input();
62 void browse_output();
63 void check_min();
64 void check_max();
65 void check_limit();
66 void check_dehint();
67 void check_no_limit();
68 void check_no_increase();
69 void absolute_input();
70 void absolute_output();
71 void check_number_set();
72 void clear_status_bar();
73 void check_run();
74 void run();
76 private:
77 int hinting_range_min;
78 int hinting_range_max;
79 int hinting_limit;
80 int gray_strong_stem_width;
81 int gdi_cleartype_strong_stem_width;
82 int dw_cleartype_strong_stem_width;
83 int increase_x_height;
84 QString x_height_snapping_exceptions_string;
85 number_range* x_height_snapping_exceptions;
86 int ignore_restrictions;
87 int windows_compatibility;
88 int pre_hinting;
89 int hint_composites;
90 int no_info;
91 int fallback_script_idx;
92 int symbol;
93 int dehint;
95 void create_layout();
97 void create_connections();
98 void create_actions();
99 void create_menus();
100 void create_status_bar();
101 void set_defaults();
102 void read_settings();
103 void write_settings();
105 int check_filenames(const QString&, const QString&);
106 int open_files(const QString&, FILE**, const QString&, FILE**);
107 int handle_error(TA_Error, const unsigned char*, QString);
109 QMenu* file_menu;
110 QMenu* help_menu;
112 Drag_Drop_Line_Edit* input_line;
113 QPushButton* input_button;
115 Drag_Drop_Line_Edit* output_line;
116 QPushButton* output_button;
118 QLabel* min_label;
119 QSpinBox* min_box;
120 QLabel* max_label;
121 QSpinBox* max_box;
123 QLabel* stem_label;
124 QCheckBox* gray_box;
125 QCheckBox* gdi_box;
126 QCheckBox* dw_box;
128 QLabel* fallback_label;
129 QComboBox* fallback_box;
131 QLabel* limit_label;
132 QSpinBox* limit_box;
133 QCheckBox* no_limit_box;
135 QLabel* increase_label;
136 QSpinBox* increase_box;
137 QCheckBox* no_increase_box;
139 QLabel* snapping_label;
140 Tooltip_Line_Edit* snapping_line;
142 QCheckBox* wincomp_box;
143 QCheckBox* pre_box;
144 QCheckBox* hint_box;
145 QCheckBox* symbol_box;
146 QCheckBox* dehint_box;
147 QCheckBox* info_box;
149 QPushButton* run_button;
151 QAction* exit_act;
152 QAction* about_act;
153 QAction* about_Qt_act;
155 QLocale* locale;
158 #endif // __MAINGUI_H__
160 // end of maingui.h