ProjectBrowser Class Reference

Public Member Functions

 ProjectBrowser (QWidget *parent, ProjectRef project)
 
 ~ProjectBrowser ()
 
ProjectRef GetProject () const
 
- Public Member Functions inherited from UIContextNotification
virtual ~UIContextNotification ()
 
virtual void OnContextOpen (UIContext *context)
 Callback after a UIContext is opened (eg MainWindow) More...
 
virtual void OnContextClose (UIContext *context)
 Callback right before closing a UIContext. More...
 
virtual bool OnBeforeOpenDatabase (UIContext *context, FileMetadataRef metadata)
 Callback before a database (specifically a database, not a raw file) is opened. More...
 
virtual bool OnAfterOpenDatabase (UIContext *context, FileMetadataRef metadata, BinaryViewRef data)
 Callback after a database (specifically a database, not a raw file) is opened. More...
 
virtual void OnAfterOpenProject (UIContext *context, ProjectRef project)
 Callback after a project is opened. More...
 
virtual bool OnBeforeOpenProjectFile (UIContext *context, ProjectFileRef projectFile)
 Callback before a project file is opened. More...
 
virtual void OnAfterOpenProjectFile (UIContext *context, ProjectFileRef projectFile, ViewFrame *frame)
 Callback after a project file is opened. More...
 
virtual bool OnBeforeOpenFile (UIContext *context, FileContext *file)
 Callback before a file (raw or database) is opened (after OnAfterOpenDatabase if opening a database) More...
 
virtual void OnAfterOpenFile (UIContext *context, FileContext *file, ViewFrame *frame)
 Callback after a file (raw or database) is opened. More...
 
virtual bool OnBeforeSaveFile (UIContext *context, FileContext *file, ViewFrame *frame)
 Callback before a file is saved (either as a database or raw) More...
 
virtual void OnAfterSaveFile (UIContext *context, FileContext *file, ViewFrame *frame)
 Callback after a file is saved (either as a database or raw) More...
 
virtual bool OnBeforeCloseFile (UIContext *context, FileContext *file, ViewFrame *frame)
 Callback before a file is closed. More...
 
virtual void OnAfterCloseFile (UIContext *context, FileContext *file, ViewFrame *frame)
 Callback after a file is closed. More...
 
