message("* qt/osd")
-SET(THIS_LIB_VERSION 3.9.4)
+SET(THIS_LIB_VERSION 4.0.0)
set(s_qt_osd_headers
osd_base.h
dec_ctx = st->codec;
__dec = avcodec_find_decoder(dec_ctx->codec_id);
#else
- __dec = avcodec_find_decoder(st->codecpar->codec_id);
+ __dec = (AVCodec *)avcodec_find_decoder(st->codecpar->codec_id);
if (!__dec) {
//avcodec_free_context(&dec_ctx);
out_debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_MOVIE_LOADER, "Failed to find %s codec\n",
#include "libavformat/avformat.h"
#include "libswscale/swscale.h"
#include "libswresample/swresample.h"
+ #include "libavcodec/avcodec.h"
}
#endif
#include "libavformat/avformat.h"
#include "libswscale/swscale.h"
#include "libswresample/swresample.h"
+ #include "libavcodec/avcodec.h"
}
#endif
// Copy from FFMPEG-3.0.2; doc/example/muxing.c .
AVCodec **codec = (AVCodec **)_codec;
enum AVCodecID codec_id = (enum AVCodecID)_codec_id;
/* find the encoder */
- *codec = avcodec_find_encoder(codec_id);
+ *codec = (AVCodec *)avcodec_find_encoder(codec_id);
if (!(*codec)) {
out_debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_MOVIE_SAVER, "Could not find encoder for '%s'\n",
(const char *)avcodec_get_name(codec_id));
if (!oc)
return false;
- fmt = oc->oformat;
+ fmt = (AVOutputFormat *)(oc->oformat);
switch(p_config->video_codec_type) {
case VIDEO_CODEC_MPEG4:
fmt->video_codec = AV_CODEC_ID_MPEG4;
#if defined(USE_LIBAV)
if(output_context != NULL) {
AVFormatContext *oc = output_context;
- AVOutputFormat *fmt = oc->oformat;
+ AVOutputFormat *fmt = (AVOutputFormat *)(oc->oformat);
//AVPacket pkt = {0};
//AVCodecContext *c = video_st.st->codec;
bool a_f, v_f;
/* find decoder for the stream */
#if LIBAVCODEC_VERSION_MAJOR > 56
- dec = avcodec_find_decoder(st->codecpar->codec_id);
+ dec = (AVCodec *)avcodec_find_decoder(st->codecpar->codec_id);
if (!dec) {
out_debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_SOUND_LOADER, "Failed to find %s codec\n",
av_get_media_type_string(type));
#include "libavformat/avformat.h"
#include "libswscale/swscale.h"
#include "libswresample/swresample.h"
+ #include "libavcodec/avcodec.h"
}
#endif
int drvs;
hRunEmu = m;
- connect(hRunEmu, SIGNAL(message_changed(QString)), this, SLOT(message_status_bar(QString)));
- connect(hRunEmu, SIGNAL(sig_is_enable_mouse(bool)), glv, SLOT(do_set_mouse_enabled(bool)));
+ connect(hRunEmu, SIGNAL(message_changed(QString)), this, SLOT(message_status_bar(QString)), Qt::QueuedConnection);
+ connect(hRunEmu, SIGNAL(sig_is_enable_mouse(bool)), this, SLOT(do_set_mouse_enable(bool)));
connect(glv, SIGNAL(sig_key_down(uint32_t, uint32_t, bool)), hRunEmu, SLOT(do_key_down(uint32_t, uint32_t, bool)));
connect(glv, SIGNAL(sig_key_up(uint32_t, uint32_t)),hRunEmu, SLOT(do_key_up(uint32_t, uint32_t)));
connect(this, SIGNAL(sig_quit_widgets()), glv, SLOT(do_stop_run_vm()));
connect(menu_bubbles[ii],
SIGNAL(sig_update_inner_bubble(int ,QStringList , class Action_Control **, QStringList , int, bool)),
this,
- SLOT(do_update_inner_bubble(int ,QStringList , class Action_Control **, QStringList , int, bool)));
+ SLOT(do_update_inner_bubble(int ,QStringList , class Action_Control **, QStringList , int, bool))
+ );
}
#endif
hRunEmu->set_tape_play(false);
#if defined(USE_KEY_LOCKED) || defined(USE_LED_DEVICE)
- connect(hRunEmu, SIGNAL(sig_send_data_led(quint32)), this, SLOT(do_recv_data_led(quint32)));
+ connect(hRunEmu, SIGNAL(sig_send_data_led(quint32)), this, SLOT(do_recv_data_led(quint32)), Qt::QueuedConnection);
#endif
#ifdef USE_AUTO_KEY
connect(this, SIGNAL(sig_start_auto_key(QString)), hRunEmu, SLOT(do_start_auto_key(QString)));
emu->get_osd()->set_buttons();
#endif
csp_logger->debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_GENERAL, "DrawThread : Start.");
- connect(hDrawEmu, SIGNAL(sig_draw_frames(int)), hRunEmu, SLOT(print_framerate(int)));
+ connect(hDrawEmu, SIGNAL(sig_draw_frames(int)), hRunEmu, SLOT(print_framerate(int)), Qt::DirectConnection);
//connect((OSD*)(emu->get_osd()), SIGNAL(sig_draw_frames(int)), hRunEmu, SLOT(print_framerate(int)));
- connect(hRunEmu, SIGNAL(window_title_changed(QString)), this, SLOT(do_set_window_title(QString)));
+ connect(hRunEmu, SIGNAL(window_title_changed(QString)), this, SLOT(do_set_window_title(QString)), Qt::QueuedConnection);
connect(hDrawEmu, SIGNAL(message_changed(QString)), this, SLOT(message_status_bar(QString)));
connect(actionCapture_Screen, SIGNAL(triggered()), glv, SLOT(do_save_frame_screen()));
connect(this, SIGNAL(sig_emu_launched()), glv, SLOT(set_emu_launched()));
/*if(config.use_separate_thread_draw) {
- connect(hRunEmu, SIGNAL(sig_draw_thread(bool)), hDrawEmu, SLOT(doDraw(bool)), Qt::QueuedConnection);
- connect(hRunEmu, SIGNAL(sig_set_draw_fps(double)), hDrawEmu, SLOT(do_set_frames_per_second(double)), Qt::QueuedConnection);
- connect(hRunEmu, SIGNAL(sig_draw_one_turn(bool)), hDrawEmu, SLOT(do_draw_one_turn(bool)), Qt::QueuedConnection);
- } else*/ {
connect(hRunEmu, SIGNAL(sig_draw_thread(bool)), hDrawEmu, SLOT(doDraw(bool)));
connect(hRunEmu, SIGNAL(sig_set_draw_fps(double)), hDrawEmu, SLOT(do_set_frames_per_second(double)));
connect(hRunEmu, SIGNAL(sig_draw_one_turn(bool)), hDrawEmu, SLOT(do_draw_one_turn(bool)));
+ } else*/ {
+ connect(hRunEmu, SIGNAL(sig_draw_thread(bool)), hDrawEmu, SLOT(doDraw(bool)), Qt::DirectConnection);
+ connect(hRunEmu, SIGNAL(sig_set_draw_fps(double)), hDrawEmu, SLOT(do_set_frames_per_second(double)));
+ connect(hRunEmu, SIGNAL(sig_draw_one_turn(bool)), hDrawEmu, SLOT(do_draw_one_turn(bool)));
}
//connect(hRunEmu, SIGNAL(sig_draw_thread(bool)), (OSD*)(emu->get_osd()), SLOT(do_draw(bool)));
//connect(hRunEmu, SIGNAL(quit_draw_thread()), hDrawEmu, SLOT(doExit()));
#ifdef USE_MOUSE
connect(glv, SIGNAL(sig_toggle_mouse(void)),
this, SLOT(do_toggle_mouse(void)));
+ connect(glv, SIGNAL(sig_toggle_grab_mouse()), this, SLOT(do_toggle_mouse()));
#endif
connect(hRunEmu, SIGNAL(sig_resize_screen(int, int)),
- glv, SLOT(resizeGL(int, int)));
- connect(hRunEmu, SIGNAL(sig_resize_osd(int)), driveData, SLOT(setScreenWidth(int)));
- connect(hRunEmu, SIGNAL(sig_change_osd(int, int, QString)), driveData, SLOT(updateMessage(int, int, QString)));
+ glv, SLOT(resizeGL(int, int)), Qt::QueuedConnection);
+ connect(hRunEmu, SIGNAL(sig_resize_osd(int)), driveData, SLOT(setScreenWidth(int)), Qt::QueuedConnection);
+ connect(hRunEmu, SIGNAL(sig_change_osd(int, int, QString)), driveData, SLOT(updateMessage(int, int, QString)), Qt::QueuedConnection);
connect(glv, SIGNAL(sig_resize_uibar(int, int)),
- this, SLOT(resize_statusbar(int, int)));
+ this, SLOT(resize_statusbar(int, int)), Qt::QueuedConnection);
connect(hRunEmu, SIGNAL(sig_resize_uibar(int, int)),
- this, SLOT(resize_statusbar(int, int)));
+ this, SLOT(resize_statusbar(int, int)), Qt::QueuedConnection);
connect((OSD*)(emu->get_osd()), SIGNAL(sig_req_encueue_video(int, int, int)),
hDrawEmu, SLOT(do_req_encueue_video(int, int, int)));
csp_logger->debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_GENERAL, "MovieThread : Launch done.");
connect(action_SetupMovie, SIGNAL(triggered()), this, SLOT(rise_movie_dialog()));
- connect(hRunEmu, SIGNAL(sig_change_access_lamp(int, int, QString)), driveData, SLOT(updateLabel(int, int, QString)));
- connect(hRunEmu, SIGNAL(sig_set_access_lamp(int, bool)), graphicsView, SLOT(do_display_osd_leds(int, bool)));
- connect(hRunEmu, SIGNAL(sig_change_virtual_media(int, int, QString)), driveData, SLOT(updateMediaFileName(int, int, QString)));
+ connect(hRunEmu, SIGNAL(sig_change_access_lamp(int, int, QString)), driveData, SLOT(updateLabel(int, int, QString)), Qt::QueuedConnection);
+ connect(hRunEmu, SIGNAL(sig_set_access_lamp(int, bool)), graphicsView, SLOT(do_display_osd_leds(int, bool)), Qt::QueuedConnection);
+ connect(hRunEmu, SIGNAL(sig_change_virtual_media(int, int, QString)), driveData, SLOT(updateMediaFileName(int, int, QString)), Qt::QueuedConnection);
connect((OSD*)(emu->get_osd()), SIGNAL(sig_change_virtual_media(int, int, QString)), driveData, SLOT(updateMediaFileName(int, int, QString)));
connect((OSD*)(emu->get_osd()), SIGNAL(sig_enable_mouse()), glv, SLOT(do_enable_mouse()));
connect((OSD*)(emu->get_osd()), SIGNAL(sig_disable_mouse()), glv, SLOT(do_disable_mouse()));
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int no = cp->data.value<int>();
+ int no = cp->data().value<int>();
if((no < 0) || (no > 7)) return;
//emu->open_debugger(no);
width = desktop_width;
height = desktop_height;
} else {
- double nd = actionScreenSize[mode]->binds->getDoubleValue();
+ double nd = actionScreenSize[mode]->data().value<double>();
width = (int)(nd * (double)using_flags->get_screen_width());
height = (int)(nd * (double)using_flags->get_screen_height());
#include "menu_flags.h"
QT_BEGIN_NAMESPACE
-typedef class DLL_PREFIX Object_Menu_Control: public QObject {
+class DLL_PREFIX Action_Control: public QAction {
Q_OBJECT
-public:
- USING_FLAGS *using_flags;
-Object_Menu_Control(QObject *parent, USING_FLAGS *p) : QObject(parent){
- bindValue = 0;
- drive = 0;
- s_num = 0;
- double_val = 0.0;
- using_flags = p;
- p_config = p->get_config_ptr();
- play = true; // Read
- write_protect = false; // Enable to write
- _str.clear();
- }
- ~Object_Menu_Control() {}
protected:
- int bindValue;
- int drive;
- int s_num;
- bool play;
- bool write_protect;
- double double_val;
- QString _str;
- config_t *p_config;
- public:
- void setValue1(int v) {bindValue = v;}
- int getValue1(void) {return bindValue;}
- void setDrive(int num) { drive = num;}
- int getDrive(void) { return drive;}
- void setNumber(int num) { s_num = num;}
- int getNumber(void) { return s_num;}
- void setDoubleValue(double n) {double_val = n;}
- double getDoubleValue(void) {return double_val;}
- QString getStringValue(void) {return _str; }
- void setStringValue(QString s) { _str = s; }
- bool isPlay(void) { return play; }
- void setPlay(bool b) { play = b; }
-
- bool isWriteProtect(void) { return write_protect; }
- void setWriteProtect(bool b) {write_protect = b;}
-
-public slots:
- void on_set_host_sound_device(void);
- void set_boot_mode(void);
- void set_cpu_type(void);
- void set_cpupower(void);
- void open_debugger(void);
- void insert_fd(void);
- void eject_fd(void);
- void on_d88_slot(void);
- void on_recent_disk(void);
- void write_protect_fd(void);
- void no_write_protect_fd(void);
- void do_set_ignore_crc_error(bool flag);
- void do_set_correct_disk_timing(bool flag);
- void do_set_disk_count_immediate(bool flag);
- void do_special_reset(void);
- // Bubble
- void insert_bubble(void);
- void eject_bubble(void);
- void on_b77_slot(void);
- void on_recent_bubble(void);
- void write_protect_bubble(void);
- void no_write_protect_bubble(void);
-
- void set_screen_aspect(void);
- void set_screen_size(void);
- void do_set_screen_rotate(void);
- void do_set_device_type(void);
- void do_set_keyboard_type(void);
- void do_set_joystick_type(void);
- void do_set_mouse_type(void);
- void do_set_drive_type(void);
- void do_set_sound_device(void);
- void do_set_printer_device(void);
-
- void insert_Qd(void);
- void eject_Qd(void);
- void on_recent_quick_disk(void);
- void write_protect_Qd(void);
- void no_write_protect_Qd(void);
-
- void on_recent_binary_load(void);
- void on_recent_binary_save(void);
- void _open_binary(QString s);
- void insert_binary_load(void);
- void insert_binary_save(void);
-
- void insert_laserdisc(void);
- void eject_laserdisc(void);
- void on_recent_laserdisc();
-
- void on_set_freq(void);
- void on_set_latency(void);
-
- void insert_cart(void);
- void eject_cart(void);
- void on_recent_cart(void);
- void do_save_as_movie(void);
- void do_stop_saving_movie(void);
- void do_set_monitor_type();
- void do_select_fixed_cpu(void);
-
- void do_select_machine_feature_single(void);
-
-signals:
- int on_boot_mode(int);
- int on_cpu_type(int);
- int on_cpu_power(int);
- int on_open_debugger(int);
- int sig_specialreset(int);
- int sig_insert_fd(int);
- int sig_eject_fd(int);
- int set_d88_slot(int, int);
- int set_recent_disk(int, int);
- int sig_write_protect_fd(int, bool);
- int sig_device_type(int);
- int sig_keyboard_type(int);
- int sig_joystick_type(int);
- int sig_mouse_type(int);
- int sig_sound_device(int);
- int sig_printer_device(int);
- int sig_drive_type(int);
- int sig_emu_update_config(void);
- int sig_set_machine_feature(int, uint32_t);
-
- int set_recent_quick_disk(int, int);
- int sig_write_protect_Qd(int, bool);
- int sig_eject_Qd(int);
- int sig_insert_Qd(int);
-
- int sig_recent_cdrom(int);
-
- int sig_insert_laserdisc(bool);
- int sig_eject_laserdisc(void);
- int sig_recent_laserdisc(int);
-
- int sig_insert_cart(int);
- int sig_eject_cart(int);
- int set_recent_cart(int, int);
-
- int sig_open_binary_file(int, QString, bool);
- int sig_open_binary(int, bool);
- int set_recent_binary_load(int, int);
- int set_recent_binary_save(int, int);
-
- // bubble
- int sig_insert_bubble(int);
- int sig_eject_bubble(int);
- int set_b77_slot(int, int);
- int set_recent_bubble(int, int);
- int sig_write_protect_bubble(int, bool);
-
- int sig_freq(int);
- int sig_latency(int);
- int sig_sounddevice(int);
- int sig_set_host_sound_device(int);
- int sig_set_dipsw(int, bool);
- int sig_screen_aspect(int);
- int sig_screen_size(int, int);
- int sig_screen_multiply(float);
- int sig_screen_rotate(int);
-
- int sig_monitor_type(int);
- int sig_set_fixed_cpu(int);
-
-signals:
- int sig_stop_record_movie();
- int sig_start_record_movie(int);
-} Object_Menu_Control ;
-
-
-
-typedef class DLL_PREFIX Action_Control: public QAction {
- Q_OBJECT
- protected:
// virtual void addedTo ( QWidget * actionWidget, QWidget * container ){}
// virtual void addedTo ( int index, QPopupMenu * menu ){}
QString bindString;
- public:
+public:
//Object_Menu_Control *binds;
Action_Control (QObject *parent, USING_FLAGS *p) : QAction(parent) {
//binds = new Object_Menu_Control(parent, p);
//delete binds;
}
public slots:
- void do_check_grab_mouse(bool);
- void do_send_string(void);
- void do_set_string(QString);
- void do_set_dev_log_to_console(bool f);
- void do_set_dev_log_to_syslog(bool f);
- void do_select_render_platform(void);
- void do_save_state(void);
- void do_load_state(void);
void do_set_window_focus_type(bool flag);
- void do_set_emulate_cursor_as(void);
signals:
int quit_emu_thread(void);
- int sig_send_string(QString);
int sig_set_dev_log_to_console(int, bool);
int sig_set_dev_log_to_syslog(int, bool);
- int sig_select_render_platform(int);
int sig_set_window_focus_type(bool);
- int sig_set_emulate_cursor_as(int);
-} ActionControl;
+};
QT_END_NAMESPACE
#endif
QString tmps;
if(num < 0) return;
if(num > (CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0)) return;
+
+ QMutexLocker locker(lock_mutex);
if(devname == NULL) {
QString s;
s.setNum(num);
if(num < 0) return;
if(num > (CSP_LOG_TYPE_VM_CPU7 - CSP_LOG_TYPE_VM_CPU0)) return;
if(devname == NULL) return;
+ QMutexLocker locker(lock_mutex);
+
QString tmps = QString::fromUtf8(devname);
device_names.replace(num, tmps);
if(max_cpus <= num) max_cpus = num + 1;
{
if(to_output < 0) return;
if(to_output > 2) return;
+ QMutexLocker locker(lock_mutex);
switch(to_output)
{
case 0:
if(to_output < 0) return;
if(to_output > 2) return;
if(device_id > (CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0)) return;
+ QMutexLocker locker(lock_mutex);
if(device_id < 0) { // Flush all device
for(int i = 0; i < (CSP_LOG_TYPE_VM_DEVICE_END - CSP_LOG_TYPE_VM_DEVICE_0 + 1); i++) {
// 0 = record, 1 = syslog, 2 = console;
void set_emu_vm_name(const char *devname);
void set_device_name(int num, char *devname);
void set_cpu_name(int num, char *devname);
- void set_device_node_log(int device_id, int to_output, int type, bool flag);
- void set_device_node_log(int to_output, int type, bool* flags, int start, int devices);
- void set_device_node_log(int to_output, int type, int *flags, int start, int devices);
void set_state_log(int to_output, bool flag);
void *get_raw_data(bool forget = false, int64_t start = 0, int64_t *end_line = NULL);
public slots:
void do_debug_log(int level, int domain_num, QString mes);
+ void set_device_node_log(int device_id, int to_output, int type, bool flag);
+ void set_device_node_log(int to_output, int type, bool* flags, int start, int devices);
+ void set_device_node_log(int to_output, int type, int *flags, int start, int devices);
+
signals:
int sig_console_message(QString, QString);
int sig_console_quit();
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int num = cp->data.value<int>();
+ int num = cp->data().value<int>();
if(num < 0) return;
if(num >= using_flags->get_use_special_reset_num()) return;
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- QString s = cp->data.toString();
+ QString s = cp->data().toString();
lStateFile = s;
bLoadStateReq = true;
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- QString s = cp->data.toString();
+ QString s = cp->data().toString();
sStateFile = s;
bSaveStateReq = true;
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int cpunum = cp->data.value<int>();
+ int cpunum = cp->data().value<int>();
set_emu_thread_to_fixed_cpu(cpunum);
}
void doExit(void);
void do_reset();
- void do_special_reset(int num);
- void do_load_state(QString name);
- void do_save_state(QString name);
+ void do_special_reset(void);
+ void do_load_state();
+ void do_save_state();
void do_update_config();
void do_start_record_sound();
void do_stop_record_sound();
- void do_start_record_video(int fps);
+ void do_start_record_video();
void do_stop_record_video();
void do_update_volume_level(int num, int level);
void do_update_volume_balance(int num, int level);
void do_block();
void do_unblock();
void do_start_emu_thread();
-
+ void do_set_emu_thread_to_fixed_cpu_from_action();
// From emu_thread_slots.cpp .
void do_set_display_size(int w, int h, int ww, int wh);
void moved_mouse(double x, double y, double globalx, double globaly);
int sig_screen_size(int, int);
int sig_finished(void);
int call_emu_thread(EMU *);
- int sig_check_grab_mouse(bool);
int sig_mouse_enable(bool);
int sig_update_recent_disk(int);
int sig_update_recent_hard_disk(int);
virtual void do_set_led_width(int bitwidth) { }
virtual bool is_mapped_buffer(void) { return false; }
virtual GLuint get_mapped_buffer_num(int region) { return (GLuint)0; }
- virtual void do_set_fixed_size(int w, int h) { setFixedSize(w, h); }
-
signals:
int sig_push_image_to_movie(int, int, int, QImage *);
};
#ifndef _CSP_QT_MAINWIDGET_BASE_H
#define _CSP_QT_MAINWIDGET_BASE_H
-//#include <QVariant>
-//#include <QObject>
-//#include <QApplication>
+#include <QVariant>
+#include <QObject>
+#include <QApplication>
#include <QMainWindow>
#include <QIcon>
#include <QString>
#include <QStringList>
#include <QMap>
-//#include <QMenu>
+#include <QAction>
//#include <QMenuBar>
#include "common.h"
class OSD;
class QVariant;
-class QAction;
class QActionGroup;
class QButtonGroup;
class QGraphicsView;
virtual QString get_system_version();
virtual QString get_build_date();
QString get_gui_version();
+ void set_screen_size(int w, int h);
+ void set_screen_aspect(int num);
+ void update_screen_size(int num);
// Basic slots
public slots:
void do_recv_data_led(quint32 d);
void do_update_volume(int level);
- void set_screen_aspect(int num);
- void set_screen_size(int w, int h);
- void do_set_screen_rotate(int type);
+ void do_set_screen_aspect(void);
+ void do_set_screen_size(void);
+ void do_set_screen_rotate(void);
void OnReset(void);
- void do_special_reset(int);
virtual void do_set_mouse_enable(bool flag);
virtual void do_toggle_mouse(void);
- void do_set_sound_device(int);
+ void do_set_sound_device(void);
void do_emu_update_volume_balance(int num, int level);
void do_emu_update_volume_level(int num, int level);
void rise_log_viewer(void);
void rise_joykey_dialog(void);
void rise_keyboard_dialog(void);
virtual void rise_movie_dialog(void);
- void do_stop_saving_movie(void);
- void do_start_saving_movie(void);
void do_set_state_saving_movie(bool state);
void set_osd_virtual_media(bool f);
virtual void OnCloseDebugger(void);
void doBeforeCloseMainWindow(void);
void set_gl_crt_filter(bool);
- void set_cpu_power(void)
+ void do_set_cpu_power(void)
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int pw = cp->data.value<int>();
+ int pw = cp->data().value<int>();
OnCpuPower(pw);
}
void CreateBinaryMenu(int drv, int drv_base);
void CreateBinaryPulldownMenu(int drv);
void ConfigBinaryMenuSub(int drv);
- int set_recent_binary_load(int drv, int num);
- int set_recent_binary_save(int drv, int num);
+ int set_recent_binary_load(void);
+ int set_recent_binary_save(void);
void _open_binary_load(int drive, const QString fname);
void _open_binary_save(int drive, const QString fname);
void _open_cart(int drv, const QString fname);
void eject_cmt(int drv);
- void do_change_boot_mode(int mode);
- void do_change_cpu_type(int mode);
+ void do_change_boot_mode();
+ void do_change_cpu_type();
void do_write_protect_cmt(int drv, bool flag);
int set_recent_cmt(int drv, int num);
int set_recent_hard_disk(int, int);
void start_record_sound(bool rec);
- void set_freq(int);
- void set_latency(int);
- void set_sound_device(int);
+ void do_set_freq(void);
+ void do_set_latency(void);
void do_set_sound_strict_rendering(bool f);
void do_set_sound_tape_signal(bool f);
void do_set_sound_tape_voice(bool f);
- void do_set_host_sound_device(int num);
+ void do_set_host_sound_device(void);
void do_set_host_sound_name(int num, QString sname);
void set_monitor_type(void);
void message_status_bar(QString);
void resize_statusbar(int w, int h);
virtual void do_release_emu_resources(void);
virtual void set_window_title();
- void set_device_type(int);
- void set_mouse_type(int);
- void set_keyboard_type(int);
- void set_joystick_type(int);
- void set_drive_type(int);
+ void set_device_type(void);
+ void set_mouse_type(void);
+ void set_keyboard_type(void);
+ void set_joystick_type(void);
+ void set_drive_type();
void set_scan_line(bool);
void set_gl_scan_line_vert(bool);
void set_gl_scan_line_horiz(bool);
- void set_printer_device(int);
+ void set_printer_device();
void do_show_about(void);
void do_browse_document(void);
void set_dipsw(int num, bool flag);
void do_set_conslog(bool);
void do_set_syslog(bool);
void do_update_device_node_name(int id, const _TCHAR *name);
- void do_set_dev_log_to_console(int id, bool f);
- void do_set_dev_log_to_syslog(int id, bool f);
+ void do_set_dev_log_to_console(bool f);
+ void do_set_dev_log_to_syslog(bool f);
void do_set_roma_kana(bool f);
void do_set_numpad_enter_as_fullkey(bool f);
void do_set_render_mode_std(void);
void do_set_render_mode_tv(void);
- void do_select_render_platform(int num);
+ void do_select_render_platform(void);
void do_set_window_focus_type(bool flag);
void do_set_visible_virtual_media_none();
void do_set_visible_virtual_media_left();
void do_set_visible_virtual_media_right();
- void do_set_emulate_cursor_as(int num);
+ void do_set_emulate_cursor_as(void);
void do_set_logging_fdc(bool onoff);
void do_set_separate_thread_draw(bool f);
void do_set_print_cpu_statistics(bool flag);
void do_set_machine_feature(int devnum, uint32_t value);
+ void do_set_single_dipswitch(bool f);
+
void do_start_emu_thread();
void do_start_draw_thread();
signals:
int sig_start_saving_movie(void);
int on_boot_mode(int);
int on_cpu_type(int);
- int on_cpu_power(int);
int on_open_debugger(int);
int on_insert_fd(int);
int on_eject_fd(int);
- int do_open_disk(int, QString);
+ int sig_open_disk(int, QString);
int closed(void);
int sig_quit_all(void);
int sig_vm_reset(void);
int sig_vm_specialreset(int);
- int sig_check_grab_mouse(bool);
int sig_resize_uibar(int, int);
int sig_resize_screen(int, int);
int sig_update_screen(void);
int sig_emu_update_volume_balance(int, int);
int sig_resize_osd(int);
+ int sig_screen_multiply(double);
int sig_write_protect_disk(int drv, bool flag);
int sig_open_disk(int, QString, int);
int sig_start_emu_thread(void);
int sig_start_draw_thread(void);
int sig_emu_launched(void);
+ int sig_glv_set_fixed_size(int, int);
+
+ int sig_set_device_node_log(int, int, int, bool);
+ int sig_set_device_node_log(int, int, bool*, int, int);
+ int sig_set_device_node_log(int, int, int*, int, int);
};
QT_END_NAMESPACE
#include "qt_dialogs.h"
//#include "csp_logger.h"
+
+void Ui_MainWindowBase::do_set_single_dipswitch(bool f)
+{
+ QAction *cp = qobject_cast<QAction*>(QObject::sender());
+ if(cp == nullptr) return;
+ uint32_t nval = cp->data().value<uint32_t>();
+
+ if(p_config == nullptr) return;
+ if(f) { // ON
+ p_config->dipswitch |= nval;
+ } else { // OFF
+ p_config->dipswitch &= (~nval);
+ }
+ emit sig_emu_update_config();
+}
+
void Ui_MainWindowBase::do_block_task(void)
{
emit sig_block_task();
emit sig_start_draw_thread();
}
-void Ui_MainWindowBase::set_latency(void)
+void Ui_MainWindowBase::do_set_latency(void)
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
emit sig_emu_update_config();
}
-void Ui_MainWindowBase::set_freq(void)
+void Ui_MainWindowBase::do_set_freq(void)
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
emit sig_emu_update_config();
}
-void Ui_MainWindowBase::set_sound_device(void)
+void Ui_MainWindowBase::do_set_sound_device(void)
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
emit sig_emu_update_config();
}
-
-
void Ui_MainWindowBase::start_record_sound(bool start)
{
if(start) {
float xzoom = using_flags->get_screen_x_zoom();
float yzoom = using_flags->get_screen_y_zoom();
nd = getScreenMultiply(num);
- if(nd <= 0.0f) retrun;
+ if(nd <= 0.0f) return;
ww = (float)using_flags->get_screen_width();
hh = (float)using_flags->get_screen_height();
w = (int)ww;
h = (int)hh;
set_screen_size(w, h);
- emit sig_screen_multiply(nd);
-
+ emit sig_screen_multiply((double)nd);
}
void Ui_MainWindowBase::set_gl_crt_filter(bool flag)
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int num = cp->data.value<int>();
+ int num = cp->data().value<int>();
if((num >= using_flags->get_use_device_type()) && (num < 0)) return;
p_config->device_type = num;
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int num = cp->data.value<int>();
+ int num = cp->data().value<int>();
if((num >= using_flags->get_use_keyboard_type()) && (num < 0)) return;
p_config->keyboard_type = num;
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int num = cp->data.value<int>();
+ int num = cp->data().value<int>();
if((num >= using_flags->get_use_joystick_type()) && (num < 0)) return;
p_config->joystick_type = num;
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int num = cp->data.value<int>();
+ int num = cp->data().value<int>();
if((num >= using_flags->get_use_drive_type()) && (num < 0)) return;
p_config->drive_type = num;
MainWindow->adjustSize();
}
-void Ui_MainWindowBase::set_screen_aspect(void)
+void Ui_MainWindowBase::set_screen_aspect(int num)
{
- QAction *cp = qobject_cast<QAction*>(QObject::sender());
- if(cp == nullptr) return;
- int num = cp->data.value<int>();
-
if((num < 0) || (num >= 4)) return;
// 0 = DOT
// 1 = ASPECT(Scale X)
// 2 = ASPECT(SCale Y)
// 3 = ASPECT(Scale X,Y)
-
p_config->window_stretch_type = num;
if(using_flags->get_emu()) {
}
}
+void Ui_MainWindowBase::do_set_screen_aspect(void)
+{
+ QAction *cp = qobject_cast<QAction*>(QObject::sender());
+ if(cp == nullptr) return;
+ int num = cp->data().value<int>();
+ set_screen_aspect(num);
+}
+
void Ui_MainWindowBase::ConfigDeviceType(void)
{
menuSoundDevice->addAction(actionSoundDevice[i]);
actionGroup_SoundDevice->addAction(actionSoundDevice[i]);
connect(actionSoundDevice[i], SIGNAL(triggered()),
- this, SLOT(set_sound_device()));
+ this, SLOT(do_set_sound_device()));
}
}
}
for(i = 0; i < ilim; i++) {
actionPrintDevice[i] = new Action_Control(this, using_flags);
actionPrintDevice[i]->setCheckable(true);
- actionPrintDevice[i]->setData(QVariant(ii));
+ actionPrintDevice[i]->setData(QVariant(i));
if(i == p_config->printer_type) actionPrintDevice[i]->setChecked(true); // Need to write configure
tmps = QString::fromUtf8("actionPrintDevice_");
actionPrintDevice[i]->setObjectName(tmps + QString::number(i));
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int p_type = cp->data.value<int>();
+ int p_type = cp->data().value<int>();
// 0 = PRNFILE
if(p_type < 0) p_type = 0; // OK?
struct CSP_Ui_Menu::DriveIndexPair tmp;
tmp.drive = media_drive;
tmp.index = ii;
- action_recent_save_list[ii]->setData(QVariant(tmp));
+ QVariant _tmpv;
+ _tmpv.setValue(tmp);
+ action_recent_save_list[ii]->setData(_tmpv);
action_recent_save_list[ii]->setText(tmps);
action_group_save_recent->addAction(action_recent_save_list[ii]);
action_eject->setVisible(false);
for(ii = 0; ii < MAX_HISTORY; ii++) {
connect(action_recent_save_list[ii], SIGNAL(triggered()),
- p_wid, SLOT(set_recent_binary_save());
+ p_wid, SLOT(set_recent_binary_save()));
}
connect(action_saving, SIGNAL(triggered()), this, SLOT(do_open_save_dialog()));
QObject::connect(&dlg, SIGNAL(fileSelected(QString)),
dlg.param, SLOT(_open_disk(QString)));
- QObject::connect(dlg.param, SIGNAL(do_open_disk(int, QString)),
+ QObject::connect(dlg.param, SIGNAL(sig_open_disk(int, QString)),
this, SLOT(do_open_media_save(int, QString)));
dlg.show();
dlg.exec();
#include "mainwidget_base.h"
#include "menu_flags.h"
-//extern USING_FLAGS *using_flags;
-void Object_Menu_Control::do_select_fixed_cpu(void)
-{
- emit sig_set_fixed_cpu(getValue1());
-}
-
-// ToDo: Call dialogs.
-void Object_Menu_Control::do_select_machine_feature_single(void)
-{
- int devnum = getNumber();
- uint32_t value = (uint32_t)getValue1();
- emit sig_set_machine_feature(devnum, value);
- // Not NEED to call sig_emu_update_config()
-}
-
-void Object_Menu_Control::do_set_monitor_type()
-{
- emit sig_monitor_type(getValue1());
-}
-
-void Object_Menu_Control::do_special_reset(void)
-{
-// csp_logger->debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_GUI, _T("Special reset #%d"), getValue1());
- emit sig_specialreset(getValue1());
-}
-
-void Object_Menu_Control::set_boot_mode(void) {
- emit on_boot_mode(bindValue);
-}
-
-void Object_Menu_Control::set_cpu_type(void) {
- emit on_cpu_type(bindValue);
-}
-void Object_Menu_Control::set_cpupower(void) {
- emit on_cpu_power(bindValue);
-}
-void Object_Menu_Control::open_debugger(void) {
- emit on_open_debugger(bindValue);
-}
-void Object_Menu_Control::do_set_device_type(void){
- emit sig_device_type(this->getValue1());
-}
-void Object_Menu_Control::do_set_joystick_type(void){
- emit sig_joystick_type(this->getValue1());
-}
-void Object_Menu_Control::do_set_keyboard_type(void){
- emit sig_keyboard_type(this->getValue1());
-}
-void Object_Menu_Control::do_set_mouse_type(void){
- emit sig_mouse_type(this->getValue1());
-}
-void Object_Menu_Control::do_set_printer_device(void){
- emit sig_printer_device(this->getValue1());
-}
-void Object_Menu_Control::do_set_sound_device(void){
- emit sig_sound_device(this->getValue1());
-}
-void Object_Menu_Control::do_set_drive_type(void)
-{
- emit sig_drive_type(getValue1());
-}
-
void Ui_MainWindowBase::ConfigCpuSpeed(void)
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int mode = cp->data.value<int>();
+ int mode = cp->data().value<int>();
if((mode < 0) || (mode >= 8)) return;
p_config->boot_mode = mode;
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int num = cp->data.value<int>();
+ int mode = cp->data().value<int>();
if((mode < 0) || (mode >= 8)) return;
p_config->cpu_type = mode;
actionSpecial_Reset[i] = new Action_Control(this, using_flags);
actionSpecial_Reset[i]->setObjectName(tmps);
actionSpecial_Reset[i]->setData(QVariant(i));
- connect(actionSpecial_Reset[i], SIGNAL(triggered()),
- this, SLOT(do_special_reset())); // OK?
if(i >= 15) break;
}
}
}
}
-void Ui_MainWindowBase::do_set_sound_device(int num)
-{
- if((num < 0) || (num >= using_flags->get_use_sound_device_type())) return;
- p_config->sound_type = num;
- emit sig_emu_update_config();
-}
emit sig_create_d88_media((int)media_drive, media_type, name);
}
+void Menu_FDClass::do_set_correct_disk_timing(bool flag)
+{
+ QAction *cp = qobject_cast<QAction*>(QObject::sender());
+ if(cp == nullptr) return;
+ int drive = cp->data().value<int>();
+ if(p_config == nullptr) return;
+
+ p_config->correct_disk_timing[drive] = flag;
+ emit sig_emu_update_config();
+}
+
+void Menu_FDClass::do_set_disk_count_immediate(bool flag)
+{
+ QAction *cp = qobject_cast<QAction*>(QObject::sender());
+ if(cp == nullptr) return;
+ int drive = cp->data().value<int>();
+ if(p_config == nullptr) return;
+
+ p_config->disk_count_immediate[drive] = flag;
+ emit sig_emu_update_config();
+}
+
+void Menu_FDClass::do_set_ignore_crc_error(bool flag)
+{
+ QAction *cp = qobject_cast<QAction*>(QObject::sender());
+ if(cp == nullptr) return;
+ int drive = cp->data().value<int>();
+
+ if(p_config == nullptr) return;
+ p_config->ignore_disk_crc[drive] = flag;
+ emit sig_emu_update_config();
+}
void Menu_FDClass::create_pulldown_menu_device_sub(void)
{
config_t *p;
+ struct CSP_Ui_Menu::DriveIndexPair tmp;
+
action_ignore_crc_error = new Action_Control(p_wid, using_flags);
action_ignore_crc_error->setVisible(true);
action_ignore_crc_error->setCheckable(true);
- action_ignore_crc_error->binds->setDrive(media_drive);
+ tmp.drive = media_drive;
+ tmp.index = 0;
+ QVariant _tmp_ic;
+ _tmp_ic.setValue(tmp);
+ action_ignore_crc_error->setData(_tmp_ic);
+
action_correct_timing = new Action_Control(p_wid, using_flags);
action_correct_timing->setVisible(true);
action_correct_timing->setCheckable(true);
- action_correct_timing->binds->setDrive(media_drive);
+ QVariant _tmp_ct;
+ _tmp_ct.setValue(tmp);
+ action_correct_timing->setData(_tmp_ct);
action_count_immediate = new Action_Control(p_wid, using_flags);
action_count_immediate->setVisible(true);
action_count_immediate->setCheckable(true);
- action_count_immediate->binds->setDrive(media_drive);
+ QVariant _tmp_ci;
+ _tmp_ci.setValue(tmp);
+ action_count_immediate->setData(_tmp_ci);
action_create_fd = new Action_Control(p_wid, using_flags);
action_create_fd->setVisible(true);
this->addAction(action_count_immediate);
connect(action_ignore_crc_error, SIGNAL(toggled(bool)),
- action_ignore_crc_error->binds, SLOT(do_set_ignore_crc_error(bool)));
+ this, SLOT(do_set_ignore_crc_error(bool)));
connect(action_correct_timing, SIGNAL(toggled(bool)),
- action_correct_timing->binds, SLOT(do_set_correct_disk_timing(bool)));
+ this, SLOT(do_set_correct_disk_timing(bool)));
connect(action_count_immediate, SIGNAL(toggled(bool)),
- action_count_immediate->binds, SLOT(do_set_disk_count_immediate(bool)));
+ this, SLOT(do_set_disk_count_immediate(bool)));
connect(action_create_fd, SIGNAL(triggered()), this, SLOT(do_open_dialog_create_fd()));
connect(this, SIGNAL(sig_open_media(int, QString)), p_wid, SLOT(_open_disk(int, QString)));
connect(this, SIGNAL(sig_eject_media(int)), p_wid, SLOT(eject_fd(int)));
+
connect(this, SIGNAL(sig_write_protect_media(int, bool)), p_wid, SLOT(write_protect_fd(int, bool)));
connect(this, SIGNAL(sig_set_recent_media(int, int)), p_wid, SLOT(set_recent_disk(int, int)));
connect(this, SIGNAL(sig_set_inner_slot(int, int)), p_wid, SLOT(set_d88_slot(int, int)));
}
+
void retranslate_pulldown_menu_device_sub(void);
public slots:
+ void do_set_create_mask(quint8 type, bool flag);
+
void do_open_dialog_create_fd();
void do_create_media(quint8 media_type, QString name);
- void do_set_create_mask(quint8 type, bool flag);
+
+ void do_set_disk_count_immediate(bool flag);
+ void do_set_ignore_crc_error(bool flag);
+ void do_set_correct_disk_timing(bool flag);
+
signals:
int sig_create_d88_media(int, quint8, QString);
};
phys_key_name_map.clear();
hRunJoy = NULL;
about_to_close = false;
-
+ if(csp_logger != nullptr) {
+ connect(this, SIGNAL(sig_set_device_node_log(int, int, int, bool)),
+ csp_logger, SLOT(set_device_node_log(int, int, int, bool)), Qt::QueuedConnection);
+ connect(this, SIGNAL(sig_set_device_node_log(int, int, bool*, int, int)),
+ csp_logger, SLOT(set_device_node_log(int, int, bool*, int, int)), Qt::QueuedConnection);
+ connect(this, SIGNAL(sig_set_device_node_log(int, int, int*, int, int)),
+ csp_logger, SLOT(set_device_node_log(int, int, int*, int, int)), Qt::QueuedConnection);
+
+ }
}
Ui_MainWindowBase::~Ui_MainWindowBase()
return retval;
}
-void Action_Control::do_check_grab_mouse(bool flag)
-{
- this->toggle();
-}
-
-void Action_Control::do_select_render_platform(void)
-{
- int num = this->binds->getValue1();
- emit sig_select_render_platform(num);
-}
void Action_Control::do_set_window_focus_type(bool f)
{
emit sig_set_window_focus_type(f);
}
-void Action_Control::do_set_emulate_cursor_as(void)
-{
- int num = this->binds->getValue1();
- emit sig_set_emulate_cursor_as(num);
-}
dlg->show();
}
-, __action, SLOT(do_send_string())); \
- connect(__action, SIGNAL(sig_send_string(QString)),
void Ui_MainWindowBase::do_browse_document()
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- QString fname = cp->data.toString();
+ QString fname = cp->data().toString();
Dlg_BrowseText *dlg = new Dlg_BrowseText(fname, using_flags);
dlg->show();
emit sig_emu_update_config();
}
-void Ui_MainWindowBase::do_set_dev_log_to_console(int num, bool f)
+void Ui_MainWindowBase::do_set_dev_log_to_console(bool f)
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int num = cp->data.value<int>();
+ int num = cp->data().value<int>();
csp_logger->set_device_node_log(num, 2, CSP_LOG_DEBUG, f);
p_config->dev_log_to_console[num][0] = f;
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int num = cp->data.value<int>();
+ int num = cp->data().value<int>();
if((num < 0) || (num > 2)) return;
p_config->cursor_as_ten_key = num;
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int num = cp->data.value<int>();
+ int num = cp->data().value<int>();
csp_logger->set_device_node_log(num, 2, CSP_LOG_DEBUG, f);
p_config->dev_log_to_syslog[num][0] = f;
{
QAction *cp = qobject_cast<QAction*>(QObject::sender());
if(cp == nullptr) return;
- int num = cp->data.value<int>();
+ int num = cp->data().value<int>();
int _major = 0;
int _minor = 0;
// actionMouseEnable->setChecked(false);
// connect(actionMouseEnable, SIGNAL(toggled(bool)),
// this, SLOT(do_set_mouse_enable(bool)));
- connect(graphicsView, SIGNAL(sig_check_grab_mouse(bool)),
- actionMouseEnable, SLOT(do_check_grab_mouse(bool)));
menuMachine->addAction(actionMouseEnable);
}
if(using_flags->is_use_ram_size()) {
if(p_config->window_mode >= using_flags->get_screen_mode_num()) p_config->window_mode = using_flags->get_screen_mode_num() - 1;
w = using_flags->get_screen_width();
h = using_flags->get_screen_height();
- if(actionScreenSize[p_config->window_mode] != NULL) {
- double nd = actionScreenSize[p_config->window_mode]->binds->getDoubleValue();
+ if(actionScreenSize[p_config->window_mode] != nullptr) {
+ double nd = getScreenMultiply(p_config->window_mode);
w = (int)(nd * (double)w);
h = (int)(nd * (double)h);
switch(p_config->rotate_type) {
}
}
graphicsView->setFixedSize(w, h);
- connect(this, SIGNAL(sig_screen_multiply(float)), graphicsView, SLOT(do_set_screen_multiply(float)), Qt::QueuedConnection);
+ connect(this, SIGNAL(sig_screen_multiply(double)), graphicsView, SLOT(do_set_screen_multiply(double)), Qt::QueuedConnection);
connect(this, SIGNAL(sig_glv_set_fixed_size(int, int)), graphicsView, SLOT(do_set_fixed_size(int, int)), Qt::QueuedConnection);
set_screen_size(w, h);
set_screen_aspect(p_config->window_stretch_type);
{
- float nd = getScreenMultiply(p_config->window_mode);
+ double nd = getScreenMultiply(p_config->window_mode);
if(nd > 0.0f) {
graphicsView->do_set_screen_multiply(nd);
}
icon_write_enabled = QIcon();
setToolTipsVisible(true);
+ connect(this, SIGNAL(sig_emu_update_config()), p_wid, SLOT(do_emu_update_config()));
+
tmps = QString::fromUtf8("%1").arg(drv + base_drv);
tmps = desc + tmps;
setTitle(tmps);
initial_dir = QString::fromLocal8Bit(s);
}
-void Menu_MetaClass::do_open_media(int drv, QString name) {
+void Menu_MetaClass::do_open_media(int drv, QString name)
+{
//write_protect = false; // Right? On D88, May be writing entry exists.
emit sig_open_media(drv, name);
}
-void Menu_MetaClass::do_insert_media(void) {
+void Menu_MetaClass::do_insert_media(void)
+{
//write_protect = false; // Right? On D88, May be writing entry exists.
emit sig_insert_media(media_drive);
}
-void Menu_MetaClass::do_eject_media(void) {
+
+void Menu_MetaClass::do_eject_media(void)
+{
write_protect = false;
emit sig_eject_media(media_drive);
}
-void Menu_MetaClass::do_open_inner_media(int drv, int s_num) {
- emit sig_set_inner_slot(media_drive, s_num);
+void Menu_MetaClass::do_open_inner_media(void)
+{
+ QAction *cp = qobject_cast<QAction*>(QObject::sender());
+ if(cp == nullptr) return;
+ struct CSP_Ui_Menu::DriveIndexPair tmp = cp->data().value<CSP_Ui_Menu::DriveIndexPair>();
+
+ emit sig_set_inner_slot(tmp.drive, tmp.index);
}
-void Menu_MetaClass::do_open_recent_media(int drv, int s_num){
+void Menu_MetaClass::do_open_recent_media(void)
+{
+ QAction *cp = qobject_cast<QAction*>(QObject::sender());
+ if(cp == nullptr) return;
+ struct CSP_Ui_Menu::DriveIndexPair tmp = cp->data().value<CSP_Ui_Menu::DriveIndexPair>();
+
// write_protect = false; // Right? On D88, May be writing entry exists.
- emit sig_set_recent_media(media_drive, s_num);
+ emit sig_set_recent_media(tmp.drive, tmp.index);
}
-void Menu_MetaClass::do_write_protect_media(void) {
+
+void Menu_MetaClass::do_write_protect_media(void)
+{
write_protect = true;
{
if(use_write_protect) {
dlg.setWindowTitle(tmps);
QObject::connect(&dlg, SIGNAL(fileSelected(QString)), dlg.param, SLOT(_open_disk(QString)));
- QObject::connect(dlg.param, SIGNAL(do_open_disk(int, QString)), this, SLOT(do_open_media(int, QString)));
+ QObject::connect(dlg.param, SIGNAL(sig_open_disk(int, QString)), this, SLOT(do_open_media(int, QString)));
dlg.show();
dlg.exec();
{
action_insert = new Action_Control(p_wid, using_flags);
action_insert->setObjectName(QString::fromUtf8("action_insert_") + object_desc);
- action_insert->binds->setDrive(media_drive);
+
+ struct CSP_Ui_Menu::DriveIndexPair tmp;
+ QVariant _tmp_ins;
+
+ tmp.drive = media_drive;
+ tmp.index = 0;
+ _tmp_ins.setValue(tmp);
+ action_insert->setData(_tmp_ins);
+
connect(action_insert, SIGNAL(triggered()), this, SLOT(do_open_dialog()));
action_insert->setIcon(icon_insert);
action_eject = new Action_Control(p_wid, using_flags);
action_eject->setObjectName(QString::fromUtf8("action_eject_") + object_desc);
- action_eject->binds->setDrive(media_drive);
+
+ QVariant _tmp_eject;
+ tmp.drive = media_drive;
+ tmp.index = 0;
+ _tmp_eject.setValue(tmp);
+ action_eject->setData(_tmp_eject);
+
connect(action_eject, SIGNAL(triggered()), this, SLOT(do_eject_media()));
action_eject->setIcon(icon_eject);
for(ii = 0; ii < MAX_HISTORY; ii++) {
tmps = history.value(ii, "");
action_recent_list[ii] = new Action_Control(p_wid, using_flags);
- struct CSP_Ui_Menu::DriveIndexPair tmp;
- tmp.drive = media_drive;
- tmp.index = ii;
- action_recent_list[ii]->setData(QVariant(tmp));
+ struct CSP_Ui_Menu::DriveIndexPair tmp2;
+ tmp2.drive = media_drive;
+ tmp2.index = ii;
+ QVariant _tmp2v;
+ _tmp2v.setValue(tmp2);
+
+ action_recent_list[ii]->setData(_tmp2v);
action_recent_list[ii]->setText(tmps);
action_group_recent->addAction(action_recent_list[ii]);
for(ii = 0; ii < using_flags->get_max_d88_banks(); ii++) {
tmps = history.value(ii, "");
action_select_media_list[ii] = new Action_Control(p_wid, using_flags);
- struct CSP_Ui_Menu::DriveIndexPair tmp;
- tmp.drive = media_drive;
- tmp.index = ii;
- action_select_media_list[ii]->setData(tmp);
+ struct CSP_Ui_Menu::DriveIndexPair tmp2;
+ tmp2.drive = media_drive;
+ tmp2.index = ii;
+ QVariant _tmp2v;
+ _tmp2v.setValue(tmp2);
+ action_select_media_list[ii]->setData(_tmp2v);
action_select_media_list[ii]->setText(tmps);
action_select_media_list[ii]->setCheckable(true);
for(ii = 0; ii < MAX_HISTORY; ii++) {
connect(action_recent_list[ii], SIGNAL(triggered()),
- action_recent_list[ii]->binds, SLOT(on_recent_disk()));
- connect(action_recent_list[ii]->binds, SIGNAL(set_recent_disk(int, int)),
- this, SLOT(do_open_recent_media(int, int)));
+ this, SLOT(do_open_recent_media()));
}
if(use_d88_menus) {
for(ii = 0; ii < using_flags->get_max_d88_banks(); ii++) {
connect(action_select_media_list[ii], SIGNAL(triggered()),
- action_select_media_list[ii]->binds, SLOT(on_d88_slot()));
- connect(action_select_media_list[ii]->binds, SIGNAL(set_d88_slot(int, int)),
- this, SLOT(do_open_inner_media(int, int)));
+ this, SLOT(do_open_inner_media()));
}
}
}
#include <QStringList>
#include <QMenu>
#include <QIcon>
+#include <QVariant>
#include "common.h"
#include "config.h"
class Action_Control;
namespace CSP_Ui_Menu {
- struct DriveIndex_pair {
+ struct DriveIndexPair {
int drive;
int index;
};
}
-Q_DECLARE_METATYPE(CSP_Ui_Menu::DriveIndex_pair)
+Q_DECLARE_METATYPE(CSP_Ui_Menu::DriveIndexPair)
class DLL_PREFIX Menu_MetaClass : public QMenu {
Q_OBJECT
void do_open_media(int drv, QString name);
void do_insert_media(void);
void do_eject_media(void);
- void do_open_inner_media(int drv, int s_num);
- void do_open_recent_media(int drv, int s_num);
+ void do_open_inner_media(void);
+ void do_open_recent_media(void);
void do_write_protect_media(void);
void do_write_unprotect_media(void);
void do_add_media_extension(QString ext, QString description);
QStringList lst, int num, bool use_d88_menus);
int sig_update_inner_bubble(int drv, QStringList base, class Action_Control **action_select_media_list,
QStringList lst, int num, bool use_d88_menus);
+ int sig_emu_update_config();
};
QT_END_NAMESPACE
#include "qt_gldraw.h"
#include "menu_flags.h"
-//extern USING_FLAGS *using_flags;
-// WIP: Move another header.
-void Object_Menu_Control::set_screen_aspect(void) {
- int num = getValue1();
- emit sig_screen_aspect(num);
-}
-
-void Object_Menu_Control::do_set_screen_rotate(void) {
- int num = getValue1();
- emit sig_screen_rotate(num);
-}
+void Ui_MainWindowBase::do_set_screen_size(void)
+{
-void Object_Menu_Control::set_screen_size(void) {
+ if(using_flags == nullptr) return;
+ if(p_config == nullptr) return;
+
+ QAction *cp = qobject_cast<QAction*>(QObject::sender());
+ if(cp == nullptr) return;
+ int __n = cp->data().value<int>();
+
int w, h;
- float nd, ww, hh;
- float xzoom = using_flags->get_screen_x_zoom();
- float yzoom = using_flags->get_screen_y_zoom();
- p_config->window_mode = getNumber();
- nd = getDoubleValue();
- ww = (float)using_flags->get_screen_width();
- hh = (float)using_flags->get_screen_height();
+ double ww, hh;
+ double xzoom = using_flags->get_screen_x_zoom();
+ double yzoom = using_flags->get_screen_y_zoom();
+ p_config->window_mode = __n;
+ double nd = getScreenMultiply(__n);
+
+ ww = (double)using_flags->get_screen_width();
+ hh = (double)using_flags->get_screen_height();
if((using_flags->get_screen_height_aspect() != using_flags->get_screen_height()) ||
(using_flags->get_screen_width_aspect() != using_flags->get_screen_width())) {
- float par_w = (float)using_flags->get_screen_width_aspect() / ww;
- float par_h = (float)using_flags->get_screen_height_aspect() / hh;
+ double par_w = (double)using_flags->get_screen_width_aspect() / ww;
+ double par_h = (double)using_flags->get_screen_height_aspect() / hh;
//float par = par_h / par_w;
switch(p_config->window_stretch_type) {
case 0: // refer to X and Y.
}
w = (int)ww;
h = (int)hh;
- emit sig_screen_size(w, h);
+ set_screen_size(w, h);
emit sig_screen_multiply(nd);
}
{
int w, h;
QString tmps;
- int i;
+
+ for(int i = 0; i < (sizeof(actionScreenSize) / sizeof(Action_Control *)); i++) {
+ actionScreenSize[i] = nullptr;
+ }
actionGroup_ScreenSize = new QActionGroup(this);
actionGroup_ScreenSize->setExclusive(true);
double _iimul = 1.0;
double _zmul = using_flags->get_custom_screen_zoom_factor();
double _mul = getScreenMultiply(ix);
- for(i = 0; i < using_flags->get_screen_mode_num();i++) {
+ for(int i = 0; i < using_flags->get_screen_mode_num();i++) {
double _ymul = _zmul * _iimul;
_ymul = _zmul * _iimul;
if((_mul == 0.5) && (i > 0) && (_zmul > 0.0)) {
actionScreenSize[i] = new Action_Control(this, using_flags);
actionScreenSize[i]->setObjectName(QString::fromUtf8("actionScreenSize", -1) + tmps);
actionScreenSize[i]->setCheckable(true);
- actionScreenSize[i]->binds->setNumber(i);
if(i == p_config->window_mode) actionScreenSize[i]->setChecked(true); // OK?
actionGroup_ScreenSize->addAction(actionScreenSize[i]);
- actionScreenSize[i]->binds->setDoubleValue(_mul);
+ actionScreenSize[i]->setData(QVariant(i));
- connect(actionScreenSize[i], SIGNAL(triggered()),
- actionScreenSize[i]->binds, SLOT(set_screen_size()));
-
- connect(actionScreenSize[i]->binds, SIGNAL(sig_screen_size(int, int)),
- this, SLOT(set_screen_size(int, int)));
- }
- for(; i < using_flags->get_screen_mode_num(); i++) {
- actionScreenSize[i] = NULL;
+ connect(actionScreenSize[i], SIGNAL(triggered()), this, SLOT(do_set_screen_size()));
}
}
void Ui_MainWindowBase::ConfigScreenMenu(void)
actionRotate[i] = new Action_Control(this, using_flags);
actionRotate[i]->setObjectName(QString::fromUtf8("actionRotate") + QString("%1").arg(i));
actionRotate[i]->setCheckable(true);
- actionRotate[i]->binds->setValue1(i);
+ actionRotate[i]->setData(QVariant(i));
actionGroup_RotateType->addAction(actionRotate[i]);
if(p_config->rotate_type == i) actionRotate[i]->setChecked(true);
- connect(actionRotate[i], SIGNAL(triggered()), actionRotate[i]->binds, SLOT(do_set_screen_rotate()));
- connect(actionRotate[i]->binds, SIGNAL(sig_screen_rotate(int)), this, SLOT(do_set_screen_rotate(int)));
+ connect(actionRotate[i], SIGNAL(triggered()), this, SLOT(do_set_screen_rotate()));
}
actionOpenGL_Filter = new Action_Control(this, using_flags);
actionDot_by_Dot->setObjectName(QString::fromUtf8("actionDot_by_Dot"));
actionDot_by_Dot->setCheckable(true);
if(p_config->window_stretch_type == 0) actionDot_by_Dot->setChecked(true);
- actionDot_by_Dot->binds->setValue1(0);
+ actionDot_by_Dot->setData(QVariant((int)0));
actionReferToX_Display = new Action_Control(this, using_flags);
actionReferToX_Display->setObjectName(QString::fromUtf8("actionReferToX_Display"));
actionReferToX_Display->setCheckable(true);
- actionReferToX_Display->binds->setValue1(1);
+ actionReferToX_Display->setData(QVariant((int)1));
if(p_config->window_stretch_type == 1) actionReferToX_Display->setChecked(true);
actionReferToY_Display = new Action_Control(this, using_flags);
actionReferToY_Display->setObjectName(QString::fromUtf8("actionReferToY_Display"));
actionReferToY_Display->setCheckable(true);
- actionReferToY_Display->binds->setValue1(2);
+ actionReferToY_Display->setData(QVariant((int)2));
if(p_config->window_stretch_type == 2) actionReferToY_Display->setChecked(true);
actionFill_Display = new Action_Control(this, using_flags);
actionFill_Display->setObjectName(QString::fromUtf8("actionFill_Display"));
actionFill_Display->setCheckable(true);
- actionFill_Display->binds->setValue1(3);
+ actionFill_Display->setData(QVariant((int)3));
if(p_config->window_stretch_type == 3) actionFill_Display->setChecked(true);
actionGroup_Stretch = new QActionGroup(this);
actionGroup_Stretch->addAction(actionReferToX_Display);
actionGroup_Stretch->addAction(actionReferToY_Display);
actionGroup_Stretch->addAction(actionFill_Display);
- connect(actionDot_by_Dot, SIGNAL(triggered()), actionDot_by_Dot->binds, SLOT(set_screen_aspect()));
- connect(actionDot_by_Dot->binds, SIGNAL(sig_screen_aspect(int)), this, SLOT(set_screen_aspect(int)));
-
- connect(actionReferToX_Display, SIGNAL(triggered()), actionReferToX_Display->binds, SLOT(set_screen_aspect()));
- connect(actionReferToX_Display->binds, SIGNAL(sig_screen_aspect(int)), this, SLOT(set_screen_aspect(int)));
-
- connect(actionReferToY_Display, SIGNAL(triggered()), actionReferToY_Display->binds, SLOT(set_screen_aspect()));
- connect(actionReferToY_Display->binds, SIGNAL(sig_screen_aspect(int)), this, SLOT(set_screen_aspect(int)));
-
- connect(actionFill_Display, SIGNAL(triggered()), actionFill_Display->binds, SLOT(set_screen_aspect()));
- connect(actionFill_Display->binds, SIGNAL(sig_screen_aspect(int)), this, SLOT(set_screen_aspect(int)));
+ connect(actionDot_by_Dot, SIGNAL(triggered()), this, SLOT(do_set_screen_aspect()));
+ connect(actionReferToX_Display, SIGNAL(triggered()), this, SLOT(do_set_screen_aspect()));
+ connect(actionReferToY_Display, SIGNAL(triggered()), this, SLOT(do_set_screen_aspect()));
+ connect(actionFill_Display, SIGNAL(triggered()), this, SLOT(do_set_screen_aspect()));
}
actionCapture_Screen = new Action_Control(this, using_flags);
actionCapture_Screen->setObjectName(QString::fromUtf8("actionCapture_Screen"));
action_SetRenderMode[i]->setCheckable(true);
action_SetRenderMode[i]->setEnabled(false);
action_SetRenderMode[i]->setVisible(false);
- action_SetRenderMode[i]->binds->setValue1(i);
+ action_SetRenderMode[i]->setData(QVariant(i));
if(i == p_config->rendering_type) action_SetRenderMode[i]->setChecked(true);
if(i == CONFIG_RENDER_TYPE_STD) {
double s_mul;
for(i = 0; i < using_flags->get_screen_mode_num(); i++) {
if(actionScreenSize[i] == NULL) continue;
- s_mul = actionScreenSize[i]->binds->getDoubleValue();
-;
- if(s_mul <= 0) break;
+ s_mul = getScreenMultiply(actionScreenSize[i]->data().value<int>());
+ if(s_mul <= 0.0f) break;
+
tmps = QString::number(s_mul);
tmps = QString::fromUtf8("x", -1) + tmps;
actionScreenSize[i]->setText(tmps);
const double s_late_table[5] = {0.05, 0.1, 0.2, 0.3, 0.4};
extern USING_FLAGS *using_flags;
-void Object_Menu_Control::on_set_freq(void) {
- emit sig_freq(s_num);
-}
-
-void Object_Menu_Control::on_set_latency(void) {
- emit sig_latency(s_num);
-}
-
-void Object_Menu_Control::on_set_host_sound_device(void) {
- emit sig_set_host_sound_device(s_num);
-}
-void Ui_MainWindowBase::do_set_host_sound_device(int num)
+void Ui_MainWindowBase::do_set_host_sound_device(void)
{
+ QAction *cp = qobject_cast<QAction*>(QObject::sender());
+ if(cp == nullptr) return;
+ int num = cp->data().value<int>();
+
if(p_config != NULL) {
p_config->sound_device_num = num;
}
if(action_HostSoundDevice[i] != NULL) {
menuSound_HostDevices->addAction(action_HostSoundDevice[i]);
connect(action_HostSoundDevice[i], SIGNAL(triggered()),
- action_HostSoundDevice[i]->binds, SLOT(on_set_host_sound_device()));
- connect(action_HostSoundDevice[i]->binds, SIGNAL(sig_set_host_sound_device(int)),
- this, SLOT(do_set_host_sound_device(int)));
+ this, SLOT(do_set_host_sound_device()));
}
}
for(i = 0; i < 8; i++) {
menuOutput_Frequency->addAction(action_Freq[i]);
connect(action_Freq[i], SIGNAL(triggered()),
- action_Freq[i]->binds, SLOT(on_set_freq()));
- connect(action_Freq[i]->binds, SIGNAL(sig_freq(int)),
- this, SLOT(set_freq(int)));
+ this, SLOT(do_set_freq()));
}
menuSound_Latency = new QMenu(menuSound);
menuSound_Latency->setObjectName(QString::fromUtf8("menuSound_Latency"));
for(i = 0; i < 5; i++) {
menuSound_Latency->addAction(action_Latency[i]);
connect(action_Latency[i], SIGNAL(triggered()),
- action_Latency[i]->binds, SLOT(on_set_latency()));
- connect(action_Latency[i]->binds, SIGNAL(sig_latency(int)),
- this, SLOT(set_latency(int)));
+ this, SLOT(do_set_latency()));
}
menuSound->addSeparator();
action_HostSoundDevice[i]->setObjectName(tmps);
action_HostSoundDevice[i]->setCheckable(true);
- action_HostSoundDevice[i]->binds->setNumber(i);
+ action_HostSoundDevice[i]->setData(QVariant(i));
if(i == p_config->sound_device_num) {
action_HostSoundDevice[i]->setChecked(true);
//freq = using_flags->get_s_freq_table(i);
actionGroup_Sound_Freq->setExclusive(true);
for(i = 0; i < 8; i++) {
action_Freq[i] = new Action_Control(this, using_flags);
- tmps.setNum(using_flags->get_s_freq_table(i));
+ int _freq = using_flags->get_s_freq_table(i);
+ tmps.setNum(_freq);
tmps = QString::fromUtf8("action") + tmps + QString::fromUtf8("Hz");
action_Freq[i]->setObjectName(tmps);
action_Freq[i]->setCheckable(true);
- action_Freq[i]->binds->setNumber(i);
+ action_Freq[i]->setData(QVariant(i));
if(i == p_config->sound_frequency) {
action_Freq[i]->setChecked(true);
//freq = using_flags->get_s_freq_table(i);
action_Latency[i] = new Action_Control(this, using_flags);
dval = s_late_table[i];
dval = dval * 1000.0;
- tmps.setNum((int)dval);
+ tmps.setNum(dval);
tmps = QString::fromUtf8("action") + tmps + QString::fromUtf8("ms");
action_Latency[i]->setObjectName(tmps);
action_Latency[i]->setCheckable(true);
- action_Latency[i]->binds->setNumber(i);
+ action_Latency[i]->setData(QVariant(i));
if(i == p_config->sound_latency) action_Latency[i]->setChecked(true);
actionGroup_Sound_Latency->addAction(action_Latency[i]);
}
int d = getDrive();
//int n = d + CSP_LOG_TYPE_VFILE_FLOPPY;
//csp_logger->debug_log(CSP_LOG_INFO, n, "Try to open media image: %s", s.toLocal8Bit().constData());
- emit do_open_disk(d, s);
+ emit sig_open_disk(d, s);
}
void CSP_DiskParams::_open_cart(QString s)
}
void CSP_DiskParams::_open_cmt(QString s)
{
- emit do_open_cmt(play, s);
+ emit sig_open_cmt(play, s);
}
void CSP_DiskParams::_open_binary(QString s) {
emit sig_open_binary_file(drive, s, play);
}
+void CSP_DiskParams::_open_quick_disk(QString s)
+{
+ int d = getDrive();
+ //int n = d + CSP_LOG_TYPE_VFILE_FLOPPY;
+ //csp_logger->debug_log(CSP_LOG_INFO, n, "Try to open media image: %s", s.toLocal8Bit().constData());
+ emit sig_open_quick_disk(d, s);
+}
CSP_CreateDiskDialog::CSP_CreateDiskDialog(bool *masks, QWidget *parent) : QWidget(parent)
{
return 0;
}
signals:
- int do_open_disk(int, QString);
- int do_close_disk(int);
+ int sig_open_disk(int, QString);
+ int sig_close_disk(int);
int sig_open_cart(int, QString);
- int do_close_cart(int);
- int do_open_cmt(bool, QString);
- int do_close_cmt();
+ int sig_close_cart(int);
+ int sig_open_cmt(bool, QString);
+ int sig_close_cmt();
int sig_open_binary_file(int, QString, bool);
- int do_open_quick_disk(int, QString);
- public slots:
+ int sig_open_quick_disk(int, QString);
+public slots:
void _open_disk(const QString fname);
void _open_cart(const QString fname);
void _open_cmt(const QString fname);
void do_set_horiz_lines(int lines);
void do_set_screen_multiply(float mul);
+ void do_set_screen_multiply(double mul);
void do_update_keyboard_scan_code(uint32_t vk, uint32_t scan);
void do_set_mouse_enabled(bool flag);
void do_stop_run_vm();
void do_set_led_width(int bitwidth);
void do_update_icon(int icon_type, int localnum, QPixmap *p);
void do_update_icon(int icon_type, int localnum, QString message, QColor bg, QColor fg, QColor fg2, QColor fg3, QColor lg, QColor tg, float pt);
-
+ virtual void do_set_fixed_size(int w, int h) { setFixedSize(w, h); }
signals:
void update_screenChanged(int tick);
void sig_notify_move_mouse(double x, double y, double globalx, double globaly);
void sig_toggle_mouse(void);
void do_notify_button_pressed(Qt::MouseButton button);
void do_notify_button_released(Qt::MouseButton button);
- void sig_check_grab_mouse(bool);
+ void sig_toggle_grab_mouse();
void sig_resize_uibar(int, int);
void sig_draw_timing(void);
int sig_finished(void);
{
if(using_flags->is_use_one_board_computer() || using_flags->is_use_mouse() || (using_flags->get_max_button() > 0)) {
if(event->button() == Qt::MiddleButton) {
- emit sig_check_grab_mouse(true);
+ emit sig_toggle_grab_mouse();
return;
}
if(!enable_mouse) return;
if(extfunc != NULL) extfunc->do_set_screen_multiply(mul);
}
+void GLDrawClass::do_set_screen_multiply(double mul)
+{
+ if(extfunc != NULL) extfunc->do_set_screen_multiply((float)mul);
+}
+
void GLDrawClass::do_set_texture_size(QImage *p, int w, int h)
{
vram_width = w;
#include "mainwidget_base.h"
#include "commonclasses.h"
#include "qt_dialogs.h"
+
//#include "csp_logger.h"
#include "menu_binary.h"
-void Object_Menu_Control::on_recent_binary_load(void){
- // write_protect = false; // Right? On D88, May be writing entry exists.
- emit set_recent_binary_load(drive, s_num);
-}
-void Object_Menu_Control::on_recent_binary_save(void){
- // write_protect = false; // Right? On D88, May be writing entry exists.
- emit set_recent_binary_save(drive, s_num);
-}
-
-void Object_Menu_Control::_open_binary(QString s){
- bool load = this->isPlay();
- int d = this->getDrive();
- emit sig_open_binary_file(d, s, load);
-}
-void Object_Menu_Control::insert_binary_load(void) {
- emit sig_open_binary(getDrive(), true);
-}
-void Object_Menu_Control::insert_binary_save(void) {
- emit sig_open_binary(getDrive(), false);
-}
-
int Ui_MainWindowBase::set_recent_binary_load(void)
{
char path_shadow[PATH_MAX];
QAction *cp = qobject_cast<QAction*>(QObject::sender());
- if(cp == nullptr) return;
- struct CSP_Ui_Menu::DriveIndexPair tmp = cp->value<CSP_Ui_Menu::DriveIndexPair>();
- drv = tmp.drive;
- num = tmp.index;
+ if(cp == nullptr) return -1;
+ struct CSP_Ui_Menu::DriveIndexPair tmp = cp->data().value<CSP_Ui_Menu::DriveIndexPair>();
+ int drv = tmp.drive;
+ int num = tmp.index;
if((num < 0) || (num >= MAX_HISTORY)) return -1;
char path_shadow[PATH_MAX];
QAction *cp = qobject_cast<QAction*>(QObject::sender());
- if(cp == nullptr) return;
- struct CSP_Ui_Menu::DriveIndexPair tmp = cp->value<CSP_Ui_Menu::DriveIndexPair>();
- drv = tmp.drive;
- num = tmp.index;
+ if(cp == nullptr) return -1;
+ struct CSP_Ui_Menu::DriveIndexPair tmp = cp->data().value<CSP_Ui_Menu::DriveIndexPair>();
+ int drv = tmp.drive;
+ int num = tmp.index;
if((num < 0) || (num >= MAX_HISTORY)) return -1;
#include "qt_dialogs.h"
//#include "csp_logger.h"
-void Object_Menu_Control::insert_bubble(void) {
- emit sig_insert_bubble(getDrive());
-}
-void Object_Menu_Control::eject_bubble(void) {
- write_protect = false;
- emit sig_eject_bubble(getDrive());
-}
-void Object_Menu_Control::on_b77_slot(void) {
- emit set_b77_slot(drive, s_num);
-}
-void Object_Menu_Control::on_recent_bubble(void){
- emit set_recent_bubble(drive, s_num);
-}
-void Object_Menu_Control::write_protect_bubble(void) {
- write_protect = true;
- emit sig_write_protect_bubble(drive, write_protect);
-}
-void Object_Menu_Control::no_write_protect_bubble(void) {
- write_protect = false;
- emit sig_write_protect_bubble(drive, write_protect);
-}
-
-
-
int Ui_MainWindowBase::write_protect_bubble(int drv, bool flag)
{
if((drv < 0) || (drv >= using_flags->get_max_bubble())) return -1;
#include "qt_dialogs.h"
//#include "csp_logger.h"
-void Object_Menu_Control::insert_cart(void) {
- emit sig_insert_cart(getDrive());
-}
-void Object_Menu_Control::eject_cart(void) {
- write_protect = false;
- emit sig_eject_cart(getDrive());
-}
-void Object_Menu_Control::on_recent_cart(void){
- emit set_recent_cart(drive, s_num);
-}
-
void Ui_MainWindowBase::_open_cart(int drv, const QString fname)
{
char path_shadow[PATH_MAX];
//extern USING_FLAGS *using_flags;
//extern class EMU *emu;
-void Object_Menu_Control::insert_fd(void) {
- emit sig_insert_fd(getDrive());
-}
-void Object_Menu_Control::eject_fd(void) {
- write_protect = false;
- emit sig_eject_fd(getDrive());
-}
-void Object_Menu_Control::on_d88_slot(void) {
- emit set_d88_slot(drive, s_num);
-}
-void Object_Menu_Control::on_recent_disk(void){
- // write_protect = false; // Right? On D88, May be writing entry exists.
- emit set_recent_disk(drive, s_num);
-}
-void Object_Menu_Control::write_protect_fd(void) {
- write_protect = true;
- emit sig_write_protect_fd(drive, write_protect);
-}
-void Object_Menu_Control::no_write_protect_fd(void) {
- write_protect = false;
- emit sig_write_protect_fd(drive, write_protect);
-}
-
-void Object_Menu_Control::do_set_ignore_crc_error(bool flag)
-{
- p_config->ignore_disk_crc[drive] = flag;
- emit sig_emu_update_config();
-}
-
-void Object_Menu_Control::do_set_correct_disk_timing(bool flag)
-{
- p_config->correct_disk_timing[drive] = flag;
- emit sig_emu_update_config();
-}
-
-void Object_Menu_Control::do_set_disk_count_immediate(bool flag)
-{
- p_config->disk_count_immediate[drive] = flag;
- emit sig_emu_update_config();
-}
-
int Ui_MainWindowBase::write_protect_fd(int drv, bool flag)
{
#include "menu_laserdisc.h"
-void Object_Menu_Control::insert_laserdisc(void) {
- //AGAR_DebugLog(AGAR_LOG_DEBUG, "%d", play);
- emit sig_insert_laserdisc(play);
-}
-void Object_Menu_Control::eject_laserdisc(void) {
- emit sig_eject_laserdisc();
-}
-void Object_Menu_Control::on_recent_laserdisc(){
- emit sig_recent_laserdisc(s_num);
-}
-
void Ui_MainWindowBase::CreateLaserdiscMenu(int drv, int drv_base)
{
QString ext_play, desc_play;
#include "csp_logger.h"
#include "menu_quickdisk.h"
-void Object_Menu_Control::insert_Qd(void) {
- //write_protect = false; // Right? On D88, May be writing entry exists.
- emit sig_insert_Qd(drive);
-}
-void Object_Menu_Control::eject_Qd(void) {
- write_protect = false;
- emit sig_eject_Qd(drive);
-}
-void Object_Menu_Control::on_recent_quick_disk(void){
- // write_protect = false; // Right? On D88, May be writing entry exists.
- emit set_recent_quick_disk(drive, s_num);
-}
-
-void CSP_FileParams::_open_quick_disk(QString s){
- // write_protect = false; // Right? On D88, May be writing entry exists.
- emit do_open_quick_disk(getDrive(), s);
-}
-void Object_Menu_Control::write_protect_Qd(void) {
- write_protect = true;
- emit sig_write_protect_Qd(drive, write_protect);
-}
-void Object_Menu_Control::no_write_protect_Qd(void) {
- write_protect = false;
- emit sig_write_protect_Qd(drive, write_protect);
-}
void Ui_MainWindowBase::CreateQuickDiskPulldownMenu(int drv)
{
#include "menu_disk.h"
//QT_BEGIN_NAMESPACE
-extern config_t config;
-
-Object_Menu_Control_7::Object_Menu_Control_7(QObject *parent, USING_FLAGS *p) : Object_Menu_Control(parent, p)
-{
-}
-
-Object_Menu_Control_7::~Object_Menu_Control_7()
-{
-}
-
-void Object_Menu_Control_7::do_set_z80card_on(bool flag)
-{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_Z80CARD_ON;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_Z80CARD_ON;
- }
-}
-
-void Object_Menu_Control_7::do_set_z80_irq(bool flag)
-{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_Z80_IRQ_ON;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_Z80_IRQ_ON;
- }
- emit sig_emu_update_config();
-}
-
-void Object_Menu_Control_7::do_set_z80_firq(bool flag)
-{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_Z80_FIRQ_ON;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_Z80_FIRQ_ON;
- }
- emit sig_emu_update_config();
-}
-
-void Object_Menu_Control_7::do_set_z80_nmi(bool flag)
-{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_Z80_NMI_ON;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_Z80_NMI_ON;
- }
- emit sig_emu_update_config();
-}
-
-void Object_Menu_Control_7::do_set_uart(bool flag)
-{
- uint32_t nval;
- int num = getValue1();
- switch(num) {
- case 0:
- nval = FM7_DIPSW_RS232C_ON;
- break;
- case 1:
- nval = FM7_DIPSW_MODEM_ON;
- break;
- case 2:
- nval = FM7_DIPSW_MIDI_ON;
- break;
- default:
- return;
- break;
- }
- if(flag) {
- config.dipswitch = config.dipswitch | nval;
- } else {
- nval = (uint32_t)(~nval);
- config.dipswitch = config.dipswitch & nval;
- }
-}
-
-void Object_Menu_Control_7::do_set_jcommcard(bool flag)
+void META_MainWindow::do_set_autokey_5_8(void)
{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_JSUBCARD_ON;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_JSUBCARD_ON;
- }
-}
-
-void Object_Menu_Control_7::do_set_kanji_rom(bool flag)
-{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_CONNECT_KANJIROM;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_CONNECT_KANJIROM;
- }
-}
-
-void Object_Menu_Control_7::do_set_320kFloppy(bool flag)
-{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_CONNECT_320KFDC;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_CONNECT_320KFDC;
- }
-}
-
-void Object_Menu_Control_7::do_set_1MFloppy(bool flag)
-{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_CONNECT_1MFDC;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_CONNECT_1MFDC;
- }
-}
-
-
-void Object_Menu_Control_7::do_set_autokey_5_8(void)
-{
- int val = getValue1();
+ if(p_config == nullptr) return;
+ QAction *cp = qobject_cast<QAction*>(QObject::sender());
+ if(cp == nullptr) return;
+ int val = cp->data().value<int>();
+
switch(val) {
case 0: // Not Auto Key:
- config.dipswitch = config.dipswitch & ~(FM7_DIPSW_SELECT_5_OR_8KEY | FM7_DIPSW_AUTO_5_OR_8KEY);
+ p_config->dipswitch = p_config->dipswitch & ~(FM7_DIPSW_SELECT_5_OR_8KEY | FM7_DIPSW_AUTO_5_OR_8KEY);
break;
case 1: // Auto 5
- config.dipswitch = config.dipswitch | (FM7_DIPSW_SELECT_5_OR_8KEY | FM7_DIPSW_AUTO_5_OR_8KEY);
+ p_config->dipswitch = p_config->dipswitch | (FM7_DIPSW_SELECT_5_OR_8KEY | FM7_DIPSW_AUTO_5_OR_8KEY);
break;
case 2: // Auto 8
- config.dipswitch = (config.dipswitch | FM7_DIPSW_AUTO_5_OR_8KEY) & ~FM7_DIPSW_SELECT_5_OR_8KEY;
+ p_config->dipswitch = (p_config->dipswitch | FM7_DIPSW_AUTO_5_OR_8KEY) & ~FM7_DIPSW_SELECT_5_OR_8KEY;
break;
default:// Not Auto Key:
- config.dipswitch = config.dipswitch & ~(FM7_DIPSW_SELECT_5_OR_8KEY | FM7_DIPSW_AUTO_5_OR_8KEY);
+ p_config->dipswitch = p_config->dipswitch & ~(FM7_DIPSW_SELECT_5_OR_8KEY | FM7_DIPSW_AUTO_5_OR_8KEY);
break;
}
}
-void Object_Menu_Control_7::do_set_protect_ram(bool flag)
+void META_MainWindow::do_set_frameskip()
{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_FM8_PROTECT_FD0F;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_FM8_PROTECT_FD0F;
- }
- emit sig_emu_update_config();
-}
-
-void Object_Menu_Control_7::do_set_cyclesteal(bool flag)
-{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_CYCLESTEAL;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_CYCLESTEAL;
- }
- emit sig_emu_update_config();
-}
-
-void Object_Menu_Control_7::do_set_hsync(bool flag)
-{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_SYNC_TO_HSYNC;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_SYNC_TO_HSYNC;
- }
-}
-
-void Action_Control_7::do_set_frameskip()
-{
- config.dipswitch &= 0xcfffffff;
- config.dipswitch |= ((fm7_binds->getValue1() & 3) << 28);
-}
+ QAction *cp = qobject_cast<QAction*>(QObject::sender());
+ if(cp == nullptr) return;
+ uint32_t nval = cp->data().value<uint32_t>();
-Action_Control_7::Action_Control_7(QObject *parent, USING_FLAGS *p) : Action_Control(parent, p)
-{
- fm7_binds = new Object_Menu_Control_7(parent, p);
- fm7_binds->setValue1(0);
-}
-
-Action_Control_7::~Action_Control_7()
-{
- delete fm7_binds;
-}
-
-
-
-void META_MainWindow::do_set_extram(bool flag)
-{
-# if defined(_FM77AV40) || defined(_FM77AV40SX) || defined(_FM77AV40EX) || defined(_FM77AV20) || defined(_FM77_VARIANTS)
- if(flag) {
- config.dipswitch |= FM7_DIPSW_EXTRAM;
- } else {
- config.dipswitch &= ~FM7_DIPSW_EXTRAM;
- }
-#elif defined(_FM77AV_VARIANTS)
- if(flag) {
- config.dipswitch |= FM7_DIPSW_EXTRAM_AV;
- } else {
- config.dipswitch &= ~FM7_DIPSW_EXTRAM_AV;
- }
-#endif
+ if(p_config == nullptr) return;
+ p_config->dipswitch &= 0xcfffffff;
+ p_config->dipswitch |= (nval & 0x30000000);
}
-#if defined(CAPABLE_DICTROM) && !defined(_FM77AV40EX) && !defined(_FM77AV40SX)
-void META_MainWindow::do_set_use_dictcard(bool flag)
-{
- if(flag) {
- config.dipswitch = config.dipswitch | FM7_DIPSW_DICTROM_AV;
- } else {
- config.dipswitch = config.dipswitch & ~FM7_DIPSW_DICTROM_AV;
- }
-}
-#endif
-
void META_MainWindow::retranslateVolumeLabels(Ui_SoundDialog *p)
{
}
actionDebugger[0]->setVisible(true);
actionDebugger[1]->setVisible(true);
# ifdef WITH_Z80
- if((config.dipswitch & FM7_DIPSW_Z80CARD_ON) != 0) z80num = 2;
+ if((p_config->dipswitch & FM7_DIPSW_Z80CARD_ON) != 0) z80num = 2;
# ifdef CAPABLE_JCOMMCARD
- if((config.dipswitch & FM7_DIPSW_JSUBCARD_ON) != 0) {
+ if((p_config->dipswitch & FM7_DIPSW_JSUBCARD_ON) != 0) {
if(z80num < 0) {
jcommnum = 2;
} else {
# endif
# else
# ifdef CAPABLE_JCOMMCARD
- if((config.dipswitch & FM7_DIPSW_JSUBCARD_ON) != 0) {
+ if((p_config->dipswitch & FM7_DIPSW_JSUBCARD_ON) != 0) {
jcommnum = 2;
}
# endif
#if defined(_FM77_VARIANTS)
actionBootMode[0]->setText(QString::fromUtf8("BASIC + S1 (BANK0)"));
actionBootMode[0]->setToolTip(QApplication::translate("Machine", "BASIC boot mode with S1 has turned ON.\nThis is FM-77 feature and I don't know about this.", 0));
- actionBootMode[0]->binds->setValue1(2);
+ actionBootMode[0]->setValue(QVariant((int)2));
actionBootMode[4]->setText(QApplication::translate("Machine", "BASIC (BANK4)", 0));
actionBootMode[4]->setToolTip(QApplication::translate("Machine", "Boot with F-BASIC.", 0));
- actionBootMode[4]->binds->setValue1(0);
+ actionBootMode[4]->setValue(QVariant((int)0));
actionBootMode[5]->setText(QApplication::translate("Machine", "DOS 320K(BOOT2 / BANK5)", 0));
actionBootMode[5]->setToolTip(QApplication::translate("Machine", "DOS boot mode.\nUse for CP/M, FLEX, OS-9, R-DOS and some OSs.", 0));
- actionBootMode[5]->binds->setValue1(1);
+ actionBootMode[5]->setValue(QVariant((int)1));
actionBootMode[6]->setText(QString::fromUtf8("1MB FD (BOOT1 / BANK6)"));
actionBootMode[6]->setToolTip(QApplication::translate("Machine", "Boot from 1MB FD for FM-77.\n", 0));
- actionBootMode[6]->binds->setValue1(3);
+ actionBootMode[6]->setValue(QVariant((int)3));
actionBootMode[1]->setText(QString::fromUtf8("BUBBLE 128K (BOOT2 + S1 / BANK1)"));
actionBootMode[1]->setToolTip(QApplication::translate("Machine", "Boot from 128K Bubble casette.\nThis is FM-77 feature and I don't know about this.", 0));
- actionBootMode[1]->binds->setValue1(5);
+ actionBootMode[1]->setValue(QVariant((int)5));
actionBootMode[2]->setText(QString::fromUtf8("BUBBLE 32K (BOOT1 + S1 / BANK2)"));
actionBootMode[2]->setToolTip(QApplication::translate("Machine", "Boot from 32K Bubble casette.\nThis is FM-77 feature and I don't know about this.", 0));
- actionBootMode[2]->binds->setValue1(6);
+ actionBootMode[2]->setValue(QVariant((int)6));
actionBootMode[3]->setText(QString::fromUtf8("RESERVE 1 (BANK3)"));
actionBootMode[3]->setToolTip(QApplication::translate("Machine", "RESERVE AREA 1\nThis is FM-77 feature and I don't know about this.", 0));
- actionBootMode[3]->binds->setValue1(3);
+ actionBootMode[3]->setValue(QVariant((int)3));
actionBootMode[7]->setText(QString::fromUtf8("RESERVE 2 (BANK7)"));
actionBootMode[7]->setToolTip(QApplication::translate("Machine", "RESERVED AREA 2\nThis is FM-77 feature and I don't know about this.", 0));
- actionBootMode[7]->binds->setValue1(4);
+ actionBootMode[7]->setValue(QVariant((int)4));
for(int i = 0; i < 7; i++) {
- if(actionBootMode[i]->binds->getValue1() == config.boot_mode) actionBootMode[i]->setChecked(true);
+ int _n = actionBootMode[i]->data().value<int>();
+ if(_n == p_config->boot_mode) actionBootMode[i]->setChecked(true);
}
for(int i = 0; i < 8; i++) {
actionBootMode[i]->setVisible(true);
}
#elif defined(_FM8)
actionBootMode[0]->setText(QApplication::translate("Machine", "BASIC (SM11-14 BANK0)", 0));
- actionBootMode[0]->binds->setValue1(0);
+ actionBootMode[0]->setValue(QVariant((int)0));
+
actionBootMode[2]->setText(QApplication::translate("Machine", "DOS (SM11-14 BANK2)", 0));
- actionBootMode[2]->binds->setValue1(1);
+ actionBootMode[2]->setValue(QVariant((int)1));
+
actionBootMode[2]->setToolTip(QApplication::translate("Machine", "DOS boot mode.\nUse for CP/M, FLEX, OS-9, R-DOS and some OSs.", 0));
actionBootMode[1]->setText(QApplication::translate("Machine", "BUBBLE (SM11-14 BANK1)", 0));
actionBootMode[1]->setToolTip(QApplication::translate("Machine", "Boot for bubble casette.\nYou must install boot rom for this.", 0));
- actionBootMode[1]->binds->setValue1(2);
+ actionBootMode[1]->setValue(QVariant((int)2));
actionBootMode[7]->setText(QApplication::translate("Machine", "8Inch FD (SM11-15 BANK3)", 0));
actionBootMode[7]->setToolTip(QApplication::translate("Machine", "Boot for 8inch floppy disk.\nYou must install boot rom for this.", 0));
- actionBootMode[1]->binds->setValue1(7);
+ actionBootMode[7]->setValue(QVariant((int)7));
actionBootMode[4]->setText(QApplication::translate("Machine", "BASIC (SM11-15 BANK0)", 0));
- actionBootMode[4]->binds->setValue1(4);
+ actionBootMode[4]->setValue(QVariant((int)4));
+
actionBootMode[6]->setText(QApplication::translate("Machine", "DOS (SM11-15 BANK2)", 0));
- actionBootMode[6]->binds->setValue1(5);
+ actionBootMode[6]->setValue(QVariant((int)5));
+
actionBootMode[4]->setToolTip(QApplication::translate("Machine", "Boot with F-BASIC.", 0));
actionBootMode[6]->setToolTip(QApplication::translate("Machine", "DOS boot mode.\nUse for CP/M, FLEX, OS-9, R-DOS and some OSs.", 0));
actionBootMode[5]->setText(QApplication::translate("Machine", "BUBBLE (SM11-15 BANK1)", 0));
actionBootMode[5]->setToolTip(QApplication::translate("Machine", "Boot for bubble casette.\nYou must install boot rom for this.", 0));
- actionBootMode[5]->binds->setValue1(6);
+ actionBootMode[5]->setValue(QVariant((int)6));
+
actionBootMode[3]->setText(QApplication::translate("Machine", "DEBUG (SM11-14 BANK3)", 0));
actionBootMode[3]->setToolTip(QApplication::translate("Machine", "Boot for DEBUG.\nThis is SM11-14's feature and I don't know about this.", 0));
- actionBootMode[3]->binds->setValue1(3);
+ actionBootMode[3]->setValue(QVariant((int)3));
for(int i = 0; i < 8; i++) {
actionBootMode[i]->setVisible(true);
actionBootMode[i]->setEnabled(true);
- if(actionBootMode[i]->binds->getValue1() == config.boot_mode) actionBootMode[i]->setChecked(true);
+ int _n = actionBootMode[i]->data().value<int>();
+ if(_n == p_config->boot_mode) actionBootMode[i]->setChecked(true);
}
#elif defined(_FM7) || defined(_FMNEW7)
actionBootMode[0]->setText(QApplication::translate("Machine", "BASIC (BANK0)", 0));
actionBootMode[0]->setToolTip(QApplication::translate("Machine", "Boot with F-BASIC.", 0));
- actionBootMode[0]->binds->setValue1(0);
+ actionBootMode[0]->setData(QVariant((int)0));
actionBootMode[2]->setText(QApplication::translate("Machine", "DOS (BANK2)", 0));
actionBootMode[2]->setToolTip(QApplication::translate("Machine", "DOS boot mode.\nUse for CP/M, FLEX, OS-9, R-DOS and some OSs.", 0));
- actionBootMode[2]->binds->setValue1(1);
+ actionBootMode[2]->setData(QVariant((int)1));
actionBootMode[1]->setText(QApplication::translate("Machine", "Bubble Casette (BANK1)", 0));
actionBootMode[1]->setToolTip(QApplication::translate("Machine", "Boot for bubble casette.\nYou must install boot rom for this.", 0));
- actionBootMode[1]->binds->setValue1(2);
+ actionBootMode[1]->setData(QVariant((int)2));
actionBootMode[3]->setText(QApplication::translate("Machine", "Reserve (BANK3)", 0));
actionBootMode[3]->setToolTip(QApplication::translate("Machine", "This is reserved area.\nI don't know about this.", 0));
- actionBootMode[3]->binds->setValue1(3);
+ actionBootMode[3]->setData(QVariant((int)3));
actionBootMode[2]->setVisible(true);
actionBootMode[3]->setVisible(true);
for(int i = 0; i < 4; i++) {
- if(actionBootMode[i]->binds->getValue1() == config.boot_mode) actionBootMode[i]->setChecked(true);
+ int _n = actionBootMode[i]->data().value<int>();
+ if(_n == p_config->boot_mode) actionBootMode[i]->setChecked(true);
}
for(int i = 4; i < 8; i++) {
actionBootMode[i]->setVisible(false);
actionBootMode[2]->setVisible(true);
for(int i = 0; i < 2; i++) {
- if(actionBootMode[i]->binds->getValue1() == config.boot_mode) actionBootMode[i]->setChecked(true);
+ int _n = actionBootMode[i]->data().value<int>();
+ if(_n == p_config->boot_mode) actionBootMode[i]->setChecked(true);
}
for(int i = 3; i < 8; i++) {
actionBootMode[i]->setVisible(false);
actionUART[0]->setEnabled(false);
#endif
#if defined(CAPABLE_JCOMMCARD)
- if((config.dipswitch & FM7_DIPSW_JSUBCARD_ON) != 0) {
+ if((p_config->dipswitch & FM7_DIPSW_JSUBCARD_ON) != 0) {
actionUART[0]->setText(QApplication::translate("Machine", "Turn ON RS-232C (need restart).", 0));
actionUART[0]->setToolTip(QApplication::translate("Machine", "Turn ON RS-232C feature for Japanese communication board.\nNeed to restart this emulator if changed.", 0));
}
void META_MainWindow::setupUI_Emu(void)
{
- int i;
+ uint32_t i;
uint32_t skip;
+ uint32_t _val;
+
menuFrameSkip = new QMenu(menuMachine);
menuFrameSkip->setObjectName(QString::fromUtf8("menuControl_FrameSkip"));
actionGroup_FrameSkip = new QActionGroup(this);
actionGroup_FrameSkip->setExclusive(true);
- skip = (config.dipswitch >> 28) & 3;
+ skip = (p_config->dipswitch >> 28) & 3;
for(i = 0; i < 4; i++) {
- actionFrameSkip[i] = new Action_Control_7(this, using_flags);
+ actionFrameSkip[i] = new Action_Control(this, using_flags);
actionFrameSkip[i]->setCheckable(true);
actionFrameSkip[i]->setVisible(true);
- actionFrameSkip[i]->fm7_binds->setValue1(i);
+ _val = i << 28;
+ actionFrameSkip[i]->setData(QVariant(_val));
+
actionGroup_FrameSkip->addAction(actionFrameSkip[i]);
menuFrameSkip->addAction(actionFrameSkip[i]);
- if((uint32_t)i == skip) actionFrameSkip[i]->setChecked(true);
- connect(actionFrameSkip[i], SIGNAL(triggered()), actionFrameSkip[i], SLOT(do_set_frameskip()));
+ if(i == skip) actionFrameSkip[i]->setChecked(true);
+ connect(actionFrameSkip[i], SIGNAL(triggered()), this, SLOT(do_set_frameskip()));
}
menuMachine->addAction(menuFrameSkip->menuAction());
ConfigCPUTypes(2);
ConfigCPUBootMode(USE_BOOT_MODE);
#if defined(_FM8) || defined(_FM7) || defined(_FMNEW7)
- actionKanjiRom = new Action_Control_7(this, using_flags);
+ actionKanjiRom = new Action_Control(this, using_flags);
menuMachine->addAction(actionKanjiRom);
actionKanjiRom->setCheckable(true);
actionKanjiRom->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_CONNECT_KANJIROM) != 0) actionKanjiRom->setChecked(true);
- connect(actionKanjiRom, SIGNAL(toggled(bool)),
- actionKanjiRom->fm7_binds, SLOT(do_set_kanji_rom(bool)));
+ _val = FM7_DIPSW_CONNECT_KANJIROM;
+ actionKanjiRom->setData(QVariant(_val));
+ if((p_config->dipswitch & FM7_DIPSW_CONNECT_KANJIROM) != 0) actionKanjiRom->setChecked(true);
+ connect(actionKanjiRom, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
#endif
#if defined(WITH_Z80)
menuMachine->addSeparator();
- actionZ80CARD_ON = new Action_Control_7(this, using_flags);
+ actionZ80CARD_ON = new Action_Control(this, using_flags);
menuMachine->addAction(actionZ80CARD_ON);
actionZ80CARD_ON->setCheckable(true);
actionZ80CARD_ON->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_Z80CARD_ON) != 0) actionZ80CARD_ON->setChecked(true);
- connect(actionZ80CARD_ON, SIGNAL(toggled(bool)), actionZ80CARD_ON->fm7_binds, SLOT(do_set_z80card_on(bool)));
+ _val = FM7_DIPSW_Z80CARD_ON;
+ actionZ80CARD_ON->setData(QVariant(_val));
+ if((p_config->dipswitch & FM7_DIPSW_Z80CARD_ON) != 0) actionZ80CARD_ON->setChecked(true);
+ connect(actionZ80CARD_ON, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
- actionZ80_IRQ = new Action_Control_7(this, using_flags);
+ actionZ80_IRQ = new Action_Control(this, using_flags);
menuMachine->addAction(actionZ80_IRQ);
actionZ80_IRQ->setCheckable(true);
actionZ80_IRQ->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_Z80_IRQ_ON) != 0) actionZ80_IRQ->setChecked(true);
- connect(actionZ80_IRQ, SIGNAL(toggled(bool)), actionZ80_IRQ->fm7_binds, SLOT(do_set_z80_irq(bool)));
- connect(actionZ80_IRQ->fm7_binds, SIGNAL(sig_emu_update_config()), this, SLOT(do_emu_update_config()));
+ _val = FM7_DIPSW_Z80_IRQ_ON;
+ actionZ80_IRQ->setData(QVariant(_val));
+ if((p_config->dipswitch & FM7_DIPSW_Z80_IRQ_ON) != 0) actionZ80_IRQ->setChecked(true);
+ connect(actionZ80_IRQ, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
- actionZ80_FIRQ = new Action_Control_7(this, using_flags);
+ actionZ80_FIRQ = new Action_Control(this, using_flags);
menuMachine->addAction(actionZ80_FIRQ);
actionZ80_FIRQ->setCheckable(true);
actionZ80_FIRQ->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_Z80_FIRQ_ON) != 0) actionZ80_FIRQ->setChecked(true);
- connect(actionZ80_FIRQ, SIGNAL(toggled(bool)), actionZ80_FIRQ->fm7_binds, SLOT(do_set_z80_firq(bool)));
- connect(actionZ80_FIRQ->fm7_binds, SIGNAL(sig_emu_update_config()), this, SLOT(do_emu_update_config()));
+ _val = FM7_DIPSW_Z80_FIRQ_ON;
+ actionZ80_FIRQ->setData(QVariant(_val));
+ if((p_config->dipswitch & FM7_DIPSW_Z80_FIRQ_ON) != 0) actionZ80_FIRQ->setChecked(true);
+ connect(actionZ80_FIRQ, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
- actionZ80_NMI = new Action_Control_7(this, using_flags);
+ actionZ80_NMI = new Action_Control(this, using_flags);
menuMachine->addAction(actionZ80_NMI);
actionZ80_NMI->setCheckable(true);
actionZ80_NMI->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_Z80_NMI_ON) != 0) actionZ80_NMI->setChecked(true);
- connect(actionZ80_NMI, SIGNAL(toggled(bool)), actionZ80_NMI->fm7_binds, SLOT(do_set_z80_nmi(bool)));
- connect(actionZ80_NMI->fm7_binds, SIGNAL(sig_emu_update_config()), this, SLOT(do_emu_update_config()));
- if((config.dipswitch & FM7_DIPSW_Z80CARD_ON) == 0) {
+ _val = FM7_DIPSW_Z80_NMI_ON;
+ actionZ80_NMI->setData(QVariant(_val));
+ if((p_config->dipswitch & FM7_DIPSW_Z80_NMI_ON) != 0) actionZ80_NMI->setChecked(true);
+ connect(actionZ80_NMI, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
+
+ if((p_config->dipswitch & FM7_DIPSW_Z80CARD_ON) == 0) {
actionZ80_IRQ->setVisible(false);
actionZ80_FIRQ->setVisible(false);
actionZ80_NMI->setVisible(false);
}
#endif
menuMachine->addSeparator();
+
for(i = 0; i < 3; i++) {
- actionUART[i] = new Action_Control_7(this, using_flags);
+ const uint32_t uart_list[] = {
+ FM7_DIPSW_RS232C_ON,
+ FM7_DIPSW_MODEM_ON,
+ FM7_DIPSW_MIDI_ON,
+ };
+
+ actionUART[i] = new Action_Control(this, using_flags);
actionUART[i]->setCheckable(true);
actionUART[i]->setVisible(true);
- actionUART[i]->fm7_binds->setValue1(i);
+ actionUART[i]->setData(QVariant(uart_list[i]));
menuMachine->addAction(actionUART[i]);
- connect(actionUART[i], SIGNAL(toggled(bool)), actionUART[i]->fm7_binds, SLOT(do_set_uart(bool)));
+ connect(actionUART[i], SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
}
- if((config.dipswitch & FM7_DIPSW_RS232C_ON) != 0) actionUART[0]->setChecked(true);
- if((config.dipswitch & FM7_DIPSW_MODEM_ON) != 0) actionUART[1]->setChecked(true);
- if((config.dipswitch & FM7_DIPSW_MIDI_ON) != 0) actionUART[2]->setChecked(true);
+ if((p_config->dipswitch & FM7_DIPSW_RS232C_ON) != 0) actionUART[0]->setChecked(true);
+ if((p_config->dipswitch & FM7_DIPSW_MODEM_ON) != 0) actionUART[1]->setChecked(true);
+ if((p_config->dipswitch & FM7_DIPSW_MIDI_ON) != 0) actionUART[2]->setChecked(true);
#if defined(CAPABLE_JCOMMCARD)
- actionJCOMMCARD = new Action_Control_7(this, using_flags);
+ actionJCOMMCARD = new Action_Control(this, using_flags);
menuMachine->addAction(actionJCOMMCARD);
actionJCOMMCARD->setCheckable(true);
actionJCOMMCARD->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_JSUBCARD_ON) != 0) actionJCOMMCARD->setChecked(true);
- connect(actionJCOMMCARD, SIGNAL(toggled(bool)), actionJCOMMCARD->fm7_binds, SLOT(do_set_jcommcard(bool)));
+ _val = FM7_DIPSW_JSUBCARD_ON;
+ actionJCOMMCARD->setData(QVariant(_val));
+ if((p_config->dipswitch & FM7_DIPSW_JSUBCARD_ON) != 0) actionJCOMMCARD->setChecked(true);
+ connect(actionJCOMMCARD, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
#endif
#if defined(_FM8)
- actionRamProtect = new Action_Control_7(this, using_flags);
+ actionRamProtect = new Action_Control(this, using_flags);
menuMachine->addAction(actionRamProtect);
actionRamProtect->setCheckable(true);
actionRamProtect->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_FM8_PROTECT_FD0F) != 0) actionRamProtect->setChecked(true);
- connect(actionRamProtect, SIGNAL(toggled(bool)),
- actionRamProtect->fm7_binds, SLOT(do_set_protect_ram(bool)));
- connect(actionRamProtect->fm7_binds, SIGNAL(sig_emu_update_config()),
- this, SLOT(do_emu_update_config()));
+ _val = FM7_DIPSW_FM8_PROTECT_FD0F;
+ actionRamProtect->setData(QVariant(_val));
+ if((p_config->dipswitch & FM7_DIPSW_FM8_PROTECT_FD0F) != 0) actionRamProtect->setChecked(true);
+ connect(actionRamProtect, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
#else
- actionCycleSteal = new Action_Control_7(this, using_flags);
+ actionCycleSteal = new Action_Control(this, using_flags);
menuMachine->addAction(actionCycleSteal);
actionCycleSteal->setCheckable(true);
actionCycleSteal->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_CYCLESTEAL) != 0) actionCycleSteal->setChecked(true);
- connect(actionCycleSteal, SIGNAL(toggled(bool)),
- actionCycleSteal->fm7_binds, SLOT(do_set_cyclesteal(bool)));
- connect(actionCycleSteal->fm7_binds, SIGNAL(sig_emu_update_config()),
- this, SLOT(do_emu_update_config()));
+ _val = FM7_DIPSW_CYCLESTEAL;
+ actionCycleSteal->setData(QVariant(_val));
+
+ if((p_config->dipswitch & FM7_DIPSW_CYCLESTEAL) != 0) actionCycleSteal->setChecked(true);
+ connect(actionCycleSteal, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
#endif
- actionSyncToHsync = new Action_Control_7(this, using_flags);
+ actionSyncToHsync = new Action_Control(this, using_flags);
menuMachine->addAction(actionSyncToHsync);
actionSyncToHsync->setCheckable(true);
actionSyncToHsync->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_SYNC_TO_HSYNC) != 0) actionSyncToHsync->setChecked(true);
- connect(actionSyncToHsync, SIGNAL(toggled(bool)),
- actionSyncToHsync->fm7_binds, SLOT(do_set_hsync(bool)));
+ _val = FM7_DIPSW_SYNC_TO_HSYNC;
+ actionSyncToHsync->setData(QVariant(_val));
+
+ if((p_config->dipswitch & FM7_DIPSW_SYNC_TO_HSYNC) != 0) actionSyncToHsync->setChecked(true);
+ connect(actionSyncToHsync, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
#if defined(CAPABLE_DICTROM) && !defined(_FM77AV40EX) && !defined(_FM77AV40SX)
- actionDictCard = new Action_Control_7(this, using_flags);
+ actionDictCard = new Action_Control(this, using_flags);
menuMachine->addAction(actionDictCard);
actionDictCard->setCheckable(true);
actionDictCard->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_DICTROM_AV) != 0) actionDictCard->setChecked(true);
- connect(actionDictCard, SIGNAL(toggled(bool)), this, SLOT(do_set_use_dictcard(bool)));
+ _val = FM7_DIPSW_DICTROM_AV;
+ actionDictCard->setData(QVariant(_val));
+
+ if((p_config->dipswitch & FM7_DIPSW_DICTROM_AV) != 0) actionDictCard->setChecked(true);
+ connect(actionDictCard, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
#endif
#if defined(_FM77_VARIANTS) || defined(_FM77AV_VARIANTS)
- actionExtRam = new Action_Control_7(this, using_flags);
+ actionExtRam = new Action_Control(this, using_flags);
menuMachine->addAction(actionExtRam);
actionExtRam->setCheckable(true);
actionExtRam->setVisible(true);
+
# if defined(_FM77AV40) || defined(_FM77AV40SX) || defined(_FM77AV40EX) || defined(_FM77_VARIANTS)
- if((config.dipswitch & FM7_DIPSW_EXTRAM) != 0) actionExtRam->setChecked(true);
+ if((p_config->dipswitch & FM7_DIPSW_EXTRAM) != 0) actionExtRam->setChecked(true);
+ _val = FM7_DIPSW_EXTRAM;
+ actionExtRam->setData(QVariant(_val));
+
# elif defined(_FM77AV_VARIANTS)
- if((config.dipswitch & FM7_DIPSW_EXTRAM_AV) != 0) actionExtRam->setChecked(true);
+ if((p_config->dipswitch & FM7_DIPSW_EXTRAM_AV) != 0) actionExtRam->setChecked(true);
+ _val = FM7_DIPSW_EXTRAM_AV;
+ actionExtRam->setData(QVariant(_val));
+
# endif
- connect(actionExtRam, SIGNAL(toggled(bool)),
- this, SLOT(do_set_extram(bool)));
+ connect(actionExtRam, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
#endif
# if defined(_FM8) || defined(_FM7) || defined(_FMNEW7)
- action_320kFloppy = new Action_Control_7(this, using_flags);
+ action_320kFloppy = new Action_Control(this, using_flags);
menuMachine->addAction(action_320kFloppy);
action_320kFloppy->setCheckable(true);
action_320kFloppy->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_CONNECT_320KFDC) != 0) action_320kFloppy->setChecked(true);
- connect(action_320kFloppy, SIGNAL(toggled(bool)),
- action_320kFloppy->fm7_binds, SLOT(do_set_320kFloppy(bool)));
+ _val = FM7_DIPSW_CONNECT_320KFDC;
+ action_320kFloppy->setData(QVariant(_val));
+
+ if((p_config->dipswitch & FM7_DIPSW_CONNECT_320KFDC) != 0) action_320kFloppy->setChecked(true);
+ connect(action_320kFloppy, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
# endif
# if defined(HAS_2HD)
- action_1MFloppy = new Action_Control_7(this, using_flags);
+ action_1MFloppy = new Action_Control(this, using_flags);
menuMachine->addAction(action_1MFloppy);
action_1MFloppy->setCheckable(true);
action_1MFloppy->setVisible(true);
- if((config.dipswitch & FM7_DIPSW_CONNECT_1MFDC) != 0) action_1MFloppy->setChecked(true);
- connect(action_1MFloppy, SIGNAL(toggled(bool)),
- action_1MFloppy->fm7_binds, SLOT(do_set_1MFloppy(bool)));
+ _val = FM7_DIPSW_CONNECT_1MFDC;
+ action_1MFloppy->setData(QVariant(_val));
+
+ if((p_config->dipswitch & FM7_DIPSW_CONNECT_1MFDC) != 0) action_1MFloppy->setChecked(true);
+ connect(action_1MFloppy, SIGNAL(toggled(bool)), this, SLOT(do_set_single_dipswitch(bool)));
# endif
- uint32_t tmpv = config.dipswitch & (FM7_DIPSW_SELECT_5_OR_8KEY | FM7_DIPSW_AUTO_5_OR_8KEY);
+ uint32_t tmpv = p_config->dipswitch & (FM7_DIPSW_SELECT_5_OR_8KEY | FM7_DIPSW_AUTO_5_OR_8KEY);
menuAuto5_8Key = new QMenu(menuMachine);
menuAuto5_8Key->setObjectName(QString::fromUtf8("menuControl_Auto5_8Key"));
actionGroup_Auto_5_8key = new QActionGroup(this);
actionGroup_Auto_5_8key->setExclusive(true);
- action_Neither_5_or_8key = new Action_Control_7(this, using_flags);
+ action_Neither_5_or_8key = new Action_Control(this, using_flags);
action_Neither_5_or_8key->setCheckable(true);
action_Neither_5_or_8key->setVisible(true);
- action_Neither_5_or_8key->fm7_binds->setValue1(0);
+ action_Neither_5_or_8key->setData(QVariant((int)0));
actionGroup_Auto_5_8key->addAction(action_Neither_5_or_8key);
menuAuto5_8Key->addAction(action_Neither_5_or_8key);
if((tmpv & FM7_DIPSW_AUTO_5_OR_8KEY) == 0) action_Neither_5_or_8key->setChecked(true);
- connect(action_Neither_5_or_8key, SIGNAL(triggered()),
- action_Neither_5_or_8key->fm7_binds, SLOT(do_set_autokey_5_8()));
+ connect(action_Neither_5_or_8key, SIGNAL(triggered()), this, SLOT(do_set_autokey_5_8()));
- action_Auto_5key = new Action_Control_7(this, using_flags);
+ action_Auto_5key = new Action_Control(this, using_flags);
action_Auto_5key->setCheckable(true);
action_Auto_5key->setVisible(true);
- action_Auto_5key->fm7_binds->setValue1(1);
+ action_Auto_5key->setData(QVariant((int)1));
actionGroup_Auto_5_8key->addAction(action_Auto_5key);
menuAuto5_8Key->addAction(action_Auto_5key);
if((tmpv & FM7_DIPSW_AUTO_5_OR_8KEY) != 0) {
action_Auto_5key->setChecked(true);
}
}
- connect(action_Auto_5key, SIGNAL(triggered()),
- action_Auto_5key->fm7_binds, SLOT(do_set_autokey_5_8()));
+ connect(action_Auto_5key, SIGNAL(triggered()), this, SLOT(do_set_autokey_5_8()));
- action_Auto_8key = new Action_Control_7(this, using_flags);
+ action_Auto_8key = new Action_Control(this, using_flags);
action_Auto_8key->setCheckable(true);
action_Auto_8key->setVisible(true);
- action_Auto_8key->fm7_binds->setValue1(2);
+ action_Auto_8key->setData(QVariant((int)2));
actionGroup_Auto_5_8key->addAction(action_Auto_8key);
menuAuto5_8Key->addAction(action_Auto_8key);
if((tmpv & FM7_DIPSW_AUTO_5_OR_8KEY) != 0) {
action_Auto_8key->setChecked(true);
}
}
- connect(action_Auto_8key, SIGNAL(triggered()),
- action_Auto_8key->fm7_binds, SLOT(do_set_autokey_5_8()));
+ connect(action_Auto_8key, SIGNAL(triggered()), this, SLOT(do_set_autokey_5_8()));
}
#ifndef _CSP_QT_MENUCLASSES_H
#define _CSP_QT_MENUCLASSES_H
-#include "commonclasses.h"
#include "mainwidget.h"
#include "vm.h"
// This extends class CSP_MainWindow as Ui_MainWindow.
QT_BEGIN_NAMESPACE
class Ui_SoundDialog;
class USING_FLAGS;
-
-class Object_Menu_Control_7: public Object_Menu_Control
-{
- Q_OBJECT
-public:
- Object_Menu_Control_7(QObject *parent, USING_FLAGS *p);
- ~Object_Menu_Control_7();
-signals:
- // int sig_sound_device(int);
- int sig_emu_update_config(void);
-public slots:
-
- void do_set_z80card_on(bool flag);
- void do_set_z80_irq(bool flag);
- void do_set_z80_firq(bool flag);
- void do_set_z80_nmi(bool flag);
- void do_set_hsync(bool flag);
-
- void do_set_kanji_rom(bool flag);
- void do_set_320kFloppy(bool flag);
-
- void do_set_1MFloppy(bool flag);
- void do_set_protect_ram(bool flag);
-
- void do_set_cyclesteal(bool flag);
- void do_set_jcommcard(bool flag);
-
- void do_set_uart(bool flag);
- void do_set_autokey_5_8(void);
-};
-
-class Action_Control_7 : public Action_Control
-{
- Q_OBJECT
-public:
- Object_Menu_Control_7 *fm7_binds;
- Action_Control_7(QObject *parent, USING_FLAGS *p);
- ~Action_Control_7();
-public slots:
- void do_set_frameskip();
-};
-
class CSP_Logger;
class Ui_MainWindow;
// wrote of Specific menu.
protected:
QMenu *menuFrameSkip;
QActionGroup *actionGroup_FrameSkip;
- class Action_Control_7 *actionFrameSkip[4];
+ class Action_Control *actionFrameSkip[4];
# if defined(_FM77AV_VARIANTS) || defined(_FM77_VARIANTS)
- class Action_Control_7 *actionExtRam;
+ class Action_Control *actionExtRam;
# endif
# if defined(_FM8) || defined(_FM7) || defined(_FMNEW7)
- class Action_Control_7 *actionKanjiRom;
+ class Action_Control *actionKanjiRom;
# endif
# if defined(CAPABLE_JCOMMCARD)
- class Action_Control_7 *actionJCOMMCARD;
+ class Action_Control *actionJCOMMCARD;
# endif
# if defined(_FM8)
- class Action_Control_7 *actionRamProtect;
+ class Action_Control *actionRamProtect;
# else
- class Action_Control_7 *actionCycleSteal;
+ class Action_Control *actionCycleSteal;
# endif
- class Action_Control_7 *actionSyncToHsync;
+ class Action_Control *actionSyncToHsync;
#if defined(CAPABLE_DICTROM) && !defined(_FM77AV40EX) && !defined(_FM77AV40SX)
- class Action_Control_7 *actionDictCard;
+ class Action_Control *actionDictCard;
#endif
QActionGroup *actionGroup_Auto_5_8key;
QMenu *menuAuto5_8Key;
- class Action_Control_7 *action_Neither_5_or_8key;
- class Action_Control_7 *action_Auto_5key;
- class Action_Control_7 *action_Auto_8key;
+ class Action_Control *action_Neither_5_or_8key;
+ class Action_Control *action_Auto_5key;
+ class Action_Control *action_Auto_8key;
# if defined(_FM8) || defined(_FM7) || defined(_FMNEW7)
- class Action_Control_7 *action_320kFloppy;
+ class Action_Control *action_320kFloppy;
# endif
# if defined(HAS_2HD)
- class Action_Control_7 *action_1MFloppy;
+ class Action_Control *action_1MFloppy;
# endif
# if defined(WITH_Z80)
- class Action_Control_7 *actionZ80CARD_ON;
- class Action_Control_7 *actionZ80_IRQ;
- class Action_Control_7 *actionZ80_FIRQ;
- class Action_Control_7 *actionZ80_NMI;
+ class Action_Control *actionZ80CARD_ON;
+ class Action_Control *actionZ80_IRQ;
+ class Action_Control *actionZ80_FIRQ;
+ class Action_Control *actionZ80_NMI;
#endif
- class Action_Control_7 *actionUART[3];
+ class Action_Control *actionUART[3];
void setupUI_Emu(void);
void retranslateUi(void);
META_MainWindow(USING_FLAGS *p, CSP_Logger *logger, QWidget *parent = 0);
~META_MainWindow();
public slots:
- void do_set_extram(bool flag);
-#if defined(CAPABLE_DICTROM) && !defined(_FM77AV40EX) && !defined(_FM77AV40SX)
- void do_set_use_dictcard(bool flag);
-#endif
+ void do_set_frameskip();
+ void do_set_autokey_5_8(void);
+
};
QT_END_NAMESPACE
uint16_t GetAsyncKeyState(uint32_t vk); // Win32 GetAsyncKeyState() wrappeer.
# endif
void key_modifiers(uint32_t mod);
- void enable_mouse();
- void disable_mouse();
- void toggle_mouse();
bool is_mouse_enabled();
//QImage *getPseudoVramClass(void) { return pPseudoVram;}
void set_mouse_pointer(double x, double y);
void process_waiting_in_debugger();
public slots:
+ void enable_mouse();
+ void disable_mouse();
+ void toggle_mouse();
+
+ void upload_bitmap(QImage *p);
+ void set_buttons();
+
+ int no_draw_screen();
+
void do_write_inputdata(QString s);
void do_set_input_string(QString s);
+
void close_debugger_console();
void do_close_debugger_thread();
+
void do_assign_js_setting(int jsnum, int axis_idx, int assigned_value);
- void upload_bitmap(QImage *p);
- void set_buttons();
void do_start_record_video();
virtual void do_decode_movie(int frames);
void do_video_movie_end(bool flag);
void do_video_decoding_error(int num);
virtual void do_run_movie_audio_callback(uint8_t *data, long len);
virtual int draw_screen();
- int no_draw_screen();
+
void do_draw(bool flag);
void set_dbg_completion_list(std::list<std::string> *p);