Implement option `process_with_components'.
[ttfautohint.git] / frontend / maingui.h
blob090ac27eb2c0bb124662335f684d821c79893dab
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,
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 pre_hinting;
76 int process_with_components;
77 int no_info;
78 int latin_fallback;
79 int symbol;
81 void create_layout();
83 void create_connections();
84 void create_actions();
85 void create_menus();
86 void create_status_bar();
87 void read_settings();
88 void write_settings();
90 int check_filenames(const QString&, const QString&);
91 int open_files(const QString&, FILE**, const QString&, FILE**);
92 int handle_error(TA_Error, const unsigned char*, QString);
94 QMenu* file_menu;
95 QMenu* help_menu;
97 Line_Edit* input_line;
98 QPushButton* input_button;
100 Line_Edit* output_line;
101 QPushButton* output_button;
103 QSpinBox* min_box;
104 QSpinBox* max_box;
106 QButtonGroup* gray_button_group;
107 QButtonGroup* gdi_button_group;
108 QButtonGroup* dw_button_group;
110 QComboBox* fallback_box;
112 QLabel* limit_label;
113 QSpinBox* limit_box;
114 QCheckBox* no_limit_box;
116 QLabel* increase_label;
117 QSpinBox* increase_box;
118 QCheckBox* no_increase_box;
120 QCheckBox* pre_box;
121 QCheckBox* process_box;
122 QCheckBox* symbol_box;
123 QCheckBox* info_box;
125 QPushButton* run_button;
127 QAction* exit_act;
128 QAction* about_act;
129 QAction* about_Qt_act;
131 QLocale* locale;
134 #endif // __MAINGUI_H__
136 // end of maingui.h