def init_font_config(self): self.disasm_font = QFont("DejaVu Sans Mono", 10) font_metrics = QFontMetricsF(self.disasm_font) self.disasm_font_height = font_metrics.height() self.disasm_font_width = font_metrics.width('A') self.disasm_font_ascent = font_metrics.ascent() self.symexec_font = QFont("DejaVu Sans Mono", 10) font_metrics = QFontMetricsF(self.symexec_font) self.symexec_font_height = font_metrics.height() self.symexec_font_width = font_metrics.width('A') self.symexec_font_ascent = font_metrics.ascent()
def __init__(self, main_window): self._main_window = main_window self._instance = None self.views_by_category = defaultdict(list) self.views = [] self.dockable_views = [] self.view_to_dockable = {} # # Some generic configurations. move to "configurations" module later # #self.disasm_font = QFont("courier new", 20) self.disasm_font = QFont("DejaVu Sans Mono", 10) font_metrics = QFontMetricsF(self.disasm_font) self.disasm_font_height = font_metrics.height() self.disasm_font_width = font_metrics.width('A') self.disasm_font_ascent = font_metrics.ascent() default_tabs = [ FunctionsView(self, 'left'), DisassemblyView(self, 'right'), SymexecView(self, 'right'), StatesView(self, 'right'), StringsView(self, 'right'), ConsoleView(self, 'bottom'), ] for tab in default_tabs: self.add_view(tab, tab.caption, tab.category)