mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-10 14:05:25 +00:00
ab27e09b91
Sometimes it is not necessary to include the whole Cutter.h file Hence, it's been splitted so you can include only what you require E.g. #include "core/CutterCommon.h" to have access to the common types
55 lines
1.1 KiB
C++
55 lines
1.1 KiB
C++
#ifndef XREFSDIALOG_H
|
|
#define XREFSDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QTreeWidgetItem>
|
|
#include <memory>
|
|
#include "common/Highlighter.h"
|
|
#include "core/Cutter.h"
|
|
|
|
class MainWindow;
|
|
|
|
namespace Ui {
|
|
class XrefsDialog;
|
|
}
|
|
|
|
class XrefsDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit XrefsDialog(QWidget *parent = nullptr);
|
|
~XrefsDialog();
|
|
|
|
void fillRefsForAddress(RVA addr, QString name, bool whole_function);
|
|
|
|
private slots:
|
|
void on_fromTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);
|
|
void on_toTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);
|
|
|
|
QString normalizeAddr(const QString &addr) const;
|
|
|
|
void setupPreviewFont();
|
|
void setupPreviewColors();
|
|
|
|
void highlightCurrentLine();
|
|
void on_fromTreeWidget_itemSelectionChanged();
|
|
|
|
void on_toTreeWidget_itemSelectionChanged();
|
|
|
|
private:
|
|
RVA addr;
|
|
QString func_name;
|
|
|
|
std::unique_ptr<Ui::XrefsDialog> ui;
|
|
|
|
void fillRefs(QList<XrefDescription> refs, QList<XrefDescription> xrefs);
|
|
void updateLabels(QString name);
|
|
void updatePreview(RVA addr);
|
|
|
|
QString xrefTypeString(const QString &type);
|
|
|
|
};
|
|
|
|
#endif // XREFSDIALOG_H
|