2 * Common Source code Project:
3 * Ui->Qt->MainWindow for X1TurboZ .
4 * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
7 * Jan 14, 2015 : Initial, many of constructors were moved to qt/gui/menu_main.cpp.
10 #include <QApplication>
16 #include "commonclasses.h"
17 #include "menuclasses.h"
23 extern config_t config;
25 Action_Control_MZ700::Action_Control_MZ700(QObject *parent, USING_FLAGS *p) : Action_Control(parent, p)
27 mz_binds = new Object_Menu_Control_MZ700(parent, p);
30 Action_Control_MZ700::~Action_Control_MZ700(){
34 Object_Menu_Control_MZ700::Object_Menu_Control_MZ700(QObject *parent, USING_FLAGS *p) : Object_Menu_Control(parent, p)
38 Object_Menu_Control_MZ700::~Object_Menu_Control_MZ700(){
42 void META_MainWindow::do_set_pcg(bool flag)
45 this->set_dipsw(0, flag);
46 //this->do_emu_update_config();
50 void META_MainWindow::setupUI_Emu(void)
53 //menuMachine->setVisible(false);
56 action_PCG700 = new QAction(menuMachine);
57 action_PCG700->setCheckable(true);
58 if((config.dipswitch & 0x0001) != 0) action_PCG700->setChecked(true);
59 connect(action_PCG700, SIGNAL(toggled(bool)), this, SLOT(do_set_pcg(bool)));
60 menuMachine->addAction(action_PCG700);
61 menuMachine->addSeparator();
63 #if defined(USE_BOOT_MODE)
64 ConfigCPUBootMode(USE_BOOT_MODE);
69 void META_MainWindow::retranslateUi(void)
71 Ui_MainWindowBase::retranslateUi();
72 retranslateControlMenu(" ", true);
73 #if defined(USE_JOYSTICK_TYPE)
74 actionJoystickType[0]->setText(QApplication::translate("MachineMZ700", "MZ-1X03", 0));
75 actionJoystickType[0]->setToolTip(QApplication::translate("MachineMZ700", "Use Sharp MZ-1X03 Joystick unit.", 0));
76 actionJoystickType[1]->setText(QApplication::translate("MachineMZ700", "JOY-700", 0));
77 actionJoystickType[1]->setToolTip(QApplication::translate("MachineMZ700", "Use Tsukumo JOY-700 Joystick unit.", 0));
78 actionJoystickType[2]->setText(QApplication::translate("MachineMZ700", "AM7J", 0));
79 actionJoystickType[2]->setToolTip(QApplication::translate("MachineMZ700", "Use AM7J ATARI-Joystick adapter.", 0));
82 menuBootMode->setTitle(QApplication::translate("Machine", "BOOT Mode", 0));
83 actionBootMode[0]->setText(QString::fromUtf8("MZ-800"));
84 actionBootMode[1]->setText(QString::fromUtf8("MZ-700"));
86 menuMonitorType->setTitle("Monitor Type");
87 menuMonitorType->setToolTipsVisible(true);
88 actionMonitorType[0]->setText(QApplication::translate("MachineMZ700", "Color", 0));
89 actionMonitorType[1]->setText(QApplication::translate("MachineMZ700", "Monochrome", 0));
90 actionMonitorType[0]->setToolTip(QApplication::translate("MachineMZ700", "Use color CRT.", 0));
91 actionMonitorType[1]->setToolTip(QApplication::translate("MachineMZ700", "Use monochrome CRT.", 0));
92 menuMachine->setTitle(QApplication::translate("MachineMZ700", "Machine", 0));;
95 action_PCG700->setText(QApplication::translate("MachineMZ700", "PCG-700", 0));
96 action_PCG700->setToolTip(QApplication::translate("MachineMZ700", "HAL laboratory PCG-700 PCG.", 0));
99 actionPrintDevice[1]->setText(QString::fromUtf8("MZ-1P17"));
100 actionPrintDevice[1]->setToolTip(QApplication::translate("MachineMZ700", "Sharp MZ-1P17 kanji thermal printer.", 0));
101 actionPrintDevice[2]->setText(QString::fromUtf8("PC-PR201"));
102 actionPrintDevice[2]->setToolTip(QApplication::translate("MenuMZ700", "NEC PC-PR201 kanji serial printer.", 0));
103 actionPrintDevice[2]->setEnabled(false);
105 actionPrintDevice[3]->setText(QString::fromUtf8("None"));
107 #if defined(USE_DRIVE_TYPE)
108 menuDriveType->setTitle(QApplication::translate("MachineMZ700", "Floppy Type", 0));
109 actionDriveType[0]->setText(QApplication::translate("MachineMZ700", "2D", 0));
110 actionDriveType[1]->setText(QApplication::translate("MachineMZ700", "2DD", 0));
113 actionDebugger[0]->setVisible(true);
114 actionDebugger[1]->setVisible(false);
115 actionDebugger[2]->setVisible(false);
116 actionDebugger[3]->setVisible(false);
122 META_MainWindow::META_MainWindow(USING_FLAGS *p, CSP_Logger *logger, QWidget *parent) : Ui_MainWindow(p, logger, parent)
129 META_MainWindow::~META_MainWindow()