Minor fix.
[ttfautohint.git] / frontend / maingui.h
blobafaeb45780b6736dca84746072180fe367d1bba8
1 // maingui.h
3 // Copyright (C) 2012 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 "lineedit.h"
22 #include <stdio.h>
23 #include <ttfautohint.h>
25 class QAction;
26 class QButtonGroup;
27 class QCheckBox;
28 class QComboBox;
29 class QFile;
30 class QLabel;
31 class QLocale;
32 class QMenu;
33 class QPushButton;
34 class QSpinBox;
36 class Line_Edit;
38 class Main_GUI
39 : public QMainWindow
41 Q_OBJECT
43 public:
44 Main_GUI(int, int, int,
45 bool, bool, bool,
46 int, bool, bool, bool,
47 bool, bool, int, bool);
49 protected:
50 void closeEvent(QCloseEvent*);
52 private slots:
53 void about();
54 void browse_input();
55 void browse_output();
56 void check_min();
57 void check_max();
58 void check_limit();
59 void check_no_limit();
60 void check_no_increase();
61 void absolute_input();
62 void absolute_output();
63 void check_run();
64 void run();
66 private:
67 int hinting_range_min;
68 int hinting_range_max;
69 int hinting_limit;
70 int gray_strong_stem_width;
71 int gdi_cleartype_strong_stem_width;
72 int dw_cleartype_strong_stem_width;
73 int increase_x_height;
74 int ignore_restrictions;
75 int windows_compatibility;
76 int pre_hinting;
77 int hint_with_components;
78 int no_info;
79 int latin_fallback;
80 int symbol;
82 void create_layout();
84 void create_connections();
85 void create_actions();
86 void create_menus();
87 void create_status_bar();
88 void read_settings();
89 void write_settings();
91 int check_filenames(const QString&, const QString&);
92 int open_files(const QString&, FILE**, const QString&, FILE**);
93 int handle_error(TA_Error, const unsigned char*, QString);
95 QMenu* file_menu;
96 QMenu* help_menu;
98 Line_Edit* input_line;
99 QPushButton* input_button;
101 Line_Edit* output_line;
102 QPushButton* output_button;
104 QSpinBox* min_box;
105 QSpinBox* max_box;
107 QCheckBox* gray_box;
108 QCheckBox* gdi_box;
109 QCheckBox* dw_box;
111 QComboBox* fallback_box;
113 QLabel* limit_label;
114 QSpinBox* limit_box;
115 QCheckBox* no_limit_box;
117 QLabel* increase_label;
118 QSpinBox* increase_box;
119 QCheckBox* no_increase_box;
121 QCheckBox* wincomp_box;
122 QCheckBox* pre_box;
123 QCheckBox* hint_box;
124 QCheckBox* symbol_box;
125 QCheckBox* info_box;
127 QPushButton* run_button;
129 QAction* exit_act;
130 QAction* about_act;
131 QAction* about_Qt_act;
133 QLocale* locale;
136 #endif // __MAINGUI_H__
138 // end of maingui.h