Exemplo n.º 1
0
    def _handle_results_item_activated(self, itemIndex):
        emptyLayout(self._ui.queryResultsViewLayout)
        item = self._query_model.itemFromIndex(itemIndex).data()

        if isinstance(item, Key):
            buf = self._ctx.object_resolver.get_object(item)
            self._save_buffer = buf
            hv = HexViewWidget(buf, self._ui.queryResultsViewFrame)
            self._ui.queryResultsViewLayout.addWidget(hv)

        elif isinstance(item, ClassDefinitionItem):
            v = ClassDefinitionItemView(item, self._ui.queryResultsViewFrame)
            self._save_buffer = item.data
            self._ui.queryResultsViewLayout.addWidget(v)

        elif isinstance(item, ClassInstanceItem):
            v = ClassInstanceItemView(item, self._ui.queryResultsViewFrame)
            self._save_buffer = item.data
            self._ui.queryResultsViewLayout.addWidget(v)

        elif isinstance(item, NamespaceItem):
            l = QLabel(self._ui.queryResultsViewFrame)
            l.setText("Don't know how to display namespaces yet")
            self.w("dont know how to display namespaces")
            self._ui.queryResultsViewLayout.addWidget(l)
Exemplo n.º 2
0
    def __init__(self, page_item, parent=None):
        super(LogicalIndexPageItemView, self).__init__(parent)
        self._page_item = page_item

        vv = VstructViewWidget(get_parsers(), self._page_item.structs, self._page_item.data)
        self.addTab(vv, "Structures")

        hv = HexViewWidget(self._page_item.data)
        self.addTab(hv, "Hex view")
Exemplo n.º 3
0
    def __init__(self, node_item, parent=None):
        super(IndexNodeItemView, self).__init__(parent)
        self._node_item = node_item

        # TODO: hack get_parsers() until we have a unified repo/config
        vv = VstructViewWidget(get_parsers(), self._node_item.structs, self._node_item.data)
        self.addTab(vv, "Structures")

        hv = HexViewWidget(self._node_item.data)
        self.addTab(hv, "Hex view")
Exemplo n.º 4
0
    def __init__(self, cd_item, parent=None):
        super(ClassDefinitionItemView, self).__init__(parent)
        self._cd_item = cd_item

        try:
            txt = dump_layout(cd_item.cd, cd_item.cl)
        except:
            txt = traceback.format_exc()
        self.addTab(FixedWidthTextView(txt), "Class details")

        # TODO: hack get_parsers() until we have a unified repo/config
        vv = VstructViewWidget(get_parsers(), self._cd_item.structs, self._cd_item.data)
        self.addTab(vv, "Structures")

        hv = HexViewWidget(self._cd_item.data)
        self.addTab(hv, "Hex view")
Exemplo n.º 5
0
 def __init__(self, page_item, parent=None):
     super(PhysicalDataPageItemView, self).__init__(parent)
     self._page_item = page_item
     hv = HexViewWidget(self._page_item.data)
     self.addTab(hv, "Hex view")
Exemplo n.º 6
0
 def __init__(self, key_item, parent=None):
     super(IndexKeyItemView, self).__init__(parent)
     self._key_item = key_item
     if self._key_item.is_data_reference:
         hv = HexViewWidget(self._key_item.data)
         self.addTab(hv, "Target hex view")