Changeset View
Changeset View
Standalone View
Standalone View
plugins/python/scripter/ui_scripter/actions/newaction/newaction.py
Context not available. | |||||
29 | self.triggered.connect(self.new) | 29 | self.triggered.connect(self.new) | ||
---|---|---|---|---|---|
30 | 30 | | |||
31 | self.setText('New') | 31 | self.setText('New') | ||
32 | self.setIcon(Krita.instance().icon("document-new")) | ||||
32 | self.setObjectName('new') | 33 | self.setObjectName('new') | ||
33 | self.setShortcut(QKeySequence(Qt.CTRL + Qt.Key_N)) | 34 | self.setShortcut(QKeySequence(Qt.CTRL + Qt.Key_N)) | ||
34 | 35 | | |||
35 | @property | 36 | @property | ||
36 | def parent(self): | 37 | def parent(self): | ||
37 | return 'File' | 38 | return 'File' | ||
39 | | ||||
40 | def doAfterLoadAction(self): | ||||
41 | # add it to the main toolbar as well | ||||
42 | print("adding the new file button to the action toolbar") | ||||
43 | self.scripter.uicontroller.actionToolbar.addAction(self) | ||||
38 | 44 | | |||
39 | def new(self): | 45 | def new(self): | ||
40 | msgBox = QMessageBox(self.scripter.uicontroller.mainWidget) | 46 | msgBox = QMessageBox(self.scripter.uicontroller.mainWidget) | ||
Context not available. |