E5Gui/E5ToolBarManager.py

changeset 1112
8a7d1b9d18db
parent 945
8cd4d08fa9f6
child 1131
7781e396c903
equal deleted inserted replaced
1109:9552b5e16a07 1112:8a7d1b9d18db
5 5
6 """ 6 """
7 Module implementing a toolbar manager class. 7 Module implementing a toolbar manager class.
8 """ 8 """
9 9
10 from PyQt4.QtCore import * 10 from PyQt4.QtCore import QObject, QByteArray, QDataStream, QIODevice
11 from PyQt4.QtGui import * 11 from PyQt4.QtGui import QToolBar
12 12
13 13
14 class E5ToolBarManager(QObject): 14 class E5ToolBarManager(QObject):
15 """ 15 """
16 Class implementing a toolbar manager. 16 Class implementing a toolbar manager.
229 self.__widgetActions[id(action)] = None 229 self.__widgetActions[id(action)] = None
230 toolBar.removeAction(action) 230 toolBar.removeAction(action)
231 if action.isSeparator(): 231 if action.isSeparator():
232 del action 232 del action
233 else: 233 else:
234 self.__actionToToolBars[id(action)].remove(toolBar) 234 self.__actionToToolBars[id(action)].remove(toolBar) # __IGNORE_WARNING__
235 235
236 # step 3: set the actions as requested 236 # step 3: set the actions as requested
237 newActionsWithSeparators = [] 237 newActionsWithSeparators = []
238 for action in newActions: 238 for action in newActions:
239 newAction = None 239 newAction = None
259 """ 259 """
260 Public method to reset a toolbar to it's default state. 260 Public method to reset a toolbar to it's default state.
261 261
262 @param toolBar reference to the toolbar to configure (QToolBar) 262 @param toolBar reference to the toolbar to configure (QToolBar)
263 """ 263 """
264 if not isDefaultToolBar(): 264 if not self.isDefaultToolBar():
265 return 265 return
266 self.setToolBar(toolBar, self.__defaultToolBars[id(toolBar)]) 266 self.setToolBar(toolBar, self.__defaultToolBars[id(toolBar)])
267 267
268 def resetAllToolBars(self): 268 def resetAllToolBars(self):
269 """ 269 """

eric ide

mercurial