def newWidget(self, app_init=True):
     main_win = QMainWindow()
     w = InputFileEditorPlugin()
     main_win.setCentralWidget(w)
     main_win.show()
     w.initialize()
     app_info = ExecutableInfo()
     if app_init:
         app_info.setPath(Testing.find_moose_test_exe())
         self.assertTrue(app_info.valid())
     menubar = main_win.menuBar()
     menubar.setNativeMenuBar(False)
     menu = menubar.addMenu("Input File")
     w.addToMenu(menu)
     w.clearRecentlyUsed()
     self.checkMenus(w, False)
     main_win.show()
     w.executableInfoChanged(app_info)
     w.blockChanged.connect(self.blockChanged)
     return main_win, w
示例#2
0
 def newWidget(self, app_init=True):
     main_win = QMainWindow()
     w = InputFileEditorPlugin()
     main_win.setCentralWidget(w)
     main_win.show()
     app_info = ExecutableInfo()
     if app_init:
         app_info.setPath(Testing.find_moose_test_exe())
         self.assertTrue(app_info.valid())
     menubar = main_win.menuBar()
     menubar.setNativeMenuBar(False)
     menu = menubar.addMenu("Input File")
     w.addToMenu(menu)
     w.clearRecentlyUsed()
     self.checkMenus(w, False)
     main_win.show()
     w.executableInfoChanged(app_info)
     w.blockChanged.connect(self.blockChanged)
     return main_win, w