def testEventBrowser(self): logging.debug(self.__class__.__name__ + ': testRun()') self.app = Application(sys.argv) self.app.mainWindow().setWindowTitle("test EventBrowser") self.plugin = EventBrowserPlugin(self.app) self.plugin.startUp() self.tab = BrowserTab(self.app.mainWindow()) self.controller = EventBrowserTabController(self.plugin) self.controller.setDataAccessor(TestDataAccessor()) self.tab.setController(self.controller) self.app.mainWindow().addTab(self.tab) self.controller.updateContent() self.controller.updateViewMenu() if not hasattr(unittest, "NO_GUI_TEST"): self.app.run()
def _fillMenu(self): """ Fill specific menu. """ EventBrowserPlugin._fillMenu(self) self._filterBranchesAction = self.application().createAction('&Filter invalid branches', self._filterBranches, "Ctrl+Shift+F") self._filterBranchesAction.setCheckable(True) self._filterBranchesAction.setChecked(True) self._viewMenu.addAction(self._filterBranchesAction) self._hideUnderscorePropertiesAction = self.application().createAction('&Hide _underscore properties', self._hideUnderscoreProperties, "Ctrl+Shift+U") self._hideUnderscorePropertiesAction.setCheckable(True) self._hideUnderscorePropertiesAction.setChecked(True) self._viewMenu.addAction(self._hideUnderscorePropertiesAction) self._viewMenu.addSeparator() self._eventContentAction = self.application().createAction('&Browse event content...', self._eventContent, "Ctrl+Shift+C") self._viewMenu.addAction(self._eventContentAction) self._viewMenu.addSeparator()
def _fillMenu(self): """ Fill specific menu. """ EventBrowserPlugin._fillMenu(self) self._filterBranchesAction = self.application().createAction('&Filter invalid branches', self._filterBranches, "Ctrl+Shift+F") self._filterBranchesAction.setCheckable(True) self._filterBranchesAction.setChecked(True) self._viewMenu.addAction(self._filterBranchesAction) self._hideUnderscorePropertiesAction = self.application().createAction('&Hide _underscore properties', self._hideUnderscoreProperties, "Ctrl+Shift+U") self._hideUnderscorePropertiesAction.setCheckable(True) self._hideUnderscorePropertiesAction.setChecked(True) self._viewMenu.addAction(self._hideUnderscorePropertiesAction) self._viewMenu.addSeparator() self._eventContentAction = self.application().createAction('&Browse event content...', self._eventContent, "Ctrl+Shift+C") self._viewMenu.addAction(self._eventContentAction) self._viewMenu.addSeparator()
class EventBrowserTestCase(unittest.TestCase): def testEventBrowser(self): logging.debug(self.__class__.__name__ +': testRun()') self.app=Application(sys.argv) self.app.mainWindow().setWindowTitle("test EventBrowser") self.plugin=EventBrowserPlugin(self.app) self.plugin.startUp() self.tab = BrowserTab(self.app.mainWindow()) self.controller = EventBrowserTabController(self.plugin) self.controller.setDataAccessor(TestDataAccessor()) self.tab.setController(self.controller) self.app.mainWindow().addTab(self.tab) self.controller.updateContent() self.controller.updateViewMenu() if not hasattr(unittest,"NO_GUI_TEST"): self.app.run()
def startUp(self): EventBrowserPlugin.startUp(self) self.addCenterView(EdmBrowserBoxView) self.addCenterView(TableView)
def __init__(self, application=None, name=None): logging.debug(__name__ + ": __init__") EventBrowserPlugin.__init__(self, application) self.registerFiletypesFromTabController(EdmBrowserTabController)
def startUp(self): EventBrowserPlugin.startUp(self) self.addCenterView(EdmBrowserBoxView) self.addCenterView(TableView)
def __init__(self, application=None, name=None): logging.debug(__name__ + ": __init__") EventBrowserPlugin.__init__(self, application) self.registerFiletypesFromTabController(EdmBrowserTabController)