Python PyQt5.QtCore.QSortFilterProxyModel() Examples

The following are 17 code examples for showing how to use PyQt5.QtCore.QSortFilterProxyModel(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module PyQt5.QtCore , or try the search function .

Example 1
Project: DIE   Author: ynvb   File: ValueViewEx.py    License: MIT License 6 votes vote down vote up
def on_value_type_combobox_change(self, value_type):
        """
        Value type Combobox item changed slot.
        """
        if value_type == "All Values":
            if not self.valueTreeView.model() is self.valueModel:
                self.valueTreeView.setModel(self.valueModel)
            return

        valuetypeProxyModel = QtCore.QSortFilterProxyModel()
        valuetypeProxyModel.setFilterRole(DIE.UI.ValueType_Role)
        valuetypeProxyModel.setFilterRegExp(value_type)

        valuetypeProxyModel.setSourceModel(self.valueModel)
        self.valueTreeView.setModel(valuetypeProxyModel)


# Singelton 
Example 2
Project: DIE   Author: ynvb   File: FunctionViewEx.py    License: MIT License 6 votes vote down vote up
def on_thread_combobox_change(self, thread_id):

        self.reset_function_count(thread_id)  # reset function count according to currently selected thread
        if thread_id == "All Threads":
            if not self.functionTreeView.model() is self.functionModel:
                self.functionTreeView.setModel(self.functionModel)
            return

        hidden_threads = ".*" + self._make_thread_id_data(thread_id) + ".*"

        threadProxyModel = QtCore.QSortFilterProxyModel()
        threadProxyModel.setFilterRole(DIE.UI.ThreadId_Role)
        threadProxyModel.setFilterRegExp(hidden_threads)

        threadProxyModel.setSourceModel(self.functionModel)
        self.functionTreeView.setModel(threadProxyModel) 
Example 3
Project: Dwarf   Author: iGio90   File: list_view.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, parent=None, search_enabled=True):
        super(DwarfListView, self).__init__(parent=parent)

        self._search_enabled = search_enabled
        self._current_search = ''

        self._uppercase_hex = True

        _prefs = Prefs()
        self.rows_dualcolor = _prefs.get('dwarf_ui_alternaterowcolors', False)
        self.uppercase_hex = _prefs.get(
            'dwarf_ui_hexstyle', 'upper').lower() == 'upper'

        self.setEditTriggers(self.NoEditTriggers)
        self.setHeaderHidden(False)
        self.setAutoFillBackground(True)
        self.setRootIsDecorated(False)
        # TODO: use filter
        self._proxy_model = QSortFilterProxyModel(self)
        self._proxy_model.setSourceModel(self.model())
        # self.setSortingEnabled(True) 
Example 4
Project: dcc   Author: amimo   File: xrefwindow.py    License: Apache License 2.0 5 votes vote down vote up
def __init__(self, parent=None, win=None, xrefs=None, headers=None):
        super(XrefValueWindow, self).__init__(parent)
        self.parent = parent
        self.mainwin = win
        self.xrefs = xrefs
        self.headers = headers

        self.reverse_strings = {}

        self.proxyModel = QtCore.QSortFilterProxyModel()
        self.proxyModel.setDynamicSortFilter(True)

        self.model = QtGui.QStandardItemModel(len(self.xrefs),
                                              len(self.headers), self)

        column = 0
        for header in headers:
            self.model.setHeaderData(column, QtCore.Qt.Horizontal, header)
            column += 1

        row = 0
        for ref in xrefs:
            for column in range(len(self.headers)):
                self.model.setData(self.model.index(
                    row, column, QtCore.QModelIndex()), "%s" % ref[column])
            row += 1

        self.proxyModel.setSourceModel(self.model)

        self.setRootIsDecorated(False)
        self.setAlternatingRowColors(True)
        self.setModel(self.proxyModel)
        self.setSortingEnabled(True)
        self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)

        self.doubleClicked.connect(self.slotDoubleClicked) 
Example 5
Project: kite   Author: pyrocko   File: qt_utils.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, *args, **kwargs):
            QtCore.QSortFilterProxyModel.__init__(self, *args, **kwargs)
            self.setLevel(30) 
