SearchResultModel Class Reference

Public Types

enum  ColumnHeaders {
  AddressColumn = 0 , DataColumn = 1 , FunctionColumn = 2 , PreviewColumn = 3 ,
  EndOfColumn = 4
}
 

Public Member Functions

 SearchResultModel (QWidget *parent, BinaryViewRef data)
 
virtual ~SearchResultModel ()
 
virtual QModelIndex index (int row, int col, const QModelIndex &parent=QModelIndex()) const override
 
void reset ()
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
SearchResultItem getRow (int row) const
 
virtual QVariant data (const QModelIndex &i, int role) const override
 
virtual QVariant headerData (int column, Qt::Orientation orientation, int role) const override
 
void addItem (const SearchResultItem &addr)
 
void clear ()
 
void updateFindParameters (const BinaryNinja::FindParameters params)
 
void updateSearchResults ()
 
size_t getColumnWidth (size_t column) const
 
void updateColumnWidth (size_t column, size_t size) const
 
void resetColumnWidth ()
 
bool isUserColumnWidth (size_t column) const
 
void setUserColumnWidth (size_t column)
 

Protected Attributes

QWidget * m_owner
 
BinaryViewRef m_data
 
BinaryNinja::FindParameters m_params
 
std::vector< SearchResultItemm_refs
 
size_t m_columnWidths [4]
 
bool m_userColumnWidth [4]
 
std::mutex m_updateMutex
 
std::set< SearchResultItemm_pendingSearchResults
 

Member Enumeration Documentation

◆ ColumnHeaders

Enumerator
AddressColumn 
DataColumn 
FunctionColumn 
PreviewColumn 
EndOfColumn 

Constructor & Destructor Documentation

◆ SearchResultModel()

SearchResultModel::SearchResultModel ( QWidget *  parent,
BinaryViewRef  data 
)

◆ ~SearchResultModel()

virtual SearchResultModel::~SearchResultModel ( )
virtual

Member Function Documentation

◆ index()

virtual QModelIndex SearchResultModel::index ( int  row,
int  col,
const QModelIndex &  parent = QModelIndex() 
) const
overridevirtual

◆ reset()

void SearchResultModel::reset ( )

◆ rowCount()

virtual int SearchResultModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
inlineoverridevirtual

◆ columnCount()

virtual int SearchResultModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
inlineoverridevirtual

◆ getRow()

SearchResultItem SearchResultModel::getRow ( int  row) const

◆ data()

virtual QVariant SearchResultModel::data ( const QModelIndex &  i,
int  role 
) const
overridevirtual

◆ headerData()

virtual QVariant SearchResultModel::headerData ( int  column,
Qt::Orientation  orientation,
int  role 
) const
overridevirtual

◆ addItem()

void SearchResultModel::addItem ( const SearchResultItem addr)

◆ clear()

void SearchResultModel::clear ( )

◆ updateFindParameters()

void SearchResultModel::updateFindParameters ( const BinaryNinja::FindParameters  params)

◆ updateSearchResults()

void SearchResultModel::updateSearchResults ( )

◆ getColumnWidth()

size_t SearchResultModel::getColumnWidth ( size_t  column) const

◆ updateColumnWidth()

void SearchResultModel::updateColumnWidth ( size_t  column,
size_t  size 
) const

◆ resetColumnWidth()

void SearchResultModel::resetColumnWidth ( )

◆ isUserColumnWidth()

bool SearchResultModel::isUserColumnWidth ( size_t  column) const

◆ setUserColumnWidth()

void SearchResultModel::setUserColumnWidth ( size_t  column)

Member Data Documentation

◆ m_owner

QWidget* SearchResultModel::m_owner
protected

◆ m_data

BinaryViewRef SearchResultModel::m_data
protected

◆ m_params

BinaryNinja::FindParameters SearchResultModel::m_params
protected

◆ m_refs

std::vector<SearchResultItem> SearchResultModel::m_refs
protected

◆ m_columnWidths

size_t SearchResultModel::m_columnWidths[4]
mutableprotected

◆ m_userColumnWidth

bool SearchResultModel::m_userColumnWidth[4]
protected

◆ m_updateMutex

std::mutex SearchResultModel::m_updateMutex
protected

◆ m_pendingSearchResults

std::set<SearchResultItem> SearchResultModel::m_pendingSearchResults
protected