def __init__(self, vw): self.vw = vw vw._viv_gui = self viv_base.VivEventDist.__init__(self, vw) vq_app.VQMainCmdWindow.__init__(self, 'Vivisect', vw) self.vqAddMenuField('&File.Save', self._menuFileSave) self.vqAddMenuField('&File.Save As', self._menuFileSaveAs) self.vqAddMenuField('&File.Save to Server', self._menuFileSaveServer) self.vqAddMenuField('&File.Quit', self.close) self.vqAddMenuField('&Edit.&Preferences', self._menuEditPrefs) self.vqAddMenuField('&View.&Exports', self._menuViewExports) self.vqAddMenuField('&View.&Functions', self._menuViewFunctions) self.vqAddMenuField('&View.&Imports', self._menuViewImports) self.vqAddMenuField('&View.&Names', self._menuViewNames) self.vqAddMenuField('&View.&Memory', self._menuViewMemory) self.vqAddMenuField('&View.&Function Graph', self._menuViewFuncGraph) self.vqAddMenuField('&View.&Strings', self._menuViewStrings) #self.vqAddMenuField('&View.&Strings', ACT(viv_q_views.getLocView, vw, (LOC_STRING,LOC_UNI) ,'Strings')) self.vqAddMenuField('&View.&Structures', self._menuViewStructs) self.vqAddMenuField('&View.&Segments', self._menuViewSegments) self.vqAddMenuField('&View.&Symboliks', self._menuViewSymboliks) self.vqAddMenuField('&View.&Layouts.&Save', self._menuViewLayoutsSave) self.vqAddMenuField('&View.&Layouts.&Load', self._menuViewLayoutsLoad) self.vqAddMenuField('&Share.Share Workspace', self._menuShareWorkspace) self.vqAddMenuField('&Share.Connect to Shared Workspace', self._menuShareConnect) self.vqAddMenuField('&Share.Connect To Workspace Server', self._menuShareConnectServer) self.vqAddMenuField('&Tools.&Python', self._menuToolsPython) self.vqAddMenuField('&Tools.&Debug', self._menuToolsDebug) self.vqAddMenuField('&Tools.&Structures.Add Namespace', self._menuToolsStructNames) self.vqAddMenuField('&Tools.&Structures.New', self._menuToolsUStructNew) self.vqAddDynMenu('&Tools.&Structures.&Edit', self._menuToolsUStructEdit) self.vqAddDynMenu('&Tools.&Va Sets', self._menuToolsVaSets) self.vqAddMenuField('&Window.&Fullscreen', self._menuWindowFullscreen) self.vqAddMenuField('&Window.&Maximized', self._menuWindowMaximize) self.vqAddMenuField('&Window.&Normal', self._menuWindowNormal) self.vw.vprint('Welcome to Vivisect (Qt Edition)!') self.vw.vprint('Random Tip: %s' % viv_q_tips.getRandomTip()) if len(self.vqGetDockWidgets()) == 0: self.vw.vprint('\n') self.vw.vprint('Looks like you have an empty layout!') self.vw.vprint( 'Use View->Layouts->Load and select vivisect/qt/default.lyt') fname = os.path.basename(self.vw.getMeta('StorageName', 'Unknown')) self.setWindowTitle('Vivisect: %s' % fname) self.windowState = QtCore.Qt.WindowNoState
def __init__(self, vw): self.vw = vw vw._viv_gui = self viv_base.VivEventDist.__init__(self, vw=vw) vq_app.VQMainCmdWindow.__init__(self, 'Vivisect', vw) self.vqAddMenuField('&File.Save', self._menuFileSave) self.vqAddMenuField('&File.Save As', self._menuFileSaveAs) self.vqAddMenuField('&File.Save to Server', self._menuFileSaveServer) self.vqAddMenuField('&File.Quit', self.close) self.vqAddMenuField('&Edit.&Preferences', self._menuEditPrefs) self.vqAddMenuField('&View.&Exports', self._menuViewExports) self.vqAddMenuField('&View.&Functions', self._menuViewFunctions) self.vqAddMenuField('&View.&Imports', self._menuViewImports) self.vqAddMenuField('&View.&Names', self._menuViewNames) self.vqAddMenuField('&View.&Memory', self._menuViewMemory) self.vqAddMenuField('&View.&Function Graph', self._menuViewFuncGraph) self.vqAddMenuField('&View.&Strings', self._menuViewStrings) #self.vqAddMenuField('&View.&Strings', ACT(viv_q_views.getLocView, vw, (LOC_STRING,LOC_UNI) ,'Strings')) self.vqAddMenuField('&View.&Structures', self._menuViewStructs) self.vqAddMenuField('&View.&Segments', self._menuViewSegments) self.vqAddMenuField('&View.&Symboliks', self._menuViewSymboliks) self.vqAddMenuField('&View.&Layouts.&Set Default', self._menuViewLayoutsSetDefault) self.vqAddMenuField('&View.&Layouts.&Save', self._menuViewLayoutsSave) self.vqAddMenuField('&View.&Layouts.&Load', self._menuViewLayoutsLoad) self.vqAddMenuField('&Share.Share Workspace', self._menuShareWorkspace) self.vqAddMenuField('&Share.Connect to Shared Workspace', self._menuShareConnect) self.vqAddMenuField('&Share.Connect To Workspace Server', self._menuShareConnectServer) self.vqAddMenuField('&Tools.&Python', self._menuToolsPython) self.vqAddMenuField('&Tools.&Debug', self._menuToolsDebug) self.vqAddMenuField('&Tools.&Structures.Add Namespace', self._menuToolsStructNames) self.vqAddMenuField('&Tools.&Structures.New', self._menuToolsUStructNew) self.vqAddDynMenu('&Tools.&Structures.&Edit', self._menuToolsUStructEdit) self.vqAddDynMenu('&Tools.&Va Sets', self._menuToolsVaSets) self.vqAddMenuField('&Window.&Fullscreen', self._menuWindowFullscreen) self.vqAddMenuField('&Window.&Maximized', self._menuWindowMaximize) self.vqAddMenuField('&Window.&Normal', self._menuWindowNormal) self.vw.vprint('Welcome to Vivisect (Qt Edition)!') self.vw.vprint('Random Tip: %s' % viv_q_tips.getRandomTip()) if len(self.vqGetDockWidgets()) == 0: self.vw.vprint('\n') self.vw.vprint('Looks like you have an empty layout!') self.vw.vprint('Use View->Layouts->Load and select vivisect/qt/default.lyt') fname = os.path.basename(self.vw.getMeta('StorageName', 'Unknown')) self.setWindowTitle('Vivisect: %s' % fname) self.windowState = QtCore.Qt.WindowNoState
def __init__(self, vw): self.vw = vw vw._viv_gui = self # DEV: hijack the workspace's vprint so that they get routed to the UI canvas # and not out to the stdout vw.vprint = self.vprint viv_base.VivEventDist.__init__(self, vw=vw) vq_app.VQMainCmdWindow.__init__(self, 'Vivisect', vw) self.vqAddMenuField('&File.Open', self._menuFileOpen) self.vqAddMenuField('&File.Save', self._menuFileSave) self.vqAddMenuField('&File.Save As', self._menuFileSaveAs) self.vqAddMenuField('&File.Save to Server', self._menuFileSaveServer) self.vqAddMenuField('&File.Quit', self.close) self.vqAddMenuField('&Edit.&Preferences', self._menuEditPrefs) self.vqAddMenuField('&View.&Exports', self._menuViewExports) self.vqAddMenuField('&View.&Functions', self._menuViewFunctions) self.vqAddMenuField('&View.&Imports', self._menuViewImports) self.vqAddMenuField('&View.&Names', self._menuViewNames) self.vqAddMenuField('&View.&Memory', self._menuViewMemory) self.vqAddMenuField('&View.&Function Graph', self._menuViewFuncGraph) self.vqAddMenuField('&View.&Strings', self._menuViewStrings) self.vqAddMenuField('&View.&Structures', self._menuViewStructs) self.vqAddMenuField('&View.&Segments', self._menuViewSegments) self.vqAddMenuField('&View.&Symboliks', self._menuViewSymboliks) self.vqAddMenuField('&View.&Layouts.&Set Default', self._menuViewLayoutsSetDefault) self.vqAddMenuField('&View.&Layouts.&Save', self._menuViewLayoutsSave) self.vqAddMenuField('&View.&Layouts.&Load', self._menuViewLayoutsLoad) self.vqAddMenuField('&Share.Share Workspace', self._menuShareWorkspace) self.vqAddMenuField('&Share.Connect to Shared Workspace', self._menuShareConnect) self.vqAddMenuField('&Share.Connect To Workspace Server', self._menuShareConnectServer) self.vqAddMenuField('&Tools.&Python', self._menuToolsPython) self.vqAddMenuField('&Tools.&Debug', self._menuToolsDebug) self.vqAddMenuField('&Tools.&Structures.Add Namespace', self._menuToolsStructNames) self.vqAddMenuField('&Tools.&Structures.New', self._menuToolsUStructNew) self.vqAddDynMenu('&Tools.&Structures.&Edit', self._menuToolsUStructEdit) self.vqAddDynMenu('&Tools.&Va Sets', self._menuToolsVaSets) self.vqAddMenuField('&Window.&Fullscreen', self._menuWindowFullscreen) self.vqAddMenuField('&Window.&Maximized', self._menuWindowMaximize) self.vqAddMenuField('&Window.&Normal', self._menuWindowNormal) self.vw.vprint('Welcome to Vivisect (Qt Edition)!') self.vw.vprint('Random Tip: %s' % viv_q_tips.getRandomTip()) if len(self.vqGetDockWidgets()) == 0: self.vw.vprint('\n') #self.vw.vprint(' ') self.vw.vprint('Looks like you have an empty layout!') self.vw.vprint('Use View->Layouts->Load and select vivisect/qt/default.lyt') fname = os.path.basename(self.vw.getMeta('StorageName', 'Unknown')) self.setWindowTitle('Vivisect: %s' % fname) self.windowState = QtCore.Qt.WindowNoState self.addHotKey('ctrl+o', 'file:open') self.addHotKeyTarget('file:open', self._menuFileOpen) self.addHotKey('ctrl+s', 'file:save') self.addHotKeyTarget('file:save', self._menuFileSave) self.addHotKey('ctrl+S', 'file:saveas') self.addHotKeyTarget('file:saveas', self._menuFileSaveAs) self.addHotKey('ctrl+meta+C', 'file:connecttoserver') self.addHotKeyTarget('file:connecttoserver', self._menuShareConnectServer) self.addHotKey('ctrl+w', 'file:quit') self.addHotKeyTarget('file:quit', self.close)