s/lower_upper/upper_lower/.
[ttfautohint.git] / frontend / maingui.h
blob61c2766536ee94469fbd2427d7eec1d8d02b9db0
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 <QMainWindow>
21 #include <stdio.h>
22 #include <ttfautohint.h>
24 class QAction;
25 class QLabel;
26 class QMenu;
27 class QLineEdit;
28 class QPushButton;
29 class QSpinBox;
30 class QComboBox;
31 class QCheckBox;
32 class QLocale;
33 class QFile;
35 class Main_GUI
36 : public QMainWindow
38 Q_OBJECT
40 public:
41 Main_GUI(int, int, int, bool, bool, bool, bool, int, bool);
43 protected:
44 void closeEvent(QCloseEvent*);
46 private slots:
47 void about();
48 void browse_input();
49 void browse_output();
50 void check_min();
51 void check_max();
52 void check_limit();
53 void check_no_limit();
54 void absolute_input();
55 void absolute_output();
56 void check_run();
57 void run();
59 private:
60 int hinting_range_min;
61 int hinting_range_max;
62 int hinting_limit;
63 int ignore_permissions;
64 int pre_hinting;
65 int increase_x_height;
66 int no_info;
67 int latin_fallback;
68 int symbol;
70 void create_layout();
71 void create_connections();
72 void create_actions();
73 void create_menus();
74 void create_status_bar();
75 void read_settings();
76 void write_settings();
78 int check_filenames(const QString&, const QString&);
79 int open_files(const QString&, FILE**, const QString&, FILE**);
80 int handle_error(TA_Error, const unsigned char*, QString);
82 QMenu* file_menu;
83 QMenu* help_menu;
85 QLineEdit* input_line;
86 QPushButton* input_button;
88 QLineEdit* output_line;
89 QPushButton* output_button;
91 QSpinBox* min_box;
92 QSpinBox* max_box;
94 QComboBox* fallback_box;
96 QLabel* limit_label;
97 QSpinBox* limit_box;
99 QCheckBox* no_limit_box;
101 QCheckBox* pre_box;
102 QCheckBox* increase_box;
103 QCheckBox* symbol_box;
105 QCheckBox* info_box;
107 QPushButton* run_button;
109 QAction* exit_act;
110 QAction* about_act;
111 QAction* about_Qt_act;
113 QLocale* locale;
116 #endif // __MAINGUI_H__
118 // end of maingui.h