Example 6
Project: MARA_Framework   Author: xtiankisutsa   File: xrefwindow.py    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
def __init__(self, parent=None, win=None, xrefs=None, headers=None):
        super(XrefValueWindow, self).__init__(parent)
        self.parent = parent
        self.mainwin = win
        self.xrefs = xrefs
        self.headers = headers

        self.reverse_strings = {}

        self.proxyModel = QtCore.QSortFilterProxyModel()
        self.proxyModel.setDynamicSortFilter(True)

        self.model = QtGui.QStandardItemModel(len(self.xrefs),
                                              len(self.headers), self)

        column = 0
        for header in headers:
            self.model.setHeaderData(column, QtCore.Qt.Horizontal, header)
            column += 1

        row = 0
        for ref in xrefs:
            for column in range(len(self.headers)):
                self.model.setData(self.model.index(
                    row, column, QtCore.QModelIndex()), "%s" % ref[column])
            row += 1

        self.proxyModel.setSourceModel(self.model)

        self.setRootIsDecorated(False)
        self.setAlternatingRowColors(True)
        self.setModel(self.proxyModel)
        self.setSortingEnabled(True)
        self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)

        self.doubleClicked.connect(self.slotDoubleClicked) 
Example 7
Project: pandasgui   Author: adamerose   File: extended_combobox.py    License: MIT License 5 votes vote down vote up
def __init__(self, string_list, parent=None):
        super(ExtendedComboBox, self).__init__(parent)

        self.setFocusPolicy(Qt.StrongFocus)
        self.setEditable(True)

        # add a filter model to filter matching items
        self.pFilterModel = QSortFilterProxyModel(self)
        self.pFilterModel.setFilterCaseSensitivity(Qt.CaseInsensitive)
        self.pFilterModel.setSourceModel(self.model())

        # add a completer, which uses the filter model
        self.completer = QCompleter(self.pFilterModel, self)
        # always show all (filtered) completions
        self.completer.setCompletionMode(QCompleter.UnfilteredPopupCompletion)
        self.setCompleter(self.completer)

        # connect signals
        self.lineEdit().textEdited.connect(self.pFilterModel.setFilterFixedString)
        self.completer.activated.connect(self.on_completer_activated)

        # either fill the standard model of the combobox
        self.addItems(string_list)

        # or use another model
        # combo.setModel(QStringListModel(string_list))

    # on selection of an item from the completer, select the corresponding item from combobox 
Example 8
Project: pyblish-qml   Author: pyblish   File: tst_LogObjectMulti.py    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
def filterAcceptsRow(source_row, source_parent):
    """Exclude levels

    Overridden in order to exclude any log-record
    that isn't part of Control._levels

    """

    row = model.items[source_row]

    if not row["levelname"] in control._levels.split(";"):
        return False

    return QtCore.QSortFilterProxyModel.filterAcceptsRow(
        proxy, source_row, source_parent) 
Example 9
Project: dcc   Author: amimo   File: stringswindow.py    License: Apache License 2.0 4 votes vote down vote up
def __init__(self, parent=None, win=None, session=None):
        super(StringsValueWindow, self).__init__(parent)
        self.mainwin = win
        self.session = session
        self.title = "Strings"

        self.reverse_strings = {}

        self.proxyModel = QtCore.QSortFilterProxyModel()
        self.proxyModel.setDynamicSortFilter(True)

        self.model = QtGui.QStandardItemModel(self.session.get_nb_strings(), 4,
                                              self)

        self.model.setHeaderData(0, QtCore.Qt.Horizontal, "String")
        self.model.setHeaderData(1, QtCore.Qt.Horizontal, "Usage")
        self.model.setHeaderData(2, QtCore.Qt.Horizontal, "Filename")
        self.model.setHeaderData(3, QtCore.Qt.Horizontal, "Digest")

        row = 0
        for digest, filename, strings_analysis in self.session.get_strings():
            for string_value in strings_analysis:
                self.model.setData(self.model.index(
                    row, 0, QtCore.QModelIndex()), repr(strings_analysis[string_value].get_value()))
                self.model.setData(
                    self.model.index(row, 1, QtCore.QModelIndex()),
                    len(strings_analysis[string_value].get_xref_from()))
                self.model.setData(self.model.index(
                    row, 2, QtCore.QModelIndex()), filename)
                self.model.setData(self.model.index(
                    row, 3, QtCore.QModelIndex()), digest)
                self.reverse_strings[repr(strings_analysis[string_value].get_value()) + digest
                                     ] = strings_analysis[string_value]
                row += 1

        self.proxyModel.setSourceModel(self.model)

        self.setRootIsDecorated(False)
        self.setAlternatingRowColors(True)
        self.setModel(self.proxyModel)
        self.setSortingEnabled(True)
        self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)

        self.doubleClicked.connect(self.slotDoubleClicked) 
