1
0
Fork 0

GUI: formatting RegistersView

This commit is contained in:
mrexodia 2016-09-05 08:46:36 +02:00
parent b536b7ee26
commit 9b703ae9b2
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
3 changed files with 8 additions and 12 deletions

View File

@ -458,8 +458,7 @@ RegistersView::RegistersView(CPUWidget* parent, CPUMultiDump* multiDump) : QScro
wCM_Push = setupAction(tr("Push"), this);
wCM_Pop = setupAction(tr("Pop"), this);
wCM_Highlight = setupAction(tr("Highlight"), this);
mMultiDump = multiDump;
mFollowInDumpMenu = CreateDumpNMenu();
mFollowInDumpMenu = CreateDumpNMenu(multiDump);
// general purposes register (we allow the user to modify the value)
mGPR.insert(CAX);
@ -1247,15 +1246,14 @@ bool RegistersView::identifyRegister(const int line, const int offset, REGISTER_
return found_flag;
}
QMenu *RegistersView::CreateDumpNMenu()
QMenu* RegistersView::CreateDumpNMenu(CPUMultiDump* multiDump)
{
auto followInDumpName = ArchValue(tr("Follow DWORD in &Dump"), tr("Follow QWord in &Dump"));
QMenu *dumpMenu = new QMenu(followInDumpName, this);
int maxDumps = mMultiDump->getMaxCPUTabs();
QMenu* dumpMenu = new QMenu(tr("Follow in &Dump"), this);
dumpMenu->setIcon(DIcon("dump.png"));
int maxDumps = multiDump->getMaxCPUTabs();
for(int i = 0; i < maxDumps; i++)
{
QAction *action = new QAction(tr("Dump %1").arg(i + 1), this);
QAction* action = new QAction(tr("Dump %1").arg(i + 1), this);
connect(action, SIGNAL(triggered()), this, SLOT(onFollowInDumpN()));
dumpMenu->addAction(action);
action->setData(i + 1);

View File

@ -126,7 +126,7 @@ protected:
void setRegisters(REGDUMP* reg);
char* registerValue(const REGDUMP* regd, const REGISTER_NAME reg);
bool identifyRegister(const int y, const int x, REGISTER_NAME* clickedReg);
QMenu *CreateDumpNMenu();
QMenu* CreateDumpNMenu(CPUMultiDump* multiDump);
void displayEditDialog();
@ -240,8 +240,6 @@ private:
QAction* wCM_ChangeFPUView;
QAction* wCM_Highlight;
dsint mCip;
CPUMultiDump* mMultiDump;
};
#endif // REGISTERSVIEW_H

@ -1 +1 @@
Subproject commit a2ad143586e23ce7c8ba9126eed60d5a9a9f89f8
Subproject commit 42ba5ddd9417f178c5eecb664380d7bb8096179d