2017-03-29 10:18:37 +00:00
|
|
|
#ifndef XREFSDIALOG_H
|
|
|
|
#define XREFSDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QTreeWidgetItem>
|
2017-10-01 19:09:42 +00:00
|
|
|
#include "utils/Highlighter.h"
|
2017-09-25 12:55:41 +00:00
|
|
|
#include "cutter.h"
|
2017-03-29 10:18:37 +00:00
|
|
|
|
|
|
|
class MainWindow;
|
|
|
|
|
2017-04-09 19:55:06 +00:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class XrefsDialog;
|
2017-03-29 10:18:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class XrefsDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit XrefsDialog(MainWindow *main, QWidget *parent = 0);
|
|
|
|
~XrefsDialog();
|
|
|
|
|
2017-06-08 22:40:43 +00:00
|
|
|
void fillRefsForAddress(RVA addr, QString name, bool whole_function);
|
2017-03-29 10:18:37 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void on_fromTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);
|
|
|
|
|
|
|
|
void on_toTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);
|
|
|
|
|
2017-10-01 18:08:12 +00:00
|
|
|
QString normalizeAddr(const QString& addr) const;
|
2017-03-29 10:18:37 +00:00
|
|
|
|
|
|
|
void highlightCurrentLine();
|
|
|
|
void on_fromTreeWidget_itemSelectionChanged();
|
|
|
|
|
|
|
|
void on_toTreeWidget_itemSelectionChanged();
|
|
|
|
|
|
|
|
private:
|
2017-06-07 19:35:38 +00:00
|
|
|
RVA addr;
|
|
|
|
QString func_name;
|
|
|
|
|
2017-03-29 10:18:37 +00:00
|
|
|
Ui::XrefsDialog *ui;
|
|
|
|
MainWindow *main;
|
|
|
|
|
|
|
|
Highlighter *highlighter;
|
|
|
|
|
2017-06-07 19:35:38 +00:00
|
|
|
void fillRefs(QList<XrefDescription> refs, QList<XrefDescription> xrefs);
|
2017-06-07 15:48:36 +00:00
|
|
|
void updateLabels(QString name);
|
2017-06-07 19:35:38 +00:00
|
|
|
void updatePreview(RVA addr);
|
2017-06-07 15:48:36 +00:00
|
|
|
|
2017-03-29 10:18:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // XREFSDIALOG_H
|