GUI: graph ui working
This commit is contained in:
parent
7e3ee588b2
commit
51c887aee0
|
@ -327,6 +327,7 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
});
|
||||
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("snowman.png"), tr("Decompile")), decompileMenu);
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("graph.png"), tr("Graph"), SLOT(graphSlot()), "ActionGraph"));
|
||||
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("help.png"), tr("Help on Symbolic Name")), [this](QMenu * menu)
|
||||
{
|
||||
|
@ -1653,3 +1654,9 @@ void CPUDisassembly::setEncodeTypeSlot()
|
|||
mDisasm->getEncodeMap()->setDataType(rvaToVa(getSelectionStart()), (ENCODETYPE)pAction->data().toUInt());
|
||||
GuiUpdateDisassemblyView();
|
||||
}
|
||||
|
||||
void CPUDisassembly::graphSlot()
|
||||
{
|
||||
DbgCmdExec(QString("graph %1").arg(ToPtrString(rvaToVa(getSelectionStart()))).toUtf8().constData());
|
||||
emit displayGraphWidget();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ signals:
|
|||
void decompileAt(dsint start, dsint end);
|
||||
void displaySnowmanWidget();
|
||||
void displayLogWidget();
|
||||
void displayGraphWidget();
|
||||
|
||||
public slots:
|
||||
void toggleInt3BPActionSlot();
|
||||
|
@ -102,6 +103,7 @@ public slots:
|
|||
void removeAnalysisModuleSlot();
|
||||
void setEncodeTypeSlot();
|
||||
void setEncodeTypeRangeSlot();
|
||||
void graphSlot();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent* event);
|
||||
|
|
|
@ -159,7 +159,11 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
mHandlesView = new HandlesView(this);
|
||||
mHandlesView->setWindowTitle(tr("Handles"));
|
||||
mHandlesView->setWindowIcon(DIcon("handles.png"));
|
||||
mHandlesView->hide();
|
||||
|
||||
// Graph view
|
||||
mGraphView = new DisassemblerGraphView(this);
|
||||
mGraphView->setWindowTitle(tr("Graph"));
|
||||
mGraphView->setWindowIcon(DIcon("graph.png"));
|
||||
|
||||
// Create the tab widget
|
||||
mTabWidget = new MHTabWidget();
|
||||
|
@ -167,6 +171,8 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
// Add all widgets to the list
|
||||
mWidgetList.push_back(mCpuWidget);
|
||||
mWidgetNativeNameList.push_back("CPUTab");
|
||||
mWidgetList.push_back(mGraphView);
|
||||
mWidgetNativeNameList.push_back("Graph");
|
||||
mWidgetList.push_back(mLogView);
|
||||
mWidgetNativeNameList.push_back("LogTab");
|
||||
mWidgetList.push_back(mNotesManager);
|
||||
|
@ -281,12 +287,14 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
connect(ui->actionNotes, SIGNAL(triggered()), this, SLOT(displayNotesWidget()));
|
||||
connect(ui->actionSnowman, SIGNAL(triggered()), this, SLOT(displaySnowmanWidget()));
|
||||
connect(ui->actionHandles, SIGNAL(triggered()), this, SLOT(displayHandlesWidget()));
|
||||
connect(ui->actionGraph, SIGNAL(triggered()), this, SLOT(displayGraphWidget()));
|
||||
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(updateWindowTitle(QString)), this, SLOT(updateWindowTitleSlot(QString)));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(displayReferencesWidget()), this, SLOT(displayReferencesWidget()));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(displaySourceManagerWidget()), this, SLOT(displaySourceViewWidget()));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(displaySnowmanWidget()), this, SLOT(displaySnowmanWidget()));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(displayLogWidget()), this, SLOT(displayLogWidget()));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(displayGraphWidget()), this, SLOT(displayGraphWidget()));
|
||||
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(showPatches()), this, SLOT(patchWindow()));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(decompileAt(dsint, dsint)), this, SLOT(decompileAt(dsint, dsint)));
|
||||
|
@ -450,6 +458,7 @@ void MainWindow::refreshShortcuts()
|
|||
setGlobalShortcut(ui->actionFunctions, ConfigShortcut("ViewFunctions"));
|
||||
setGlobalShortcut(ui->actionSnowman, ConfigShortcut("ViewSnowman"));
|
||||
setGlobalShortcut(ui->actionHandles, ConfigShortcut("ViewHandles"));
|
||||
setGlobalShortcut(ui->actionGraph, ConfigShortcut("ViewGraph"));
|
||||
|
||||
setGlobalShortcut(ui->actionRun, ConfigShortcut("DebugRun"));
|
||||
setGlobalShortcut(ui->actioneRun, ConfigShortcut("DebugeRun"));
|
||||
|
@ -886,6 +895,11 @@ void MainWindow::displaySnowmanWidget()
|
|||
showQWidgetTab(mSnowmanView);
|
||||
}
|
||||
|
||||
void MainWindow::displayGraphWidget()
|
||||
{
|
||||
showQWidgetTab(mGraphView);
|
||||
}
|
||||
|
||||
void MainWindow::hideDebugger()
|
||||
{
|
||||
DbgCmdExec("hide");
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "TimeWastedCounter.h"
|
||||
#include "NotesManager.h"
|
||||
#include "SettingsDialog.h"
|
||||
#include "DisassemblerGraphView.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
|
@ -91,6 +92,7 @@ public slots:
|
|||
void displayReferencesWidget();
|
||||
void displayThreadsWidget();
|
||||
void displaySnowmanWidget();
|
||||
void displayGraphWidget();
|
||||
void hideDebugger();
|
||||
void openSettings();
|
||||
void openAppearance();
|
||||
|
@ -167,6 +169,7 @@ private:
|
|||
SnowmanView* mSnowmanView;
|
||||
HandlesView* mHandlesView;
|
||||
NotesManager* mNotesManager;
|
||||
DisassemblerGraphView* mGraphView;
|
||||
|
||||
StatusLabel* mStatusLabel;
|
||||
StatusLabel* mLastLogLabel;
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
<addaction name="actionFunctions"/>
|
||||
<addaction name="actionSnowman"/>
|
||||
<addaction name="actionHandles"/>
|
||||
<addaction name="actionGraph"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuDebug">
|
||||
<property name="title">
|
||||
|
@ -954,6 +955,15 @@
|
|||
<string>Step into (source)</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGraph">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/icons/images/graph.png</normaloff>:/icons/images/graph.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Graph</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
|
|
|
@ -278,6 +278,7 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
|
|||
defaultShortcuts.insert("ViewFunctions", Shortcut(tr("View -> Functions"), "Alt+F", true));
|
||||
defaultShortcuts.insert("ViewSnowman", Shortcut(tr("View -> Snowman"), "", true));
|
||||
defaultShortcuts.insert("ViewHandles", Shortcut(tr("View -> Handles"), "", true));
|
||||
defaultShortcuts.insert("ViewGraph", Shortcut(tr("View -> Graph"), "Alt+G", true));
|
||||
|
||||
defaultShortcuts.insert("DebugRun", Shortcut(tr("Debug -> Run"), "F9", true));
|
||||
defaultShortcuts.insert("DebugeRun", Shortcut(tr("Debug -> Run (skip exceptions)"), "Shift+F9", true));
|
||||
|
@ -410,6 +411,7 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
|
|||
defaultShortcuts.insert("ActionAbortScript", Shortcut(tr("Actions -> Abort Script"), "Esc"));
|
||||
defaultShortcuts.insert("ActionExecuteCommandScript", Shortcut(tr("Actions -> Execute Script Command"), "X"));
|
||||
defaultShortcuts.insert("ActionRefresh", Shortcut(tr("Actions -> Refresh"), "F5"));
|
||||
defaultShortcuts.insert("ActionGraph", Shortcut(tr("Actions -> Graph"), "G"));
|
||||
|
||||
Shortcuts = defaultShortcuts;
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 825 B |
|
@ -248,5 +248,6 @@
|
|||
<file>images/runtouser.png</file>
|
||||
<file>images/undo.png</file>
|
||||
<file>images/binary_save.png</file>
|
||||
<file>images/graph.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Loading…
Reference in New Issue