diff options
| author | Alexander Taylor <alex@vector35.com> | 2025-04-02 18:17:17 -0400 |
|---|---|---|
| committer | Alexander Taylor <alex@vector35.com> | 2025-04-02 18:17:17 -0400 |
| commit | fa210cf133480db3e5e4e396b55d4fb41ee1ac8b (patch) | |
| tree | d4eece4cb4453219be5105019e10c96fe80951f1 /view | |
| parent | 34d2959fd08d5c7df486ec57c87957d0c273f3ff (diff) | |
Add filtering for mappings in shared cache view.
Diffstat (limited to 'view')
| -rw-r--r-- | view/sharedcache/ui/dsctriage.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/view/sharedcache/ui/dsctriage.cpp b/view/sharedcache/ui/dsctriage.cpp index 5c2162fb..048cf660 100644 --- a/view/sharedcache/ui/dsctriage.cpp +++ b/view/sharedcache/ui/dsctriage.cpp @@ -9,7 +9,6 @@ #include <QMessageBox> #include <QHeaderView> #include "dsctriage.h" -#include <QTableWidgetItem> #include "symboltable.h" using namespace BinaryNinja; @@ -279,7 +278,7 @@ DSCTriageView::DSCTriageView(QWidget* parent, BinaryViewRef data) : QWidget(pare auto cacheInfoSubwidget = new QWidget; - auto mappingTable = new QTableView(cacheInfoSubwidget); + auto mappingTable = new FilterableTableView(cacheInfoSubwidget); m_mappingModel = new QStandardItemModel(0, 4, mappingTable); m_mappingModel->setHorizontalHeaderLabels({"Address", "Size", "File Address", "File Path"}); @@ -320,6 +319,18 @@ DSCTriageView::DSCTriageView(QWidget* parent, BinaryViewRef data) : QWidget(pare regionTable->verticalHeader()->setVisible(false); auto mappingLabel = new QLabel("Mappings"); + auto mappingFilterEdit = new FilterEdit(mappingTable); + { + connect(mappingFilterEdit, &FilterEdit::textChanged, [mappingTable](const QString& filter) { + mappingTable->setFilter(filter.toStdString()); + }); + } + + auto mappingHeaderLayout = new QHBoxLayout; + mappingHeaderLayout->addWidget(mappingLabel); + mappingHeaderLayout->addWidget(mappingFilterEdit); + mappingHeaderLayout->setAlignment(Qt::AlignJustify); + mappingHeaderLayout->setSpacing(30); auto regionLabel = new QLabel("Regions"); auto regionFilterEdit = new FilterEdit(regionTable); @@ -336,7 +347,7 @@ DSCTriageView::DSCTriageView(QWidget* parent, BinaryViewRef data) : QWidget(pare regionHeaderLayout->setSpacing(30); auto mappingLayout = new QVBoxLayout; - mappingLayout->addWidget(mappingLabel); + mappingLayout->addLayout(mappingHeaderLayout); mappingLayout->addWidget(mappingTable); auto regionLayout = new QVBoxLayout; |
