MetadataChoiceDialog

MetadataChoiceDialog aims to provide a fairly extensible dialog for displaying selection info, without requiring reimplementation or extra UI code whenever complex behavior is required. More...

Detailed Description

MetadataChoiceDialog aims to provide a fairly extensible dialog for displaying selection info, without requiring reimplementation or extra UI code whenever complex behavior is required.

It can optionally display metadata to the right, a 2nd column with extra information about entries, and can have a checkbox-toggleable second filter (the first one being a regular text filter bar).

These are all described in the class documentation below.

Classes

struct  EntryItem
 
class  ManagedTableDelegate
 

Class Documentation

◆ EntryItem

struct EntryItem
Class Members
size_t idx
QString entryText

◆ ManagedTableDelegate

class ManagedTableDelegate

Public Member Functions

virtual ~ManagedTableDelegate ()
 
virtual size_t ManagedTableColumnCount ()=0
 
virtual size_t ManagedTableRowCount ()=0
 
virtual QString ManagedTableColumnName (size_t)=0
 
virtual QString ManagedTableDisplayText (size_t row, size_t col)=0
 
virtual std::vector< std::pair< QString, std::function< void(EntryItem item)> > > GetTableContextMenuItems ()=0
 
virtual void ExecuteContextMenuItem (size_t menuItemIndex, size_t idx)=0
 
virtual std::vector< EntryItemGetAllItems () const =0
 
virtual bool EntryItemPassesExtraFilters (EntryItem &item)=0
 

Constructor & Destructor Documentation

◆ ~ManagedTableDelegate()

virtual ManagedTableDelegate::~ManagedTableDelegate ( )
virtual

Member Function Documentation

◆ ManagedTableColumnCount()

virtual size_t ManagedTableDelegate::ManagedTableColumnCount ( )
pure virtual

Implemented in MetadataChoiceDialog.

◆ ManagedTableRowCount()

virtual size_t ManagedTableDelegate::ManagedTableRowCount ( )
pure virtual

Implemented in MetadataChoiceDialog.

◆ ManagedTableColumnName()

virtual QString ManagedTableDelegate::ManagedTableColumnName ( size_t  )
pure virtual

Implemented in MetadataChoiceDialog.

◆ ManagedTableDisplayText()

virtual QString ManagedTableDelegate::ManagedTableDisplayText ( size_t  row,
size_t  col 
)
pure virtual

Implemented in MetadataChoiceDialog.

◆ GetTableContextMenuItems()

virtual std::vector< std::pair< QString, std::function< void(EntryItem item)> > > ManagedTableDelegate::GetTableContextMenuItems ( )
pure virtual

Implemented in MetadataChoiceDialog.

◆ ExecuteContextMenuItem()

virtual void ManagedTableDelegate::ExecuteContextMenuItem ( size_t  menuItemIndex,
size_t  idx 
)
pure virtual

Implemented in MetadataChoiceDialog.

◆ GetAllItems()

virtual std::vector< EntryItem > ManagedTableDelegate::GetAllItems ( ) const
pure virtual

Implemented in MetadataChoiceDialog.

◆ EntryItemPassesExtraFilters()

virtual bool ManagedTableDelegate::EntryItemPassesExtraFilters ( EntryItem item)
pure virtual

Implemented in MetadataChoiceDialog.

◆ EntryItemMetadataView

class EntryItemMetadataView

Public Member Functions

 EntryItemMetadataView (QWidget *parent)
 
void SetDelegate (EntryItemMetadataViewDelegate *delegate)
 
virtual void DisplayPlainText (EntryItem &item)
 
virtual void DisplayTextLines (EntryItem &item)
 

Protected Attributes

bool m_currentItemIsTruncated
 

Constructor & Destructor Documentation

◆ EntryItemMetadataView()

EntryItemMetadataView::EntryItemMetadataView ( QWidget *  parent)
explicit

Member Function Documentation

◆ SetDelegate()

