debugger_frame: transfer capture button from main_window menu

and clean up some unused actions in main_window.ui
This commit is contained in:
Megamouse 2017-07-11 18:10:40 +02:00 committed by Ani
parent 06f6ac66fa
commit 67f1fa086d
4 changed files with 6 additions and 52 deletions

View File

@ -5,6 +5,7 @@
#include <QFontDatabase>
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
extern bool user_asked_for_frame_capture;
debugger_frame::debugger_frame(QWidget *parent) : QDockWidget(tr("Debugger"), parent)
{
@ -30,6 +31,7 @@ debugger_frame::debugger_frame(QWidget *parent) : QDockWidget(tr("Debugger"), pa
m_go_to_addr = new QPushButton(tr("Go To Address"), this);
m_go_to_pc = new QPushButton(tr("Go To PC"), this);
m_btn_capture = new QPushButton(tr("Capture"), this);
m_btn_step = new QPushButton(tr("Step"), this);
m_btn_run = new QPushButton(Run, this);
@ -37,6 +39,7 @@ debugger_frame::debugger_frame(QWidget *parent) : QDockWidget(tr("Debugger"), pa
hbox_b_main->addWidget(m_go_to_addr);
hbox_b_main->addWidget(m_go_to_pc);
hbox_b_main->addWidget(m_btn_capture);
hbox_b_main->addWidget(m_btn_step);
hbox_b_main->addWidget(m_btn_run);
hbox_b_main->addWidget(m_choice_units);
@ -72,6 +75,7 @@ debugger_frame::debugger_frame(QWidget *parent) : QDockWidget(tr("Debugger"), pa
connect(m_go_to_addr, &QAbstractButton::clicked, this, &debugger_frame::Show_Val);
connect(m_go_to_pc, &QAbstractButton::clicked, this, &debugger_frame::Show_PC);
connect(m_btn_capture, &QAbstractButton::clicked, [=]() { user_asked_for_frame_capture = true; });
connect(m_btn_step, &QAbstractButton::clicked, this, &debugger_frame::DoStep);
connect(m_btn_run, &QAbstractButton::clicked, [=](){
if (const auto cpu = this->cpu.lock())

View File

@ -40,6 +40,7 @@ class debugger_frame : public QDockWidget
QTextEdit* m_regs;
QPushButton* m_go_to_addr;
QPushButton* m_go_to_pc;
QPushButton* m_btn_capture;
QPushButton* m_btn_step;
QPushButton* m_btn_run;
QComboBox* m_choice_units;

View File

@ -691,8 +691,6 @@ void main_window::OnEmuReady()
EnableMenus(true);
}
extern bool user_asked_for_frame_capture;
void main_window::EnableMenus(bool enabled)
{
// Thumbnail Buttons
@ -958,7 +956,6 @@ void main_window::CreateConnects()
connect(ui->sysPauseAct, &QAction::triggered, Pause);
connect(ui->sysStopAct, &QAction::triggered, [=]() { Emu.Stop(); });
connect(ui->sysRebootAct, &QAction::triggered, [=]() { Emu.Stop(); Emu.Load(); });
connect(ui->captureFrame, &QAction::triggered, [=]() { user_asked_for_frame_capture = true; });
connect(ui->sysSendOpenMenuAct, &QAction::triggered, [=](){
sysutil_send_system_cmd(m_sys_menu_opened ? 0x0132 /* CELL_SYSUTIL_SYSTEM_MENU_CLOSE */ : 0x0131 /* CELL_SYSUTIL_SYSTEM_MENU_OPEN */, 0);
m_sys_menu_opened = !m_sys_menu_opened;
@ -1121,7 +1118,7 @@ void main_window::CreateConnects()
connect(ui->toolbar_refresh, &QAction::triggered, [=]() { gameListFrame->Refresh(true); });
connect(ui->toolbar_stop, &QAction::triggered, [=]() { Emu.Stop(); });
connect(ui->toolbar_start, &QAction::triggered, Pause);
//connect(ui->toolbar_snap, &QAction::triggered, [=]() { user_asked_for_frame_capture = true; });
//connect(ui->toolbar_snap, &QAction::triggered, [=]() {});
connect(ui->toolbar_fullscreen, &QAction::triggered, [=]() {
if (isFullScreen())
{

View File

@ -186,8 +186,6 @@ margin-left:14px;</string>
<addaction name="sysStopAct"/>
<addaction name="sysRebootAct"/>
<addaction name="separator"/>
<addaction name="captureFrame"/>
<addaction name="separator"/>
<addaction name="sysSendOpenMenuAct"/>
<addaction name="sysSendExitAct"/>
</widget>
@ -518,14 +516,6 @@ QLineEdit { background-color: rgba(227, 227, 227, 255); }</string>
<string>Manage User Accounts</string>
</property>
</action>
<action name="actionManage_yml_Patches">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Manage .yml Patches</string>
</property>
</action>
<action name="toolsCgDisasmAct">
<property name="text">
<string>Cg Disasm</string>
@ -594,11 +584,6 @@ QLineEdit { background-color: rgba(227, 227, 227, 255); }</string>
<string>About Qt</string>
</property>
</action>
<action name="actionShow_Controls">
<property name="text">
<string>Show Controls</string>
</property>
</action>
<action name="showGameListAct">
<property name="checkable">
<bool>true</bool>
@ -620,11 +605,6 @@ QLineEdit { background-color: rgba(227, 227, 227, 255); }</string>
<string>Game List Refresh</string>
</property>
</action>
<action name="actionShow_Categories">
<property name="text">
<string>Game List Categories</string>
</property>
</action>
<action name="actionManage_RAP_Licences">
<property name="enabled">
<bool>false</bool>
@ -725,16 +705,6 @@ QLineEdit { background-color: rgba(227, 227, 227, 255); }</string>
<string>Restart</string>
</property>
</action>
<action name="actionPause">
<property name="text">
<string>Pause</string>
</property>
</action>
<action name="actionSave_State">
<property name="text">
<string>Save State</string>
</property>
</action>
<action name="showCatHDDGameAct">
<property name="checkable">
<bool>true</bool>
@ -801,14 +771,6 @@ QLineEdit { background-color: rgba(227, 227, 227, 255); }</string>
<string>Unknown</string>
</property>
</action>
<action name="captureFrame">
<property name="text">
<string>Capture Frame</string>
</property>
<property name="toolTip">
<string>Capture frame</string>
</property>
</action>
<action name="toolbar_start">
<property name="icon">
<iconset resource="../resources.qrc">
@ -978,16 +940,6 @@ QLineEdit { background-color: rgba(227, 227, 227, 255); }</string>
<string>Show Game Tool Bar</string>
</property>
</action>
<action name="actionNetwork">
<property name="text">
<string>Network</string>
</property>
</action>
<action name="actionEmulator">
<property name="text">
<string>Emulator</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>