Example 10
Project: dcc   Author: amimo   File: resourceswindow.py    License: Apache License 2.0 4 votes vote down vote up
def __init__(self, parent=None, win=None, session=None):
        super(ResourcesValueWindow, self).__init__(parent)
        self.mainwin = win
        self.session = session
        self.title = "Resources"

        self.proxyModel = QtCore.QSortFilterProxyModel()
        self.proxyModel.setDynamicSortFilter(True)

        string_resources = []
        nb = 0
        for digest, apk in self.session.get_all_apks():
            a = apk[0]
            resources = a.get_android_resources()

            string_resources = resources.get_resolved_strings()
            for p in string_resources:
                for l in string_resources[p]:
                    nb += len(string_resources[p][l])

        self.model = QtGui.QStandardItemModel(nb, 4, self)

        self.model.setHeaderData(0, QtCore.Qt.Horizontal, "Package name")
        self.model.setHeaderData(1, QtCore.Qt.Horizontal, "Locale")
        self.model.setHeaderData(2, QtCore.Qt.Horizontal, "ID")
        self.model.setHeaderData(3, QtCore.Qt.Horizontal, "Value")

        row = 0
        for p_name in string_resources:
            for locale in string_resources[p_name]:
                for id_value in string_resources[p_name][locale]:
                    self.model.setData(self.model.index(
                        row, 0, QtCore.QModelIndex()), p_name)
                    self.model.setData(self.model.index(
                        row, 1, QtCore.QModelIndex()), str(locale))
                    self.model.setData(self.model.index(
                        row, 2, QtCore.QModelIndex()), str(id_value))
                    self.model.setData(self.model.index(
                        row, 3, QtCore.QModelIndex()),
                        string_resources[p_name][locale][id_value])
                    row += 1

        self.proxyModel.setSourceModel(self.model)
        self.proxyModel.setFilterKeyColumn(2)

        self.setRootIsDecorated(False)
        self.setAlternatingRowColors(True)
        self.setModel(self.proxyModel)
        self.setSortingEnabled(True)
        self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) 
Example 11
Project: dcc   Author: amimo   File: methodswindow.py    License: Apache License 2.0 4 votes vote down vote up
def __init__(self, parent=None, win=None, session=None):
        super(MethodsValueWindow, self).__init__(parent)
        self.mainwin = win
        self.session = session
        self.title = "Methods"

        self.reverse_methods = {}

        self.proxyModel = QtCore.QSortFilterProxyModel()
        self.proxyModel.setDynamicSortFilter(True)

        nb = 0
        for digest, d, dx in self.session.get_objects_dex():
            for method in d.get_methods():
                nb += 1

        self.model = QtGui.QStandardItemModel(nb, 5,
                                              self)

        self.model.setHeaderData(0, QtCore.Qt.Horizontal, "Name")
        self.model.setHeaderData(1, QtCore.Qt.Horizontal, "Class Name")
        self.model.setHeaderData(2, QtCore.Qt.Horizontal, "Prototype")
        self.model.setHeaderData(3, QtCore.Qt.Horizontal, "Address")
        self.model.setHeaderData(4, QtCore.Qt.Horizontal, "Digest")

        row = 0
        for digest, d, dx in self.session.get_objects_dex():
            for method in d.get_methods():
                self.model.setData(self.model.index(
                    row, 0, QtCore.QModelIndex()), method.get_name())
                self.model.setData(self.model.index(
                    row, 1, QtCore.QModelIndex()), method.get_class_name())
                self.model.setData(self.model.index(
                    row, 2, QtCore.QModelIndex()), method.get_descriptor())
                self.model.setData(self.model.index(
                    row, 3, QtCore.QModelIndex()), "0x%x" % method.get_address())
                self.model.setData(self.model.index(
                    row, 4, QtCore.QModelIndex()), digest)
                self.reverse_methods[method.get_name() + method.get_class_name() + method.get_descriptor() + digest
                                     ] = dx.get_method_analysis(method)
                row += 1

        self.proxyModel.setSourceModel(self.model)

        self.setRootIsDecorated(False)
        self.setAlternatingRowColors(True)
        self.setModel(self.proxyModel)
        self.setSortingEnabled(True)
        self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)

        self.doubleClicked.connect(self.slotDoubleClicked) 
