E5Gui/E5ToolBarManager.py

branch
Py2 comp.
changeset 2791
a9577f248f04
parent 2525
8b507a9a2d40
parent 2763
e4794166ad70
child 3057
10516539f238
equal deleted inserted replaced
2790:6686a3326df8 2791:a9577f248f04
53 ## Private methods 53 ## Private methods
54 ###################################################### 54 ######################################################
55 55
56 def __toolBarByName(self, name): 56 def __toolBarByName(self, name):
57 """ 57 """
58 Private slot to get a toolbar by it's object name. 58 Private slot to get a toolbar by its object name.
59 59
60 @param name object name of the toolbar (string) 60 @param name object name of the toolbar (string)
61 @return reference to the toolbar (QToolBar) 61 @return reference to the toolbar (QToolBar)
62 """ 62 """
63 for toolBar in list(self.__allToolBars.values()): 63 for toolBar in list(self.__allToolBars.values()):
259 self.__toolBars[tbID] = newActions 259 self.__toolBars[tbID] = newActions
260 self.__toolBarsWithSeparators[tbID] = newActionsWithSeparators 260 self.__toolBarsWithSeparators[tbID] = newActionsWithSeparators
261 261
262 def resetToolBar(self, toolBar): 262 def resetToolBar(self, toolBar):
263 """ 263 """
264 Public method to reset a toolbar to it's default state. 264 Public method to reset a toolbar to its default state.
265 265
266 @param toolBar reference to the toolbar to configure (QToolBar) 266 @param toolBar reference to the toolbar to configure (QToolBar)
267 """ 267 """
268 if not self.isDefaultToolBar(): 268 if not self.isDefaultToolBar():
269 return 269 return
634 634
635 return self.__categoryToActions[category][:] 635 return self.__categoryToActions[category][:]
636 636
637 def actionById(self, aID): 637 def actionById(self, aID):
638 """ 638 """
639 Public method to get an action given it's id. 639 Public method to get an action given its id.
640 640
641 @param aID id of the action object (integer) 641 @param aID id of the action object (integer)
642 @return reference to the action (QAction) 642 @return reference to the action (QAction)
643 """ 643 """
644 if aID not in self.__allActions: 644 if aID not in self.__allActions:
645 return None 645 return None
646 return self.__allActions[aID] 646 return self.__allActions[aID]
647 647
648 def toolBarById(self, tbID): 648 def toolBarById(self, tbID):
649 """ 649 """
650 Public method to get a toolbar given it's id. 650 Public method to get a toolbar given its id.
651 651
652 @param tbID id of the toolbar object (integer) 652 @param tbID id of the toolbar object (integer)
653 @return reference to the toolbar (QToolBar) 653 @return reference to the toolbar (QToolBar)
654 """ 654 """
655 if tbID not in self.__allToolBars: 655 if tbID not in self.__allToolBars:
656 return None 656 return None
657 return self.__allToolBars[tbID] 657 return self.__allToolBars[tbID]
658 658
659 def toolBarActions(self, tbID): 659 def toolBarActions(self, tbID):
660 """ 660 """
661 Public method to get a toolbar's actions given it's id. 661 Public method to get a toolbar's actions given its id.
662 662
663 @param tbID id of the toolbar object (integer) 663 @param tbID id of the toolbar object (integer)
664 @return list of actions (list of QAction) 664 @return list of actions (list of QAction)
665 """ 665 """
666 if tbID not in self.__toolBars: 666 if tbID not in self.__toolBars:
676 """ 676 """
677 return self.__toolBars 677 return self.__toolBars
678 678
679 def defaultToolBarActions(self, tbID): 679 def defaultToolBarActions(self, tbID):
680 """ 680 """
681 Public method to get a default toolbar's actions given it's id. 681 Public method to get a default toolbar's actions given its id.
682 682
683 @param tbID id of the default toolbar object (integer) 683 @param tbID id of the default toolbar object (integer)
684 @return list of actions (list of QAction) 684 @return list of actions (list of QAction)
685 """ 685 """
686 if tbID not in self.__defaultToolBars: 686 if tbID not in self.__defaultToolBars:

eric ide

mercurial