diff options
| author | rollsafe <rollsafe@users.noreply.github.com> | 2019-06-04 17:38:51 -0400 |
|---|---|---|
| committer | Your Name <you@example.com> | 2019-06-06 19:28:27 -0400 |
| commit | 6f2b41faa95eeb684612b6aada1854911dda3cda (patch) | |
| tree | 85146145d2a57079a358e606ea2302c38786dbe2 | |
| parent | c5154605500b4a654276b103c6d2a19622febf97 (diff) | |
Display from and to xrefs in xref window
| -rw-r--r-- | ui/xreflist.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ui/xreflist.h b/ui/xreflist.h index f6d4feec..cbe31d62 100644 --- a/ui/xreflist.h +++ b/ui/xreflist.h @@ -9,13 +9,24 @@ #include "viewframe.h" +struct XrefItem +{ + BinaryNinja::ReferenceSource ref; + enum XrefDirection + { + Forward, // Xref from this address + Backward // Xref to this address + } direction; +}; + + class BINARYNINJAUIAPI CrossReferenceListModel: public QAbstractItemModel { Q_OBJECT QWidget* m_owner; BinaryViewRef m_data; - std::vector<BinaryNinja::ReferenceSource> m_refs; + std::vector<XrefItem> m_refs; public: CrossReferenceListModel(QWidget* parent, BinaryViewRef data); @@ -27,7 +38,7 @@ public: virtual int columnCount(const QModelIndex& parent) const override; virtual QVariant data(const QModelIndex& i, int role) const override; - bool setModelData(const std::vector<BinaryNinja::ReferenceSource>& refs, QItemSelectionModel* selectionModel, bool& selectionUpdated); + bool setModelData(const std::vector<XrefItem>& refs, QItemSelectionModel* selectionModel, bool& selectionUpdated); }; |
