def _pageChanged(self, page): index = self.indexOf(page) self.countChanged[index] = False tab_label = str(self.tabLabel(page)) label_list = tab_label.split() found = False try: count = label_list[-1] try: found = count[0] == "(" except: pass else: try: found = count[-1] == ")" except: pass except: pass if found: orig_label = " ".join(label_list[0:-1]) else: orig_label = " ".join(label_list) self.emit(qt.PYSIGNAL("notebookPageChanged"), (orig_label, )) qt.qApp.emit(qt.PYSIGNAL('tab_changed'), (index, page)) tab_name = self.name() BlissWidget.updateTabWidget(tab_name, index)
def _pageChanged(self, page): index=self.indexOf(page) self.countChanged[index]=False tab_label=str(self.tabLabel(page)) label_list=tab_label.split() found=False try: count=label_list[-1] try: found=count[0]=="(" except: pass else: try: found=count[-1]==")" except: pass except: pass if found: orig_label=" ".join(label_list[0:-1]) else: orig_label=" ".join(label_list) self.emit(qt.PYSIGNAL("notebookPageChanged"), (orig_label, )) qt.qApp.emit(qt.PYSIGNAL('tab_changed'), (index, page)) tab_name=self.name() BlissWidget.updateTabWidget(tab_name,index)