GUI: switch view in memory map (all pages)
This commit is contained in:
parent
07183f91d4
commit
538d86f42e
|
@ -34,6 +34,10 @@ void MemoryMapView::setupContextMenu()
|
|||
connect(mFollowDisassembly, SIGNAL(triggered()), this, SLOT(followDisassemblerSlot()));
|
||||
connect(this, SIGNAL(enterPressedSignal()), this, SLOT(followDisassemblerSlot()));
|
||||
|
||||
//Switch View
|
||||
mSwitchView = new QAction("&Switch View", this);
|
||||
connect(mSwitchView, SIGNAL(triggered()), this, SLOT(switchView()));
|
||||
|
||||
//Breakpoint menu
|
||||
mBreakpointMenu = new QMenu("Memory &Breakpoint", this);
|
||||
|
||||
|
@ -98,6 +102,7 @@ void MemoryMapView::contextMenuSlot(const QPoint & pos)
|
|||
QMenu* wMenu = new QMenu(this); //create context menu
|
||||
wMenu->addAction(mFollowDisassembly);
|
||||
wMenu->addAction(mFollowDump);
|
||||
wMenu->addAction(mSwitchView);
|
||||
wMenu->addSeparator();
|
||||
wMenu->addMenu(mBreakpointMenu);
|
||||
QMenu wCopyMenu("&Copy", this);
|
||||
|
@ -202,6 +207,17 @@ QString MemoryMapView::paintContent(QPainter* painter, int_t rowBase, int rowOff
|
|||
return "";
|
||||
}
|
||||
}
|
||||
else if(col == 4) //CPROT
|
||||
{
|
||||
duint setting = 0;
|
||||
QString wStr = StdTable::paintContent(painter, rowBase, rowOffset, col, x, y, w, h);;
|
||||
if(BridgeSettingGetUint("Engine", "ListAllPages", &setting) && !setting)
|
||||
{
|
||||
painter->setPen(ConfigColor("MemoryMapSectionTextColor"));
|
||||
painter->drawText(QRect(x + 4, y, getColumnWidth(col) - 4, getRowHeight()), Qt::AlignVCenter | Qt::AlignLeft, wStr);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
return StdTable::paintContent(painter, rowBase, rowOffset, col, x, y, w, h);
|
||||
}
|
||||
|
||||
|
@ -354,3 +370,16 @@ void MemoryMapView::memoryExecuteSingleshootToggleSlot()
|
|||
else
|
||||
memoryExecuteSingleshootSlot();
|
||||
}
|
||||
|
||||
void MemoryMapView::switchView()
|
||||
{
|
||||
duint setting = 0;
|
||||
if(BridgeSettingGetUint("Engine", "ListAllPages", &setting) && setting)
|
||||
BridgeSettingSetUint("Engine", "ListAllPages", 0);
|
||||
else
|
||||
BridgeSettingSetUint("Engine", "ListAllPages", 1);
|
||||
DbgFunctions()->MemUpdateMap();
|
||||
stateChangedSlot(paused);
|
||||
setSingleSelection(0);
|
||||
setTableOffset(0);
|
||||
}
|
||||
|
|
|
@ -30,12 +30,14 @@ public slots:
|
|||
void memoryRemoveSlot();
|
||||
void memoryExecuteSingleshootToggleSlot();
|
||||
void contextMenuSlot(const QPoint & pos);
|
||||
void switchView();
|
||||
|
||||
private:
|
||||
QString getProtectionString(DWORD Protect);
|
||||
|
||||
QAction* mFollowDump;
|
||||
QAction* mFollowDisassembly;
|
||||
QAction* mSwitchView;
|
||||
|
||||
QMenu* mBreakpointMenu;
|
||||
QMenu* mMemoryAccessMenu;
|
||||
|
|
Loading…
Reference in New Issue