Example 12
Project: dcc   Author: amimo   File: apiwindow.py    License: Apache License 2.0 4 votes vote down vote up
def __init__(self, parent=None, win=None, session=None):
        super(APIValueWindow, self).__init__(parent)
        self.mainwin = win
        self.session = session
        self.title = "API"

        self.reverse_methods = {}

        self.proxyModel = QtCore.QSortFilterProxyModel()
        self.proxyModel.setDynamicSortFilter(True)

        nb = 0
        for digest, d, dx in self.session.get_objects_dex():
            for external_class in dx.get_external_classes():
                nb += len(external_class.orig_class.methods)

        self.model = QtGui.QStandardItemModel(nb, 5,
                                              self)

        self.model.setHeaderData(0, QtCore.Qt.Horizontal, "Name")
        self.model.setHeaderData(1, QtCore.Qt.Horizontal, "Class Name")
        self.model.setHeaderData(2, QtCore.Qt.Horizontal, "Prototype")
        self.model.setHeaderData(3, QtCore.Qt.Horizontal, "Digest")

        row = 0
        for digest, d, dx in self.session.get_objects_dex():
            for external_class in dx.get_external_classes():
                for method in list(external_class.orig_class.methods.values()):
                    self.model.setData(self.model.index(
                        row, 0, QtCore.QModelIndex()), method.get_name())
                    self.model.setData(self.model.index(
                        row, 1, QtCore.QModelIndex()), method.get_class_name())
                    self.model.setData(self.model.index(
                        row, 2, QtCore.QModelIndex()), method.get_descriptor())
                    self.model.setData(self.model.index(
                        row, 3, QtCore.QModelIndex()), digest)
                    self.reverse_methods[method.get_name() + method.get_class_name() + method.get_descriptor()
                                         ] = dx.get_method_analysis(method)
                    row += 1

        self.proxyModel.setSourceModel(self.model)

        self.setRootIsDecorated(False)
        self.setAlternatingRowColors(True)
        self.setModel(self.proxyModel)
        self.setSortingEnabled(True)
        self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)

        self.doubleClicked.connect(self.slotDoubleClicked) 
Example 13
Project: CustomWidgets   Author: PyQt5   File: TestCFontIcon.py    License: GNU General Public License v3.0 4 votes vote down vote up
def __init__(self, statusBar, config, *args, **kwargs):
        super(FontViewWidget, self).__init__(*args, **kwargs)
        self.statusBar = statusBar
        layout = QVBoxLayout(self)
        self.retButton = QToolButton(self)
        self.retButton.setIconSize(QSize(60, 60))
        self.retButton.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)
        self.retButton.setMinimumSize(200, 100)
        self.retButton.setMaximumSize(200, 100)
        layout.addWidget(self.retButton)
        # 过滤输入框
        layout.addWidget(
            QLineEdit(self, textChanged=self.doFilter, placeholderText='过滤...'))
        # Material Font
        self.listView = QListView(self)
        self.listView.setMouseTracking(True)
        self.listView.setViewMode(QListView.IconMode)
        self.listView.setMovement(QListView.Static)
        self.listView.setFlow(QListView.LeftToRight)
        self.listView.setWrapping(True)
        self.listView.setEditTriggers(QListView.NoEditTriggers)
        self.listView.setResizeMode(QListView.Adjust)
        self.listView.doubleClicked.connect(self.onDoubleClicked)
        self.listView.entered.connect(self.onEntered)
        self.dmodel = QStandardItemModel(self.listView)
        self.fmodel = QSortFilterProxyModel(self.listView)
        self.fmodel.setSourceModel(self.dmodel)
        self.fmodel.setFilterRole(Qt.ToolTipRole)
        self.listView.setModel(self.fmodel)
        layout.addWidget(self.listView)

        # 字体加载器
        loader = config[0]

        # 添加Item
        fontMap = json.loads(open(config[1], 'rb').read().decode(
            encoding='utf_8', errors='ignore'), encoding='utf_8')
        for name, _ in fontMap.items():
            item = QStandardItem(loader.icon(name), '')
            item.setData(name, Qt.ToolTipRole)
            item.setData(name, Qt.StatusTipRole)
            item.setTextAlignment(Qt.AlignCenter)
            item.setFlags(item.flags())
            self.dmodel.appendRow(item) 
