Tools/TRPreviewer.py

changeset 7
c679fb30c8f3
parent 0
de9c2efb9d02
child 8
0ae9bd4d2993
equal deleted inserted replaced
6:52e8c820d0dd 7:c679fb30c8f3
824 @param windowMenu reference to the window menu 824 @param windowMenu reference to the window menu
825 """ 825 """
826 idx = 0 826 idx = 0
827 for wid in self.widgets: 827 for wid in self.widgets:
828 act = windowMenu.addAction(wid.windowTitle()) 828 act = windowMenu.addAction(wid.windowTitle())
829 act.setData(QVariant(idx)) 829 act.setData(idx)
830 act.setCheckable(True) 830 act.setCheckable(True)
831 act.setChecked(not wid.isHidden()) 831 act.setChecked(not wid.isHidden())
832 idx = idx + 1 832 idx = idx + 1
833 833
834 def toggleSelectedWidget(self, act): 834 def toggleSelectedWidget(self, act):
835 """ 835 """
836 Public method to handle the toggle of a window. 836 Public method to handle the toggle of a window.
837 837
838 @param act reference to the action that triggered (QAction) 838 @param act reference to the action that triggered (QAction)
839 """ 839 """
840 idx, ok = act.data().toInt() 840 idx, ok = act.data()
841 if ok: 841 if ok:
842 self.__toggleWidget(self.widgets[idx]) 842 self.__toggleWidget(self.widgets[idx])
843 843
844 def __toggleWidget(self, w): 844 def __toggleWidget(self, w):
845 """ 845 """

eric ide

mercurial