31 super().__init__(parent) |
31 super().__init__(parent) |
32 |
32 |
33 self.__mainWindow = None |
33 self.__mainWindow = None |
34 self.__ui = ui |
34 self.__ui = ui |
35 |
35 |
36 self.__toolBars = {} # maps toolbar IDs to actions |
36 self.__toolBars = {} |
37 self.__toolBarsWithSeparators = {} # maps toolbar IDs to actions incl. separators |
37 # maps toolbar IDs to actions |
38 self.__defaultToolBars = {} # maps default toolbar IDs to actions |
38 self.__toolBarsWithSeparators = {} |
39 self.__customToolBars = [] # list of custom toolbars |
39 # maps toolbar IDs to actions incl. separators |
40 self.__allToolBars = {} # maps toolbar IDs to toolbars |
40 self.__defaultToolBars = {} |
41 |
41 # maps default toolbar IDs to actions |
42 self.__categoryToActions = {} # maps categories to actions |
42 self.__customToolBars = [] |
43 self.__actionToCategory = {} # maps action IDs to categories |
43 # list of custom toolbars |
44 self.__allActions = {} # maps action IDs to actions |
44 self.__allToolBars = {} |
45 self.__actionToToolBars = {} # maps action IDs to toolbars |
45 # maps toolbar IDs to toolbars |
46 |
46 |
47 self.__widgetActions = {} # maps widget action IDs to toolbars |
47 self.__categoryToActions = {} |
48 self.__allWidgetActions = {} # maps widget action IDs to widget actions |
48 # maps categories to actions |
|
49 self.__actionToCategory = {} |
|
50 # maps action IDs to categories |
|
51 self.__allActions = {} |
|
52 # maps action IDs to actions |
|
53 self.__actionToToolBars = {} |
|
54 # maps action IDs to toolbars |
|
55 |
|
56 self.__widgetActions = {} |
|
57 # maps widget action IDs to toolbars |
|
58 self.__allWidgetActions = {} |
|
59 # maps widget action IDs to widget actions |
49 |
60 |
50 ###################################################### |
61 ###################################################### |
51 ## Private methods |
62 ## Private methods |
52 ###################################################### |
63 ###################################################### |
53 |
64 |
589 newActions = self.__toolBars[tbID][:] |
600 newActions = self.__toolBars[tbID][:] |
590 newActionsWithSeparators = self.__toolBarsWithSeparators[tbID][:] |
601 newActionsWithSeparators = self.__toolBarsWithSeparators[tbID][:] |
591 |
602 |
592 removedActions = [] |
603 removedActions = [] |
593 for action in actions[tbID]: |
604 for action in actions[tbID]: |
594 if action in newActions and self.toolBarWidgetAction(action) == toolBar: |
605 if action in newActions and \ |
|
606 self.toolBarWidgetAction(action) == toolBar: |
595 newActions.remove(action) |
607 newActions.remove(action) |
596 newActionsWithSeparators.remove(action) |
608 newActionsWithSeparators.remove(action) |
597 removedActions.append(action) |
609 removedActions.append(action) |
598 |
610 |
599 self.__toolBars[tbID] = newActions |
611 self.__toolBars[tbID] = newActions |