| 20 | self.close() |
| 21 | |
| 22 | def createActions(self): |
| 23 | self.openAct = QtGui.QAction(QtGui.QIcon(':/images/open.png'), |
| 24 | "&Open...", self, shortcut=QtGui.QKeySequence.StandardKey.Open, |
| 25 | statusTip="Open an existing file", triggered=self.open) |
| 26 | |
| 27 | self.saveAct = QtGui.QAction(QtGui.QIcon(':/images/save.png'), |
| 28 | "&Save", self, shortcut=QtGui.QKeySequence.StandardKey.Save, |
| 29 | statusTip="Save the document to disk", triggered=self.save) |
| 30 | |
| 31 | self.saveAsAct = QtGui.QAction("Save &As...", self, |
| 32 | shortcut=QtGui.QKeySequence.StandardKey.SaveAs, |
| 33 | statusTip="Save the document under a new name", triggered=self.saveAs) |
| 34 | |
| 35 | self.saveReadable = QtGui.QAction("Save as &Readable...", self, |
| 36 | statusTip="Save in a readable format", triggered=self.saveToReadableFile) |
| 37 | |
| 38 | self.exitAct = QtGui.QAction("E&xit", self, shortcut="Ctrl+Q", |
| 39 | statusTip="Exit the application", triggered=self.close) |
| 40 | |
| 41 | self.undoAct = QtGui.QAction(QtGui.QIcon(':/images/undo.png'), |
| 42 | "&Undo", self, shortcut=QtGui.QKeySequence.StandardKey.Undo, triggered=self.hexEdit.undo) |
| 43 | |
| 44 | self.redoAct = QtGui.QAction(QtGui.QIcon(':/images/redo.png'), |
| 45 | "&Redo", self, shortcut=QtGui.QKeySequence.StandardKey.Redo, triggered=self.hexEdit.redo) |
| 46 | |
| 47 | self.saveSelectionReadable = QtGui.QAction("Save Selection Readable...", self, |
| 48 | statusTip="Save selection in a readable format", |
| 49 | triggered=self.saveSelectionToReadableFile) |
| 50 | |
| 51 | self.aboutAct = QtGui.QAction("&About", self, |
| 52 | statusTip="Show the application's About box", triggered=self.about) |
| 53 | |
| 54 | def createMenus(self): |
| 55 | self.fileMenu = self.menuBar().addMenu("&File") |