def t1(): app = QtGui.QApplication([]) QtCore.QResource.registerResource(wiz.get_resources()) w = wiz.SardanaBaseWizard() intro = wiz.SardanaIntroBasePage() tg_host_page = SelectTangoHostBasePage() w.addPage(intro) w.addPage(tg_host_page) w.show() sys.exit(app.exec_())
def t1(tg_host=None): SardanaExamplePages = Enumeration( 'SardanaExamplePages', ('IntroPage', 'TangoPage', 'SardanaPage')) class SardanaExampleIntroPage(wiz.SardanaIntroBasePage): def setNextPageId(self, id): self._nextPageId = id def nextId(self): return self._nextPageId from tango_host_page import SelectTangoHostBasePage class SelectTangoHostExamplePage(SelectTangoHostBasePage): def setNextPageId(self, id): self._nextPageId = id def nextId(self): return self._nextPageId app = QtGui.QApplication([]) QtCore.QResource.registerResource(wiz.get_resources()) w = wiz.SardanaBaseWizard() intro = SardanaExampleIntroPage() w.setPage(SardanaExamplePages.IntroPage, intro) curr_page = intro if tg_host is None: curr_page.setNextPageId(SardanaExamplePages.TangoPage) from tango_host_page import SelectTangoHostBasePage tg_host_page = SelectTangoHostBasePage() w.setPage(SardanaExamplePages.TangoPage, tg_host_page) curr_page = tg_host_page else: w['db'] = lambda: taurus.Database(tg_host) curr_page.setNextPageId(SardanaExamplePages.SardanaPage) sardana_page = SelectSardanaBasePage() w.setPage(SardanaExamplePages.SardanaPage, sardana_page) w.show() sys.exit(app.exec_())
def main(): app = QtGui.QApplication([]) QtCore.QResource.registerResource(wiz.get_resources()) sys.exit(app.exec_())