void EntryItemMetadataView::SetDelegate ( EntryItemMetadataViewDelegate delegate)
inline

◆ DisplayPlainText()

virtual void EntryItemMetadataView::DisplayPlainText ( EntryItem item)
virtual

◆ DisplayTextLines()

virtual void EntryItemMetadataView::DisplayTextLines ( EntryItem item)
virtual

Member Data Documentation

◆ m_currentItemIsTruncated

bool EntryItemMetadataView::m_currentItemIsTruncated
protected

◆ MetadataChoiceDialog

class MetadataChoiceDialog

MetadataChoiceDialog is a dynamic UI View and Controller that allows the user to make a selection given a list of entries, and metadata about those entries.

The Model's data is left up to the developer using the dialog to manage. A developer can implement a second checkbox-toggled filter, custom metadata shown in a box to the right of the table, and/or a custom second column with additional info about entries.

Content from all of these callbacks is cached, however these caches can be evicted if data has changed or been added.

This dialog can to scale to very large amounts of arbitrary info by lazily loading it from provided callbacks, without requiring bespoke dialogs being built for those applications.

Example:

// In this example, we display a list of all defined types to the user and allow them to pick one.
QStringList entries;
std::vector<TypeRef> entryTypes;
for (auto type : bv->GetTypes())
{
entries.push_back(QString::fromStdString(type.first.GetString()));
entryTypes.push_back(type.second);
}
auto choiceDialog = new MetadataChoiceDialog(parent, "Pick Type", entries);
// For our metadata, we'll just print the type definition. You could also have this callback return just a QString,
// but we want the type tokens to have syntax highlighting here.
std::function<std::vector<BinaryNinja::DisassemblyTextLine>(EntryItem item)> getMetadata =
[&](EntryItem item)
{
TypeRef type = entryTypes.at(item.idx);
std::vector<BinaryNinja::DisassemblyTextLine> metadata;
for (auto line : type->GetLines(data, entries.at(item.idx).toStdString()))
{
DisassemblyTextLine l;
l.tokens = line.tokens;
metadata.push_back(l);
}
return metadata;
};
choiceDialog->SetMetadataCallback(getMetadata);
// For our checkbox filter, we'll allow the user to filter out non-enum types.
std::function<bool(EntryItem item)> isEntryEnum =
[&](EntryItem item)
{
TypeRef type = entryTypes.at(item.idx);
return (type.second->IsEnumeration() || type.second->IsEnumReference());
};
choiceDialog->SetExtraFilter("Hide non-enums", isEntryEnum);
// For our second column, we'll show the width of the type.
std::function<QString(EntryItem item)> secondColumnText =
[&](EntryItem item)
{
TypeRef type = entryTypes.at(item.idx);
return "0x" + QString::number(type->GetWidth(), 16);
};
choiceDialog->SetSecondColumnTextCallback("Type Width", secondColumnText);
choiceDialog->exec();
if (choiceDialog->GetChosenEntry().has_value())
return entryTypes.at(choiceDialog->GetChosenEntry().value().idx);
else
return nullptr;
MetadataChoiceDialog(QWidget *parent, const QString &title, const QString &prompt, const QStringList &entries, std::unordered_map< size_t, QString > metadata)
Create a choice selection dialog with a Title, list of entries, and pre-built set of metadata for tho...
Definition: metadatachoicedialog.h:21
bool IsEnumeration() const
Check whether this type is an Enumeration type.
Definition: binaryninjaapi.h:8702
bool IsEnumReference()
If this Type is a NamedTypeReference, check whether it refers to an Enum Type.
Definition: binaryninjaapi.h:8638
std::vector< TypeDefinitionLine > GetLines(const TypeContainer &types, const std::string &name, int lineWidth=80, bool collapsed=false, BNTokenEscapingType escaping=NoTokenEscapingType)
Definition: type.cpp:1205
uint64_t GetWidth() const
Get the width in bytes of the Type.
Definition: type.cpp:554