Example 14
Project: MARA_Framework   Author: xtiankisutsa   File: stringswindow.py    License: GNU Lesser General Public License v3.0 4 votes vote down vote up
def __init__(self, parent=None, win=None, session=None):
        super(StringsValueWindow, self).__init__(parent)
        self.mainwin = win
        self.session = session
        self.title = "Strings"

        self.reverse_strings = {}

        self.proxyModel = QtCore.QSortFilterProxyModel()
        self.proxyModel.setDynamicSortFilter(True)

        self.model = QtGui.QStandardItemModel(self.session.get_nb_strings(), 4,
                                              self)

        self.model.setHeaderData(0, QtCore.Qt.Horizontal, "String")
        self.model.setHeaderData(1, QtCore.Qt.Horizontal, "Usage")
        self.model.setHeaderData(2, QtCore.Qt.Horizontal, "Filename")
        self.model.setHeaderData(3, QtCore.Qt.Horizontal, "Digest")

        row = 0
        for digest, filename, strings_analysis in self.session.get_strings():
            for string_value in strings_analysis:
                self.model.setData(self.model.index(
                    row, 0, QtCore.QModelIndex()), repr(strings_analysis[string_value].get_value()))
                self.model.setData(
                    self.model.index(row, 1, QtCore.QModelIndex()),
                    len(strings_analysis[string_value].get_xref_from()))
                self.model.setData(self.model.index(
                    row, 2, QtCore.QModelIndex()), filename)
                self.model.setData(self.model.index(
                    row, 3, QtCore.QModelIndex()), digest)
                self.reverse_strings[repr(strings_analysis[string_value].get_value()) + digest
                                    ] = strings_analysis[string_value]
                row += 1

        self.proxyModel.setSourceModel(self.model)

        self.setRootIsDecorated(False)
        self.setAlternatingRowColors(True)
        self.setModel(self.proxyModel)
        self.setSortingEnabled(True)
        self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)

        self.doubleClicked.connect(self.slotDoubleClicked) 
Example 15
Project: MARA_Framework   Author: xtiankisutsa   File: resourceswindow.py    License: GNU Lesser General Public License v3.0 4 votes vote down vote up
def __init__(self, parent=None, win=None, session=None):
        super(ResourcesValueWindow, self).__init__(parent)
        self.mainwin = win
        self.session = session
        self.title = "Resources"

        self.proxyModel = QtCore.QSortFilterProxyModel()
        self.proxyModel.setDynamicSortFilter(True)

        string_resources = None
        for digest, apk in self.session.get_all_apks():
            a = apk[0]
            resources = a.get_android_resources()

            string_resources = resources.get_resolved_strings()
            nb = 0
            for p in string_resources:
                for l in string_resources[p]:
                    nb += len(string_resources[p][l])

        self.model = QtGui.QStandardItemModel(nb, 4,
                                              self)

        self.model.setHeaderData(0, QtCore.Qt.Horizontal, "Package name")
        self.model.setHeaderData(1, QtCore.Qt.Horizontal, "Locale")
        self.model.setHeaderData(2, QtCore.Qt.Horizontal, "ID")
        self.model.setHeaderData(3, QtCore.Qt.Horizontal, "Value")

        row = 0
        for p_name in string_resources:
            for locale in string_resources[p_name]:
                for id_value in string_resources[p_name][locale]:
                    self.model.setData(self.model.index(
                        row, 0, QtCore.QModelIndex()), p_name)
                    self.model.setData(self.model.index(
                        row, 1, QtCore.QModelIndex()), str(locale))
                    self.model.setData(self.model.index(
                        row, 2, QtCore.QModelIndex()), str(id_value))
                    self.model.setData(self.model.index(
                        row, 3, QtCore.QModelIndex()),
                        string_resources[p_name][locale][id_value])
                    row += 1

        self.proxyModel.setSourceModel(self.model)
        self.proxyModel.setFilterKeyColumn(2)

        self.setRootIsDecorated(False)
        self.setAlternatingRowColors(True)
        self.setModel(self.proxyModel)
        self.setSortingEnabled(True)
        self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) 
