(self, pos)
ExportsList ContextMenu
ExportsList ContextMenu
ExportsList ContextMenu
def _on_exports_contextmenu(self, pos):
        """ ExportsList ContextMenu
        """
        index = self.exports_list.indexAt(pos).row()
        if index != -1:
            context_menu = QMenu(self)
            func_name = self.exports_model.item(index, 0).text()
            addr = self.exports_model.item(index, 1).text()
            context_menu.addAction(
                'Add Breakpoint', lambda: self._add_breakpoint(addr, func_name))
            context_menu.addSeparator()
            context_menu.addAction(
                'Copy address', lambda: utils.copy_hex_to_clipboard(
                    self.exports_model.item(index, 1).text()))
            context_menu.addSeparator()
            context_menu.addAction(
                'Copy FunctionName', lambda: utils.copy_str_to_clipboard(
                    func_name))

            if self.exports_list.search_enabled:
                context_menu.addSeparator()
                context_menu.addAction(
                    'Search', self.exports_list._on_cm_search)

            # show contextmenu
            glbl_pt = self.exports_list.mapToGlobal(pos)
            context_menu.exec_(glbl_pt)
def _on_exports_contextmenu ( self , pos ) : index = self . exports_list . indexAt ( pos ) . row ( ) if index != - 1 : context_menu = QMenu ( self ) func_name = self . exports_model . item ( index , 0 ) . text ( ) addr = self . exports_model . item ( index , 1 ) . text ( ) context_menu . addAction ( 'Add Breakpoint' , lambda : self . _add_breakpoint ( addr , func_name ) ) context_menu . addSeparator ( ) context_menu . addAction ( 'Copy address' , lambda : utils . copy_hex_to_clipboard ( self . exports_model . item ( index , 1 ) . text ( ) ) ) context_menu . addSeparator ( ) context_menu . addAction ( 'Copy FunctionName' , lambda : utils . copy_str_to_clipboard ( func_name ) ) if self . exports_list . search_enabled : context_menu . addSeparator ( ) context_menu . addAction ( 'Search' , self . exports_list . _on_cm_search ) # show contextmenu glbl_pt = self . exports_list . mapToGlobal ( pos ) context_menu . exec_ ( glbl_pt )