Handle minimum and maximum spin boxes.
[ttfautohint.git] / frontend / maingui.h
blobf91a0bd42fd29bbc38efd4c0c448fa8d5846e025
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 <QMainWindow>
19 class QAction;
20 class QLabel;
21 class QMenu;
22 class QLineEdit;
23 class QPushButton;
24 class QSpinBox;
25 class QComboBox;
26 class QCheckBox;
28 class Main_GUI
29 : public QMainWindow
31 Q_OBJECT
33 public:
34 Main_GUI(int, int, bool, bool, int);
36 protected:
37 void close_event(QCloseEvent*);
39 private slots:
40 void about();
41 void browse_input();
42 void browse_output();
43 void check_min();
44 void check_max();
45 void check_run();
46 void run();
48 private:
49 int hinting_range_min;
50 int hinting_range_max;
51 int ignore_permissions;
52 int pre_hinting;
53 int latin_fallback;
55 void create_layout();
56 void create_connections();
57 void create_actions();
58 void create_menus();
59 void read_settings();
60 void write_settings();
62 QMenu* help_menu;
64 QLineEdit* input_line;
65 QPushButton* input_button;
67 QLineEdit* output_line;
68 QPushButton* output_button;
70 QSpinBox* min_box;
71 QSpinBox* max_box;
73 QComboBox* fallback_box;
75 QCheckBox* pre_box;
76 QCheckBox* ignore_box;
78 QPushButton* run_button;
80 QAction* exit_act;
81 QAction* about_act;
82 QAction* about_Qt_act;
85 #endif /* __MAINGUI_H__ */
87 // end of maingui.h