AddContextButton and AddContextMenuItem can also be used for more complex UI behavior if required, and examples are provided for using those in their respective documentation. There are also several methods for adding or editing entries, evicting caches, and so on, if you need to modify the dialog's contents on the fly via a button or context menu item.

Public Slots

virtual void selectionChanged (std::optional< size_t > idx)
 
void accept () override
 
void reject () override
 

Public Member Functions

void AddWidthRequiredByItem (void *item, size_t widthRequired)
 
void RemoveWidthRequiredByItem (QWidget *item)
 
void AddHeightRequiredByItem (void *item, size_t widthRequired)
 
void RemoveHeightRequiredByItem (QWidget *item)
 
 MetadataChoiceDialog (QWidget *parent, const QString &title, const QString &prompt, const QStringList &entries, std::unordered_map< size_t, QString > metadata)
 Create a choice selection dialog with a Title, list of entries, and pre-built set of metadata for those entries. More...
 
 MetadataChoiceDialog (QWidget *parent, const QString &title, const QString &prompt, const QStringList &entries, std::unordered_map< size_t, std::vector< BinaryNinja::DisassemblyTextLine > > metadata)
 Create a choice selection dialog with a Title, list of entries, and pre-built set of metadata for those entries. More...
 
 MetadataChoiceDialog (QWidget *parent, const QString &title, const QString &prompt, const QStringList &entries)
 Create a choice selection dialog with a Title and list of entries. More...
 
 MetadataChoiceDialog (QWidget *parent, const QString &title, const QString &prompt="Select")
 
void SetMetadataCallback (const std::function< QString(EntryItem item)> &callback)
 Set the callback the dialog will execute to retrieve metadata for a given item. More...
 
void SetMetadataCallback (const std::function< std::vector< BinaryNinja::DisassemblyTextLine >(EntryItem item)> &callback)
 Set the callback the dialog will execute to retrieve metadata for a given item. More...
 
void AddColumn (QString columnTitle, const std::function< QString(EntryItem item)> &callback)
 Set the callback the dialog will execute to retrieve second column text for a given item. More...
 
void SetExtraFilter (QString filterTitle, const std::function< bool(EntryItem item)> callback)
 Set a callback for any optional extra conditions that entries must pass to be displayed. More...
 
void SetShouldCacheMetadata (bool s)
 Set whether metadata should be cached after calling the metadata callback once. More...
 
void SetShouldCacheExtraFilterResults (bool s)
 Set whether the entries that pass the extra filter should be cached. More...
 
std::optional< EntryItemGetChosenEntry () const
 Get the chosen entry. More...
 
void AddEntries (QStringList &entries)
 Add entries to the initial set. More...
 
void InvalidateAllCaches ()
 Clear all caches. More...
 
void AddContextButton (QWidget *button)
 Add a button (or other widget) to the right side of the search bar. More...
 
void AddContextMenuItem (QString title, const std::function< void(EntryItem item)>action)
 
void SelectFirstValidEntry ()
 
- Public Member Functions inherited from ManagedTableDelegate
virtual ~ManagedTableDelegate ()
 
virtual size_t ManagedTableColumnCount ()=0
 
virtual size_t ManagedTableRowCount ()=0
 
virtual QString ManagedTableColumnName (size_t)=0
 
virtual QString ManagedTableDisplayText (size_t row, size_t col)=0
 
virtual std::vector< std::pair< QString, std::function< void(EntryItem item)> > > GetTableContextMenuItems ()=0
 
virtual void ExecuteContextMenuItem (size_t menuItemIndex, size_t idx)=0
 
virtual std::vector< EntryItemGetAllItems () const =0
 
virtual bool EntryItemPassesExtraFilters (EntryItem &item)=0
 

Protected Member Functions

virtual size_t ManagedTableColumnCount () override
 
virtual size_t ManagedTableRowCount () override
 
virtual QString ManagedTableColumnName (size_t) override
 
virtual QString ManagedTableDisplayText (size_t row, size_t col) override
 
