2 * Qt -> GUI -> CommonClasses
4 * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
6 * History : Jan 13 2015 : Split from x1turboz / menuclasses.h
9 #ifndef _CSP_QT_GUI_COMMONCLASSES_H
10 #define _CSP_QT_GUI_COMMONCLASSES_H
15 #include <QApplication>
16 #include <QButtonGroup>
17 #include <QGraphicsView>
18 #include <QHeaderView>
19 #include <QMainWindow>
27 #include <QtCore/QVariant>
28 #include <QtCore/QString>
29 #include <QtGui/QAction>
30 #include <QtGui/QApplication>
31 #include <QtGui/QButtonGroup>
32 #include <QtGui/QGraphicsView>
33 #include <QtGui/QHeaderView>
34 #include <QtGui/QMainWindow>
35 #include <QtGui/QMenu>
36 #include <QtGui/QMenuBar>
37 #include <QtGui/QStatusBar>
38 #include <QtGui/QWidget>
39 #include <QtGui/QIconSet>
42 #include "simd_types.h"
46 //#include "qt_main.h"
47 //#include "qt_gldraw.h"
51 //extern class EMU* emu;
54 typedef class DLL_PREFIX Object_Menu_Control: public QObject {
57 USING_FLAGS *using_flags;
58 Object_Menu_Control(QObject *parent, USING_FLAGS *p) : QObject(parent){
65 write_protect = false; // Enable to write
67 ~Object_Menu_Control() {}
76 int on_boot_mode(int);
78 int on_cpu_power(int);
79 int on_open_debugger(int);
81 int sig_insert_fd(int);
82 int sig_eject_fd(int);
83 int set_d88_slot(int, int);
84 int set_recent_disk(int, int);
85 int sig_write_protect_fd(int, bool);
86 int sig_device_type(int);
87 int sig_sound_device(int);
88 int sig_printer_device(int);
89 int sig_drive_type(int);
90 int sig_emu_update_config(void);
92 int set_recent_quick_disk(int, int);
93 int sig_write_protect_Qd(int, bool);
94 int sig_eject_Qd(int);
95 int sig_insert_Qd(int);
97 int sig_insert_cdrom(bool);
98 int sig_eject_cdrom(void);
99 int sig_recent_cdrom(int);
101 int sig_insert_play_cmt(bool);
102 int sig_eject_cmt(void);
103 int sig_recent_cmt(int);
104 int sig_set_write_protect_cmt(bool);
105 int sig_insert_cart(int);
106 int sig_eject_cart(int);
107 int set_recent_cart(int, int);
109 int sig_open_binary_file(int, QString, bool);
110 int sig_open_binary(int, bool);
111 int set_recent_binary_load(int, int);
112 int set_recent_binary_save(int, int);
115 int sig_insert_bubble(int);
116 int sig_eject_bubble(int);
117 int set_b77_slot(int, int);
118 int set_recent_bubble(int, int);
119 int sig_write_protect_bubble(int, bool);
122 int sig_latency(int);
123 int sig_sounddevice(int);
124 int sig_set_dipsw(int, bool);
125 int sig_screen_aspect(int);
126 int sig_screen_size(int, int);
127 int sig_screen_multiply(float);
129 void set_boot_mode(void);
130 void set_cpu_type(void);
131 void set_cpupower(void);
132 void open_debugger(void);
133 void do_set_write_protect_cmt(void);
134 void do_unset_write_protect_cmt(void);
135 void insert_fd(void);
137 void on_d88_slot(void);
138 void on_recent_disk(void);
139 void write_protect_fd(void);
140 void no_write_protect_fd(void);
141 void do_set_ignore_crc_error(bool flag);
142 void do_set_correct_disk_timing(bool flag);
144 void insert_bubble(void);
145 void eject_bubble(void);
146 void on_b77_slot(void);
147 void on_recent_bubble(void);
148 void write_protect_bubble(void);
149 void no_write_protect_bubble(void);
151 void set_screen_aspect(void);
152 void set_screen_size(void);
153 void do_set_device_type(void);
154 void do_set_drive_type(void);
155 void do_set_sound_device(void);
156 void do_set_printer_device(void);
158 void insert_Qd(void);
160 void on_recent_quick_disk(void);
161 void write_protect_Qd(void);
162 void no_write_protect_Qd(void);
164 void on_recent_binary_load(void);
165 void on_recent_binary_save(void);
166 void _open_binary(QString s);
167 void insert_binary_load(void);
168 void insert_binary_save(void);
170 void insert_cdrom(void);
171 void eject_cdrom(void);
172 void on_recent_cdrom();
174 void start_insert_play_cmt(void);
175 void eject_cmt(void);
176 void on_recent_cmt(void);
178 void on_set_freq(void);
179 void on_set_latency(void);
181 void insert_cart(void);
182 void eject_cart(void);
183 void on_recent_cart(void);
186 void setValue1(int v) {bindValue = v;}
187 int getValue1(void) {return bindValue;}
188 void setDrive(int num) { drive = num;}
189 int getDrive(void) { return drive;}
190 void setNumber(int num) { s_num = num;}
191 int getNumber(void) { return s_num;}
192 void setDoubleValue(double n) {double_val = n;}
193 double getDoubleValue(void) {return double_val;}
195 bool isPlay(void) { return play; }
196 void setPlay(bool b) { play = b; }
198 bool isWriteProtect(void) { return write_protect; }
199 void setWriteProtect(bool b) {write_protect = b;}
201 void do_save_as_movie(void);
202 void do_stop_saving_movie(void);
205 int sig_stop_record_movie();
206 int sig_start_record_movie(int);
207 } Object_Menu_Control ;
209 typedef class DLL_PREFIX Action_Control: public QAction {
212 // virtual void addedTo ( QWidget * actionWidget, QWidget * container ){}
213 // virtual void addedTo ( int index, QPopupMenu * menu ){}
216 Object_Menu_Control *binds;
217 Action_Control (QObject *parent, USING_FLAGS *p) : QAction(parent) {
218 binds = new Object_Menu_Control(parent, p);
225 void do_check_grab_mouse(bool);
226 void do_send_string(void);
227 void do_set_string(QString);
229 int quit_emu_thread(void);
230 int sig_send_string(QString);