79 raise ArgumentsError( |
79 raise ArgumentsError( |
80 "Too many arguments, max. {0:d} expected, got {1:d}".format( |
80 "Too many arguments, max. {0:d} expected, got {1:d}".format( |
81 7 + incr, len(args))) |
81 7 + incr, len(args))) |
82 |
82 |
83 parent = args[4 + incr] |
83 parent = args[4 + incr] |
84 QAction.__init__(self, parent) |
84 super().__init__(parent) |
85 name = args[5 + incr] |
85 name = args[5 + incr] |
86 if name: |
86 if name: |
87 self.setObjectName(name) |
87 self.setObjectName(name) |
88 |
88 |
89 if args[1 + incr]: |
89 if args[1 + incr]: |
136 """ |
136 """ |
137 Public slot to set the keyboard shortcut. |
137 Public slot to set the keyboard shortcut. |
138 |
138 |
139 @param shortcut the accelerator (QKeySequence) |
139 @param shortcut the accelerator (QKeySequence) |
140 """ |
140 """ |
141 QAction.setShortcut(self, shortcut) |
141 super().setShortcut(shortcut) |
142 self.__ammendToolTip() |
142 self.__ammendToolTip() |
143 |
143 |
144 def setShortcuts(self, shortcuts): |
144 def setShortcuts(self, shortcuts): |
145 """ |
145 """ |
146 Public slot to set the list of keyboard shortcuts. |
146 Public slot to set the list of keyboard shortcuts. |
147 |
147 |
148 @param shortcuts list of keyboard accelerators (list of QKeySequence) |
148 @param shortcuts list of keyboard accelerators (list of QKeySequence) |
149 or key for a platform dependent list of accelerators |
149 or key for a platform dependent list of accelerators |
150 (QKeySequence.StandardKey) |
150 (QKeySequence.StandardKey) |
151 """ |
151 """ |
152 QAction.setShortcuts(self, shortcuts) |
152 super().setShortcuts(shortcuts) |
153 self.__ammendToolTip() |
153 self.__ammendToolTip() |
154 |
154 |
155 def __ammendToolTip(self): |
155 def __ammendToolTip(self): |
156 """ |
156 """ |
157 Private slot to add the primary keyboard accelerator to the tooltip. |
157 Private slot to add the primary keyboard accelerator to the tooltip. |