virtual std::vector< std::pair< QString, std::function< void(EntryItem item)> > > GetTableContextMenuItems () override
 
virtual void ExecuteContextMenuItem (size_t menuItemIndex, size_t idx) override
 
virtual bool EntryItemPassesExtraFilters (EntryItem &item) override
 
virtual std::vector< EntryItemGetAllItems () const override
 
virtual MetadataMode GetCurrentMode () override
 
virtual std::vector< BinaryNinja::DisassemblyTextLineLinesForEntryItem (EntryItem &item) override
 
virtual QString PlaintextForEntryItem (EntryItem &item) override
 
bool ExtraFilterEnabled ()
 
void UpdateMinimumSpace ()
 

Protected Attributes

std::vector< EntryItemm_entries
 
QHBoxLayout * m_midRowLayout
 
bool m_secondColumnCacheEnabled = true
 
std::vector< InfoColumnm_infoColumns
 
std::vector< std::pair< QString, std::function< void(EntryItem item)> > > m_contextMenuItems
 
ManagedTableViewm_entryListView
 
EntryItemMetadataViewm_metadataView
 
FilteredViewm_filterView
 
FilterEditm_edit
 
MetadataState m_metadata
 
QCheckBox * m_extraFilterCheckbox
 
ExtraFilterState m_extraFilter
 
QLabel * m_selectedText
 
QPushButton * m_cancel
 
QPushButton * m_choose
 
std::optional< EntryItemm_chosenEntry
 
std::optional< EntryItemm_selectedEntry
 

Constructor & Destructor Documentation

◆ MetadataChoiceDialog() [1/4]

MetadataChoiceDialog::MetadataChoiceDialog ( QWidget *  parent,
const QString &  title,
const QString &  prompt,
const QStringList &  entries,
std::unordered_map< size_t, QString >  metadata 
)

Create a choice selection dialog with a Title, list of entries, and pre-built set of metadata for those entries.

Note
For large amounts of entries, where computing the metadata for all of them may take a while, it is highly recommended that instead of passing prebuilt metadata, a callback that lazily loads it should be used instead
See also
SetMetadataCallback
Parameters
parentParent Widget
titleTitle of the dialog
promptText of the button to select a choice
entriesList of entries
metadataMap of indices to the metadata for those entries.

◆ MetadataChoiceDialog() [2/4]

MetadataChoiceDialog::MetadataChoiceDialog ( QWidget *  parent,
const QString &  title,
const QString &  prompt,
const QStringList &  entries,
std::unordered_map< size_t, std::vector< BinaryNinja::DisassemblyTextLine > >  metadata 
)

Create a choice selection dialog with a Title, list of entries, and pre-built set of metadata for those entries.

Note
For large amounts of entries, where computing the metadata for all of them may take a while, it is highly recommended that instead of passing prebuilt metadata, a callback that lazily loads it should be used instead
See also
SetMetadataCallback
Parameters
parentParent Widget
titleTitle of the dialog
promptText of the button to select a choice
entriesList of entries
metadataMap of indices to the metadata (as InstructionTextTokens) for those entries.

◆ MetadataChoiceDialog() [3/4]

MetadataChoiceDialog::MetadataChoiceDialog ( QWidget *  parent,
const QString &  title,
const QString &  prompt,
const QStringList &  entries 
)

Create a choice selection dialog with a Title and list of entries.

Note
Without setting a Metadata Callback, metadata will not be displayed for the entries in the view.
Parameters
parentParent Widget
titleTitle of the dialog
promptText of the button to select a choice
entriesList of entries

◆ MetadataChoiceDialog() [4/4]

MetadataChoiceDialog::MetadataChoiceDialog ( QWidget *  parent,
const QString &  title,
const QString &  prompt = "Select" 
)
inline

Member Function Documentation

◆ ManagedTableColumnCount()

virtual size_t MetadataChoiceDialog::ManagedTableColumnCount ( )
overrideprotectedvirtual

Implements ManagedTableDelegate.

◆ ManagedTableRowCount()