virtual void OnViewReplaced (UIContext *context, FileContext *file, ViewFrame *oldFrame, ViewFrame *newFrame)
 Callback after a ViewFrame is replaced in an open file (e.g. More...
 
virtual void OnDataViewReplaced (UIContext *context, FileContext *file, BinaryViewRef oldData, BinaryViewRef newData)
 Callback after a BinaryView is replaced in an open file (e.g. More...
 
virtual void OnViewChange (UIContext *context, ViewFrame *frame, const QString &type)
 Callback when the ui changes views. More...
 
virtual void OnAddressChange (UIContext *context, ViewFrame *frame, View *view, const ViewLocation &location)
 Callback when the ui changes address. More...
 
virtual bool GetNameForFile (UIContext *context, FileContext *file, QString &name)
 Callback to modify the displayed file name for a FileContext (eg in the window title or tab title) Note: Due to the out param &name, this is not usable from Python with PySide. More...
 
virtual bool GetNameForPath (UIContext *context, const QString &path, QString &name)
 Callback to modify the displayed file name for a file path (eg in the new tab widget) Note: Due to the out param &name, this is not usable from Python with PySide. More...
 
virtual void OnNewSelectionForXref (UIContext *context, ViewFrame *frame, View *view, const SelectionInfoForXref &selection)
 Callback when the ui changes selection and should update cross references. More...
 
virtual void OnActionExecuted (UIContext *context, UIActionHandler *handler, const QString &name, const UIActionContext &ctx, std::function< void(const UIActionContext &)> &action)
 Callback when an action is executed, allowing plugins to intercept and modify the behavior of the action. More...
 
- Public Member Functions inherited from BinaryNinja::ProjectNotification
 ProjectNotification ()
 
virtual ~ProjectNotification ()
 
BNProjectNotificationGetCallbacks ()
 
virtual bool OnBeforeOpenProject (Project *project)
 
virtual void OnAfterOpenProject (Project *project)
 
virtual bool OnBeforeCloseProject (Project *project)
 
virtual void OnAfterCloseProject (Project *project)
 
virtual bool OnBeforeProjectMetadataWritten (Project *project, std::string &key, Metadata *value)
 
virtual void OnAfterProjectMetadataWritten (Project *project, std::string &key, Metadata *value)
 
virtual bool OnBeforeProjectFileCreated (Project *project, ProjectFile *projectFile)
 
virtual void OnAfterProjectFileCreated (Project *project, ProjectFile *projectFile)
 
virtual bool OnBeforeProjectFileUpdated (Project *project, ProjectFile *projectFile)
 
virtual void OnAfterProjectFileUpdated (Project *project, ProjectFile *projectFile)
 
virtual bool OnBeforeProjectFileDeleted (Project *project, ProjectFile *projectFile)
 
virtual void OnAfterProjectFileDeleted (Project *project, ProjectFile *projectFile)
 
virtual bool OnBeforeProjectFolderCreated (Project *project, ProjectFolder *projectFolder)
 
virtual void OnAfterProjectFolderCreated (Project *project, ProjectFolder *projectFolder)
 
virtual bool OnBeforeProjectFolderUpdated (Project *project, ProjectFolder *projectFolder)
 
virtual void OnAfterProjectFolderUpdated (Project *project, ProjectFolder *projectFolder)
 
virtual bool OnBeforeProjectFolderDeleted (Project *project, ProjectFolder *projectFolder)
 
virtual void OnAfterProjectFolderDeleted (Project *project, ProjectFolder *projectFolder)
 

Static Public Member Functions

static void registerActions ()
 

Protected Member Functions

void SelectItems (std::vector< ProjectFileRef > files, std::vector< ProjectFolderRef > folders)
 
void SelectItemsById (std::vector< std::string > fileIds, std::vector< std::string > folderIds)
 
void PromptImportFile (ProjectFolderRef folder=nullptr)
 
void PromptImportFolder (ProjectFolderRef parent=nullptr)
 
void MakeNewFolder (ProjectFolderRef parent=nullptr)
 
void PromptDeleteSelected ()
 
void PromptOpenSelected (bool withOptions=false)
 
void PromptExportSelected ()
 
void PromptAnalyzeSelected ()
 
void PromptEditProjectDetails ()
 
void Refresh ()
 

Constructor & Destructor Documentation

◆ ProjectBrowser()

ProjectBrowser::ProjectBrowser ( QWidget *  parent,
ProjectRef  project 
)

◆ ~ProjectBrowser()

ProjectBrowser::~ProjectBrowser ( )

Member Function Documentation

◆ SelectItems()

void ProjectBrowser::SelectItems ( std::vector< ProjectFileRef files,
std::vector< ProjectFolderRef folders 
)
protected

◆ SelectItemsById()

void ProjectBrowser::SelectItemsById ( std::vector< std::string >  fileIds,
std::vector< std::string >  folderIds 
)
protected

◆ PromptImportFile()

void ProjectBrowser::PromptImportFile ( ProjectFolderRef  folder = nullptr)
protected

◆ PromptImportFolder()

void ProjectBrowser::PromptImportFolder ( ProjectFolderRef  parent = nullptr)
protected

◆ MakeNewFolder()

void ProjectBrowser::MakeNewFolder ( ProjectFolderRef  parent = nullptr)
protected

◆ PromptDeleteSelected()

void ProjectBrowser::PromptDeleteSelected ( )
protected

◆ PromptOpenSelected()

void ProjectBrowser::PromptOpenSelected ( bool  withOptions = false)
protected

◆ PromptExportSelected()

void ProjectBrowser::PromptExportSelected ( )
protected

◆ PromptAnalyzeSelected()

void ProjectBrowser::PromptAnalyzeSelected ( )
protected

◆ PromptEditProjectDetails()

void ProjectBrowser::PromptEditProjectDetails ( )
protected

◆ Refresh()

void ProjectBrowser::Refresh ( )
protected

◆ GetProject()

ProjectRef ProjectBrowser::GetProject ( ) const
inline

◆ registerActions()

static void ProjectBrowser::registerActions ( )
static