2017-03-29 10:18:37 +00:00
|
|
|
#include "relocswidget.h"
|
|
|
|
#include "ui_relocswidget.h"
|
|
|
|
|
|
|
|
#include "mainwindow.h"
|
|
|
|
|
|
|
|
RelocsWidget::RelocsWidget(MainWindow *main, QWidget *parent) :
|
|
|
|
QDockWidget(parent),
|
|
|
|
ui(new Ui::RelocsWidget)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
|
|
|
// Radare core found in:
|
|
|
|
this->main = main;
|
|
|
|
this->relocsTreeWidget = ui->relocsTreeWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
RelocsWidget::~RelocsWidget()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
|
|
|
|
void RelocsWidget::on_relocsTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column)
|
|
|
|
{
|
2017-04-09 17:09:35 +00:00
|
|
|
QNOTUSED(column);
|
|
|
|
|
2017-03-29 10:18:37 +00:00
|
|
|
// Get offset and name of item double clicked
|
|
|
|
// TODO: use this info to change disasm contents
|
2017-04-01 12:43:57 +00:00
|
|
|
QString offset = item->text(1);
|
|
|
|
QString name = item->text(2);
|
2017-03-29 10:18:37 +00:00
|
|
|
main->seek(offset, name);
|
|
|
|
this->main->memoryDock->raise();
|
|
|
|
}
|