virtual size_t MetadataChoiceDialog::ManagedTableRowCount ( )
overrideprotectedvirtual

Implements ManagedTableDelegate.

◆ ManagedTableColumnName()

virtual QString MetadataChoiceDialog::ManagedTableColumnName ( size_t  )
overrideprotectedvirtual

Implements ManagedTableDelegate.

◆ ManagedTableDisplayText()

virtual QString MetadataChoiceDialog::ManagedTableDisplayText ( size_t  row,
size_t  col 
)
overrideprotectedvirtual

Implements ManagedTableDelegate.

◆ GetTableContextMenuItems()

virtual std::vector< std::pair< QString, std::function< void(EntryItem item)> > > MetadataChoiceDialog::GetTableContextMenuItems ( )
inlineoverrideprotectedvirtual

Implements ManagedTableDelegate.

◆ ExecuteContextMenuItem()

virtual void MetadataChoiceDialog::ExecuteContextMenuItem ( size_t  menuItemIndex,
size_t  idx 
)
overrideprotectedvirtual

Implements ManagedTableDelegate.

◆ EntryItemPassesExtraFilters()

virtual bool MetadataChoiceDialog::EntryItemPassesExtraFilters ( EntryItem item)
overrideprotectedvirtual

Implements ManagedTableDelegate.

◆ GetAllItems()

virtual std::vector< EntryItem > MetadataChoiceDialog::GetAllItems ( ) const
inlineoverrideprotectedvirtual

Implements ManagedTableDelegate.

◆ GetCurrentMode()

virtual MetadataMode MetadataChoiceDialog::GetCurrentMode ( )
inlineoverrideprotectedvirtual

◆ LinesForEntryItem()

virtual std::vector< BinaryNinja::DisassemblyTextLine > MetadataChoiceDialog::LinesForEntryItem ( EntryItem item)
overrideprotectedvirtual

◆ PlaintextForEntryItem()

virtual QString MetadataChoiceDialog::PlaintextForEntryItem ( EntryItem item)
overrideprotectedvirtual

◆ ExtraFilterEnabled()

bool MetadataChoiceDialog::ExtraFilterEnabled ( )
inlineprotected

◆ AddWidthRequiredByItem()

void MetadataChoiceDialog::AddWidthRequiredByItem ( void *  item,
size_t  widthRequired 
)

◆ RemoveWidthRequiredByItem()

void MetadataChoiceDialog::RemoveWidthRequiredByItem ( QWidget *  item)

◆ AddHeightRequiredByItem()

void MetadataChoiceDialog::AddHeightRequiredByItem ( void *  item,
size_t  widthRequired 
)

◆ RemoveHeightRequiredByItem()

void MetadataChoiceDialog::RemoveHeightRequiredByItem ( QWidget *  item)

◆ UpdateMinimumSpace()

void MetadataChoiceDialog::UpdateMinimumSpace ( )
protected

◆ SetMetadataCallback() [1/2]

void MetadataChoiceDialog::SetMetadataCallback ( const std::function< QString(EntryItem item)> &  callback)

Set the callback the dialog will execute to retrieve metadata for a given item.

Parameters
callbackNon nullable function (can be a lambda) that returns a QString containing metadata about the given EntryItem

◆ SetMetadataCallback() [2/2]

void MetadataChoiceDialog::SetMetadataCallback ( const std::function< std::vector< BinaryNinja::DisassemblyTextLine >(EntryItem item)> &  callback)

Set the callback the dialog will execute to retrieve metadata for a given item.

Parameters
callbackNon nullable function (can be a lambda) that returns a vector of DisassemblyTextLines.

◆ AddColumn()

void MetadataChoiceDialog::AddColumn ( QString  columnTitle,
const std::function< QString(EntryItem item)> &  callback 
)

Set the callback the dialog will execute to retrieve second column text for a given item.

