BASIC SET MEMORY PAGE RIGHT GUI
This commit is contained in:
parent
dc64fc8412
commit
77293f38dd
|
@ -34,6 +34,10 @@ void MemoryMapView::setupContextMenu()
|
|||
connect(mFollowDisassembly, SIGNAL(triggered()), this, SLOT(followDisassemblerSlot()));
|
||||
connect(this, SIGNAL(enterPressedSignal()), this, SLOT(followDisassemblerSlot()));
|
||||
|
||||
//Set PageMemory Rights
|
||||
mPageMemoryRights = new QAction("Set Page Memory Rights", this);
|
||||
connect(mPageMemoryRights, SIGNAL(triggered()), this, SLOT(pageMemoryRights()));
|
||||
|
||||
//Switch View
|
||||
mSwitchView = new QAction("&Switch View", this);
|
||||
connect(mSwitchView, SIGNAL(triggered()), this, SLOT(switchView()));
|
||||
|
@ -103,6 +107,7 @@ void MemoryMapView::contextMenuSlot(const QPoint & pos)
|
|||
wMenu->addAction(mFollowDisassembly);
|
||||
wMenu->addAction(mFollowDump);
|
||||
wMenu->addAction(mSwitchView);
|
||||
wMenu->addAction(mPageMemoryRights);
|
||||
wMenu->addSeparator();
|
||||
wMenu->addMenu(mBreakpointMenu);
|
||||
QMenu wCopyMenu("&Copy", this);
|
||||
|
@ -371,6 +376,15 @@ void MemoryMapView::memoryExecuteSingleshootToggleSlot()
|
|||
memoryExecuteSingleshootSlot();
|
||||
}
|
||||
|
||||
void MemoryMapView::pageMemoryRights()
|
||||
{
|
||||
PageMemoryRights* mPageMemoryRightsDialog = new PageMemoryRights(this);
|
||||
// mPageMemoryRightsDialog->ShowNormal();
|
||||
//mPageMemoryRightsDialog->SetFocus();
|
||||
|
||||
mPageMemoryRightsDialog->exec();
|
||||
}
|
||||
|
||||
void MemoryMapView::switchView()
|
||||
{
|
||||
duint setting = 0;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <QtGui>
|
||||
#include "StdTable.h"
|
||||
#include "Bridge.h"
|
||||
#include "PageMemoryRights.h"
|
||||
|
||||
class MemoryMapView : public StdTable
|
||||
{
|
||||
|
@ -31,6 +32,7 @@ public slots:
|
|||
void memoryExecuteSingleshootToggleSlot();
|
||||
void contextMenuSlot(const QPoint & pos);
|
||||
void switchView();
|
||||
void pageMemoryRights();
|
||||
|
||||
private:
|
||||
QString getProtectionString(DWORD Protect);
|
||||
|
@ -38,6 +40,7 @@ private:
|
|||
QAction* mFollowDump;
|
||||
QAction* mFollowDisassembly;
|
||||
QAction* mSwitchView;
|
||||
QAction* mPageMemoryRights;
|
||||
|
||||
QMenu* mBreakpointMenu;
|
||||
QMenu* mMemoryAccessMenu;
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#include "PageMemoryRights.h"
|
||||
#include "ui_PageMemoryRights.h"
|
||||
|
||||
PageMemoryRights::PageMemoryRights(QWidget* parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::PageMemoryRights)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
PageMemoryRights::~PageMemoryRights()
|
||||
{
|
||||
delete ui;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef PAGEMEMORYRIGHTS_H
|
||||
#define PAGEMEMORYRIGHTS_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class PageMemoryRights;
|
||||
}
|
||||
|
||||
class PageMemoryRights : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PageMemoryRights(QWidget* parent = 0);
|
||||
~PageMemoryRights();
|
||||
|
||||
private:
|
||||
Ui::PageMemoryRights* ui;
|
||||
};
|
||||
|
||||
#endif // PAGEMEMORYRIGHTS_H
|
|
@ -0,0 +1,224 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PageMemoryRights</class>
|
||||
<widget class="QDialog" name="PageMemoryRights">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>482</width>
|
||||
<height>299</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Set Page Memory Rights</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/icons/images/memory-map.png</normaloff>:/icons/images/memory-map.png</iconset>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
<y>270</y>
|
||||
<width>121</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>311</width>
|
||||
<height>192</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>331</width>
|
||||
<height>251</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Pages</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
<y>10</y>
|
||||
<width>121</width>
|
||||
<height>201</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Rights</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton">
|
||||
<property name="text">
|
||||
<string>NO ACCESS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_2">
|
||||
<property name="text">
|
||||
<string>READ ONLY</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_3">
|
||||
<property name="text">
|
||||
<string>READ & WRITE</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_4">
|
||||
<property name="text">
|
||||
<string>EXECUTE</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_5">
|
||||
<property name="text">
|
||||
<string>EXECUTE & READ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_6">
|
||||
<property name="text">
|
||||
<string>FULL ACCESS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Set Rights</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>230</y>
|
||||
<width>230</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="text">
|
||||
<string>Select ALL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="text">
|
||||
<string>Deselect ALL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>270</y>
|
||||
<width>331</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<zorder>buttonBox</zorder>
|
||||
<zorder>pushButton</zorder>
|
||||
<zorder>groupBox</zorder>
|
||||
<zorder>lineEdit</zorder>
|
||||
<zorder>lineEdit</zorder>
|
||||
<zorder>pushButton_2</zorder>
|
||||
<zorder>pushButton_3</zorder>
|
||||
<zorder>pushButton</zorder>
|
||||
<zorder>tableWidget</zorder>
|
||||
<zorder>pushButton_2</zorder>
|
||||
<zorder>pushButton_3</zorder>
|
||||
<zorder>groupBox_2</zorder>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../resource.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>PageMemoryRights</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>PageMemoryRights</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
|
@ -84,7 +84,8 @@ SOURCES += \
|
|||
Src/Gui/ShortcutsDialog.cpp \
|
||||
Src/BasicView/ShortcutEdit.cpp \
|
||||
Src/Gui/CalculatorDialog.cpp \
|
||||
Src/Gui/AttachDialog.cpp
|
||||
Src/Gui/AttachDialog.cpp \
|
||||
Src/Gui/PageMemoryRights.cpp
|
||||
|
||||
|
||||
HEADERS += \
|
||||
|
@ -147,7 +148,8 @@ HEADERS += \
|
|||
Src/Gui/ShortcutsDialog.h \
|
||||
Src/BasicView/ShortcutEdit.h \
|
||||
Src/Gui/CalculatorDialog.h \
|
||||
Src/Gui/AttachDialog.h
|
||||
Src/Gui/AttachDialog.h \
|
||||
Src/Gui/PageMemoryRights.h
|
||||
|
||||
|
||||
INCLUDEPATH += \
|
||||
|
@ -180,7 +182,8 @@ FORMS += \
|
|||
Src/Gui/PatchDialogGroupSelector.ui \
|
||||
Src/Gui/ShortcutsDialog.ui \
|
||||
Src/Gui/CalculatorDialog.ui \
|
||||
Src/Gui/AttachDialog.ui
|
||||
Src/Gui/AttachDialog.ui \
|
||||
Src/Gui/PageMemoryRights.ui
|
||||
|
||||
INCLUDEPATH += $$PWD/Src/Bridge
|
||||
|
||||
|
|
Loading…
Reference in New Issue