413 self.__categoryToActions[category] = [] |
413 self.__categoryToActions[category] = [] |
414 self.__categoryToActions[category].append(action) |
414 self.__categoryToActions[category].append(action) |
415 self.__actionToCategory[id(action)] = category |
415 self.__actionToCategory[id(action)] = category |
416 self.__actionToToolBars[id(action)] = [] |
416 self.__actionToToolBars[id(action)] = [] |
417 |
417 |
|
418 def addActions(self, actions, category): |
|
419 """ |
|
420 Public method to add actions to be managed. |
|
421 |
|
422 @param actions list of actions to be managed |
|
423 @type list of QAction |
|
424 @param category category for the toolbar |
|
425 @type str |
|
426 """ |
|
427 for action in actions: |
|
428 self.addAction(action, category) |
|
429 |
418 def removeAction(self, action): |
430 def removeAction(self, action): |
419 """ |
431 """ |
420 Public method to remove an action from the manager. |
432 Public method to remove an action from the manager. |
421 |
433 |
422 @param action reference to the action to be removed (QAction) |
434 @param action reference to the action to be removed (QAction) |