auto choiceDialog = new MetadataChoiceDialog(parent, "Select Enum", entries);
// Set up everything else with dialog
// ...
uint64_t targetValue = 0x64;
std::function<QString(EntryItem item)> getSecondColumnText =
[&](EntryItem item)
{
TypeRef type = entryTypes.at(item.idx);
for (auto member : type->GetEnumeration()->GetMembers()) // Look for an enum member with a value of 0x64
if (member.value == targetValue)
return QString::fromStdString(member.name);
// If we cant find a member with a value of 0x64, just show 0x64 in the second column.
return "0x" + QString::number(canTruncate ? constrainedValue : constValue, 16);
};
choiceDialog->SetSecondColumnTextCallback("Enum Member Name", getSecondColumnText);
Ref< Enumeration > GetEnumeration() const
For Enumeration Types, the underlying Enumeration.
Definition: type.cpp:659
Parameters
secondColumnTitleTitle for the 2nd column
callbackNon nullable function (can be a lambda) that returns a QString containing optional second column text for the given index

◆ SetExtraFilter()

void MetadataChoiceDialog::SetExtraFilter ( QString  filterTitle,
const std::function< bool(EntryItem item)>  callback 
)

Set a callback for any optional extra conditions that entries must pass to be displayed.

The user will be able to toggle this filter via a checkbox.

Parameters
filterTitleTitle for the checkbox to toggle this filter condition.
callbackCallback function that checks whether a given entry index passes the extra filter.

◆ SetShouldCacheMetadata()

void MetadataChoiceDialog::SetShouldCacheMetadata ( bool  s)
inline

Set whether metadata should be cached after calling the metadata callback once.

By default this is enabled.

Parameters
sWhether to cache metadata.

◆ SetShouldCacheExtraFilterResults()

void MetadataChoiceDialog::SetShouldCacheExtraFilterResults ( bool  s)
inline

Set whether the entries that pass the extra filter should be cached.

By default this is enabled.

If the qualifications of the extra filter cannot change while this dialog is visible, this should be kept enabled.

Parameters
sWhether to cache extra filter results.

◆ GetChosenEntry()

std::optional< EntryItem > MetadataChoiceDialog::GetChosenEntry ( ) const
inline

Get the chosen entry.

Should be called after ->exec() has finished.

// Do all of the initial view setup (see top of this page for a full overview.)
choiceDialog->exec();
if (choiceDialog->GetChosenEntry().has_value())
{
// EntryItem contains a string (with the entry) and an index.
// But since we know the dialog maintains order of indices, we can skip string comparisons
// and just look it up by index.
return entryTypes.at(choiceDialog->GetChosenEntry().value().idx);
}
return nullptr;
Returns
The chosen entry, if one was chosen, or std::nullopt if selection was canceled.

◆ AddEntries()

void MetadataChoiceDialog::AddEntries ( QStringList &  entries)

Add entries to the initial set.

Note
Don't use this for initial setup; it should primarily be used for any updates made while the dialog is open (via a button or other means).
This will invalidate all caches, including any metadata initially passed in. If you need to add entries after opening the dialog and want metadata, you will need to use a callback.
Parameters
entriesList of entries to add.

◆ InvalidateAllCaches()

void MetadataChoiceDialog::InvalidateAllCaches ( )

Clear all caches.

Note
Calling AddEntries will also clear the caches.

◆ AddContextButton()

void MetadataChoiceDialog::AddContextButton ( QWidget *  button)

Add a button (or other widget) to the right side of the search bar.

You are responsible for the behavior of this widget.

Example:

// The icon we're using here is just the "add types" icon from the Types sidebar widget.
ClickableIcon* addIcon = new ClickableIcon(QImage(":/icons/images/add.png"), QSize(16, 16));
// This assumes we're not running within a class. If you are within another widget, use normal (icon, &method, this, &method2) syntax.
QObject::connect(addIcon, &ClickableIcon::clicked,
[&](){
// Do something interesting. Here we're just going to ask for a new entry.
std::string result;
GetTextLineInput(result, "Enter a new entry:", "Enter Entry");
// If you need to update your callbacks/info with the new entry, do so here, before you add it to the dialog.
// Add the entry to the choice dialog.
QStringList newEntries = { QString::fromStdString(result) };
choiceDialog->AddEntries(newEntries);
}
);
Definition: clickablelabel.h:65
bool GetTextLineInput(std::string &result, const std::string &prompt, const std::string &title)
Prompts the user to input a string with the given prompt and title.
Parameters
buttonWidget to add.

