3 // Copyright (C) 2012-2016 by Werner Lemberg.
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.
10 // The file `COPYING' mentioned in the previous paragraph is distributed
11 // with the ttfautohint library.
24 #include <QDesktopWidget>
25 #include <QFileDialog>
26 #include <QFileSystemModel>
27 #include <QFileSystemWatcher>
28 #include <QGridLayout>
30 #include <QMainWindow>
32 #include <QMessageBox>
33 #include <QProgressDialog>
34 #include <QPushButton>
38 #include "ddlineedit.h"
39 #include "ttlineedit.h"
42 #include <ttfautohint.h>
43 #include <numberset.h>
56 class Drag_Drop_Line_Edit
;
57 class Tooltip_Line_Edit
;
72 const char*, const char*, bool,
73 const char*, bool, bool, bool);
77 void closeEvent(QCloseEvent
*);
83 void browse_control();
88 void check_no_limit();
89 void check_no_x_increase();
90 void check_default_stem_width();
91 void absolute_input();
92 void absolute_output();
93 void absolute_control();
94 void check_number_set();
95 void check_family_suffix();
96 void clear_status_bar();
104 int hinting_range_min
;
105 int hinting_range_max
;
107 int gray_strong_stem_width
;
108 int gdi_cleartype_strong_stem_width
;
109 int dw_cleartype_strong_stem_width
;
110 int increase_x_height
;
111 QString x_height_snapping_exceptions_string
;
112 number_range
* x_height_snapping_exceptions
;
113 int fallback_stem_width
;
114 int ignore_restrictions
;
115 int windows_compatibility
;
116 int adjust_subglyphs
;
120 int default_script_idx
;
121 int fallback_script_idx
;
122 int fallback_scaling
;
123 QString family_suffix
;
128 const int fallback_do_scale
;
129 const int fallback_do_hint
;
134 void create_layout(bool);
135 void create_horizontal_layout();
136 void create_vertical_layout();
144 QFileSystemWatcher
* file_watcher
;
146 QFileInfo fileinfo_input_file
;
147 QFileInfo fileinfo_control_file
;
148 QDateTime datetime_input_file
;
149 QDateTime datetime_control_file
;
152 void create_connections();
153 void create_actions();
155 void create_status_bar();
157 void read_settings();
158 void write_settings();
160 int check_filenames(const QString
&,
163 int open_files(const QString
&, FILE**,
164 const QString
&, FILE**,
165 const QString
&, FILE**);
166 int handle_error(TA_Error
, const unsigned char*, QString
);
168 void stop_watching();
174 Drag_Drop_Line_Edit
* input_line
;
175 QPushButton
* input_button
;
177 QLabel
* output_label
;
178 Drag_Drop_Line_Edit
* output_line
;
179 QPushButton
* output_button
;
181 QLabel
* control_label
;
182 Drag_Drop_Line_Edit
* control_line
;
183 QPushButton
* control_button
;
195 QLabel
* default_label
;
196 QComboBox
* default_box
;
197 QLabel
* fallback_label
;
198 QComboBox
* fallback_box
;
199 QComboBox
* fallback_hint_or_scale_box
;
202 QString limit_label_text_with_key
;
203 QString limit_label_text
;
205 QCheckBox
* no_limit_box
;
206 QString no_limit_box_text_with_key
;
207 QString no_limit_box_text
;
209 QLabel
* x_increase_label
;
210 QString x_increase_label_text_with_key
;
211 QString x_increase_label_text
;
212 QSpinBox
* x_increase_box
;
213 QCheckBox
* no_x_increase_box
;
214 QString no_x_increase_box_text_with_key
;
215 QString no_x_increase_box_text
;
217 QLabel
* snapping_label
;
218 Tooltip_Line_Edit
* snapping_line
;
219 QLabel
* family_suffix_label
;
220 Tooltip_Line_Edit
* family_suffix_line
;
222 QLabel
* stem_width_label
;
223 QString stem_width_label_text_with_key
;
224 QString stem_width_label_text
;
225 QSpinBox
* stem_width_box
;
226 QCheckBox
* default_stem_width_box
;
227 QString default_stem_width_box_text_with_key
;
228 QString default_stem_width_box_text
;
230 QCheckBox
* wincomp_box
;
231 QCheckBox
* adjust_box
;
233 QCheckBox
* symbol_box
;
234 QCheckBox
* dehint_box
;
239 QCheckBox
* watch_box
;
240 QPushButton
* run_button
;
244 QAction
* about_Qt_act
;