[gui] s/Line_Edit/Drag_Drop_Line_Edit/.
[ttfautohint.git] / frontend / maingui.h
blob2a133e7fb9421360f26656fc0b651a35424ecb41
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 "ddlineedit.h"
22 #include <stdio.h>
23 #include <ttfautohint.h>
24 #include <numberset.h>
26 class QAction;
27 class QButtonGroup;
28 class QCheckBox;
29 class QComboBox;
30 class QFile;
31 class QLabel;
32 class QLineEdit;
33 class QLocale;
34 class QMenu;
35 class QPushButton;
36 class QSpinBox;
38 class Drag_Drop_Line_Edit;
40 class Main_GUI
41 : public QMainWindow
43 Q_OBJECT
45 public:
46 Main_GUI(int, int, int,
47 bool, bool, bool,
48 int, const char*,
49 bool, bool, bool,
50 bool, bool, int, bool);
51 ~Main_GUI();
53 protected:
54 void closeEvent(QCloseEvent*);
56 private slots:
57 void about();
58 void browse_input();
59 void browse_output();
60 void check_min();
61 void check_max();
62 void check_limit();
63 void check_no_limit();
64 void check_no_increase();
65 void absolute_input();
66 void absolute_output();
67 void check_number_set();
68 void clear_status_bar();
69 void check_run();
70 void run();
72 private:
73 int hinting_range_min;
74 int hinting_range_max;
75 int hinting_limit;
76 int gray_strong_stem_width;
77 int gdi_cleartype_strong_stem_width;
78 int dw_cleartype_strong_stem_width;
79 int increase_x_height;
80 QString x_height_snapping_exceptions_string;
81 number_range* x_height_snapping_exceptions;
82 int ignore_restrictions;
83 int windows_compatibility;
84 int pre_hinting;
85 int hint_with_components;
86 int no_info;
87 int latin_fallback;
88 int symbol;
90 void create_layout();
92 void create_connections();
93 void create_actions();
94 void create_menus();
95 void create_status_bar();
96 void set_defaults();
97 void read_settings();
98 void write_settings();
100 int check_filenames(const QString&, const QString&);
101 int open_files(const QString&, FILE**, const QString&, FILE**);
102 int handle_error(TA_Error, const unsigned char*, QString);
104 QMenu* file_menu;
105 QMenu* help_menu;
107 Drag_Drop_Line_Edit* input_line;
108 QPushButton* input_button;
110 Drag_Drop_Line_Edit* output_line;
111 QPushButton* output_button;
113 QSpinBox* min_box;
114 QSpinBox* max_box;
116 QCheckBox* gray_box;
117 QCheckBox* gdi_box;
118 QCheckBox* dw_box;
120 QComboBox* fallback_box;
122 QLabel* limit_label;
123 QSpinBox* limit_box;
124 QCheckBox* no_limit_box;
126 QLabel* increase_label;
127 QSpinBox* increase_box;
128 QCheckBox* no_increase_box;
130 QLineEdit* snapping_line;
132 QCheckBox* wincomp_box;
133 QCheckBox* pre_box;
134 QCheckBox* hint_box;
135 QCheckBox* symbol_box;
136 QCheckBox* info_box;
138 QPushButton* run_button;
140 QAction* exit_act;
141 QAction* about_act;
142 QAction* about_Qt_act;
144 QLocale* locale;
147 #endif // __MAINGUI_H__
149 // end of maingui.h