◆ AddContextMenuItem()

void MetadataChoiceDialog::AddContextMenuItem ( QString  title,
const std::function< void(EntryItem item)>  action 
)

◆ SelectFirstValidEntry()

void MetadataChoiceDialog::SelectFirstValidEntry ( )

◆ selectionChanged

virtual void MetadataChoiceDialog::selectionChanged ( std::optional< size_t >  idx)
virtualslot

◆ accept

void MetadataChoiceDialog::accept ( )
overrideslot

◆ reject

void MetadataChoiceDialog::reject ( )
overrideslot

Member Data Documentation

◆ m_entries

std::vector<EntryItem> MetadataChoiceDialog::m_entries
protected

◆ m_midRowLayout

QHBoxLayout* MetadataChoiceDialog::m_midRowLayout
protected

◆ m_secondColumnCacheEnabled

bool MetadataChoiceDialog::m_secondColumnCacheEnabled = true
protected

◆ m_infoColumns

std::vector<InfoColumn> MetadataChoiceDialog::m_infoColumns
protected

◆ m_contextMenuItems

std::vector<std::pair<QString, std::function<void(EntryItem item)> > > MetadataChoiceDialog::m_contextMenuItems
protected

◆ m_entryListView

ManagedTableView* MetadataChoiceDialog::m_entryListView
protected

◆ m_metadataView

EntryItemMetadataView* MetadataChoiceDialog::m_metadataView
protected

◆ m_filterView

FilteredView* MetadataChoiceDialog::m_filterView
protected

◆ m_edit

FilterEdit* MetadataChoiceDialog::m_edit
protected

◆ m_metadata

MetadataState MetadataChoiceDialog::m_metadata
protected

◆ m_extraFilterCheckbox

QCheckBox* MetadataChoiceDialog::m_extraFilterCheckbox
protected

◆ m_extraFilter

ExtraFilterState MetadataChoiceDialog::m_extraFilter
protected

◆ m_selectedText

QLabel* MetadataChoiceDialog::m_selectedText
protected

◆ m_cancel

QPushButton* MetadataChoiceDialog::m_cancel
protected

◆ m_choose

QPushButton* MetadataChoiceDialog::m_choose
protected

◆ m_chosenEntry

std::optional<EntryItem> MetadataChoiceDialog::m_chosenEntry
protected

◆ m_selectedEntry

std::optional<EntryItem> MetadataChoiceDialog::m_selectedEntry
protected

◆ MetadataChoiceDialog::ExtraFilterState

struct MetadataChoiceDialog::ExtraFilterState
Class Members
bool exists
bool enabled
bool cacheEnabled
QString title
unordered_map< size_t, bool > cache
function< bool(EntryItem item)> callback

◆ MetadataChoiceDialog::MetadataState

struct MetadataChoiceDialog::MetadataState
Class Members
bool exists
bool cacheEnabled
MetadataMode mode
unordered_map< size_t, QString > preloadedPlaintext
unordered_map< size_t, vector< DisassemblyTextLine > > preloadedTextLines
unordered_map< size_t, QString > plaintextCache
unordered_map< size_t, vector< DisassemblyTextLine > > disassemblyTextLineCache
function< QString(EntryItem item)> plaintextCallback
function< vector< DisassemblyTextLine >(EntryItem item)> disassemblyTextLineCallback

◆ MetadataChoiceDialog::InfoColumn

struct MetadataChoiceDialog::InfoColumn
Class Members
QString name
unordered_map< size_t, QString > textCache
function< QString(EntryItem &item)> textCallback