Example 16
Project: MARA_Framework   Author: xtiankisutsa   File: methodswindow.py    License: GNU Lesser General Public License v3.0 4 votes vote down vote up
def __init__(self, parent=None, win=None, session=None):
        super(MethodsValueWindow, self).__init__(parent)
        self.mainwin = win
        self.session = session
        self.title = "Methods"

        self.reverse_methods = {}

        self.proxyModel = QtCore.QSortFilterProxyModel()
        self.proxyModel.setDynamicSortFilter(True)

        nb = 0
        for digest, d, dx in self.session.get_objects_dex():
            for method in d.get_methods():
                nb += 1

        self.model = QtGui.QStandardItemModel(nb, 5,
                                              self)

        self.model.setHeaderData(0, QtCore.Qt.Horizontal, "Name")
        self.model.setHeaderData(1, QtCore.Qt.Horizontal, "Class Name")
        self.model.setHeaderData(2, QtCore.Qt.Horizontal, "Prototype")
        self.model.setHeaderData(3, QtCore.Qt.Horizontal, "Address")
        self.model.setHeaderData(4, QtCore.Qt.Horizontal, "Digest")

        row = 0
        for digest, d, dx in self.session.get_objects_dex():
            for method in d.get_methods():
                self.model.setData(self.model.index(
                    row, 0, QtCore.QModelIndex()), method.get_name())
                self.model.setData(self.model.index(
                    row, 1, QtCore.QModelIndex()), method.get_class_name())
                self.model.setData(self.model.index(
                    row, 2, QtCore.QModelIndex()), method.get_descriptor())
                self.model.setData(self.model.index(
                    row, 3, QtCore.QModelIndex()), "0x%x" % method.get_address())
                self.model.setData(self.model.index(
                    row, 4, QtCore.QModelIndex()), digest)
                self.reverse_methods[method.get_name() + method.get_class_name() + method.get_descriptor() + digest
                                    ] = dx.get_method_analysis(method)
                row += 1

        self.proxyModel.setSourceModel(self.model)

        self.setRootIsDecorated(False)
        self.setAlternatingRowColors(True)
        self.setModel(self.proxyModel)
        self.setSortingEnabled(True)
        self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)

        self.doubleClicked.connect(self.slotDoubleClicked) 
Example 17
Project: MARA_Framework   Author: xtiankisutsa   File: apiwindow.py    License: GNU Lesser General Public License v3.0 4 votes vote down vote up
def __init__(self, parent=None, win=None, session=None):
        super(APIValueWindow, self).__init__(parent)
        self.mainwin = win
        self.session = session
        self.title = "API"

        self.reverse_methods = {}

        self.proxyModel = QtCore.QSortFilterProxyModel()
        self.proxyModel.setDynamicSortFilter(True)

        nb = 0
        for digest, d, dx in self.session.get_objects_dex():
            for external_class in dx.get_external_classes():
                nb += len(external_class.orig_class.methods)

        self.model = QtGui.QStandardItemModel(nb, 5,
                                              self)

        self.model.setHeaderData(0, QtCore.Qt.Horizontal, "Name")
        self.model.setHeaderData(1, QtCore.Qt.Horizontal, "Class Name")
        self.model.setHeaderData(2, QtCore.Qt.Horizontal, "Prototype")
        self.model.setHeaderData(3, QtCore.Qt.Horizontal, "Digest")

        row = 0
        for digest, d, dx in self.session.get_objects_dex():
            for external_class in dx.get_external_classes():
                for method in external_class.orig_class.methods.values():
                    self.model.setData(self.model.index(
                        row, 0, QtCore.QModelIndex()), method.get_name())
                    self.model.setData(self.model.index(
                        row, 1, QtCore.QModelIndex()), method.get_class_name())
                    self.model.setData(self.model.index(
                        row, 2, QtCore.QModelIndex()), method.get_descriptor())
                    self.model.setData(self.model.index(
                        row, 3, QtCore.QModelIndex()), digest)
                    self.reverse_methods[method.get_name() + method.get_class_name() + method.get_descriptor()
                                        ] = dx.get_method_analysis(method)
                    row += 1

        self.proxyModel.setSourceModel(self.model)

        self.setRootIsDecorated(False)
        self.setAlternatingRowColors(True)
        self.setModel(self.proxyModel)
        self.setSortingEnabled(True)
        self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)

        self.doubleClicked.connect(self.slotDoubleClicked)