class NetworkWizard(NetworkCommonWizard): def __init__(self, interface, parent=None): NetworkCommonWizard.__init__(self, parent) self.editor = NetFrame(interface) self.interface_page = InterfacePage() self._setPage(0, self.interface_page) self.net_page = NetPage(self.editor) self._setPage(1, self.net_page) self.connect(self.interface_page, SIGNAL('changed'), self.editor.setInterface) if interface is not None: self.setStartId(1) #Todo: find a way to allow going back self.interface_page.setInterface(interface) else: self.interface_page.propagate() self.connect(self, SIGNAL('accepted()'), self._done) def getNet(self): return self.editor.getNet() def getInterface(self): return self.interface_page.interface() def _done(self, *args): self.emit(SIGNAL('done'), self) QNetObject.getInstance().post_modify()
def __init__(self, interface, parent=None): NetworkCommonWizard.__init__(self, parent) self.editor = NetFrame(interface) self.interface_page = InterfacePage() self._setPage(0, self.interface_page) self.net_page = NetPage(self.editor) self._setPage(1, self.net_page) self.connect(self.interface_page, SIGNAL('changed'), self.editor.setInterface) if interface is not None: self.setStartId(1) #Todo: find a way to allow going back self.interface_page.setInterface(interface) else: self.interface_page.propagate() self.connect(self, SIGNAL('accepted()'), self._done)