40
40
QgsCustomDropHandler )
41
41
from qgis .PyQt .QtCore import Qt , QCoreApplication , QDir , QFileInfo
42
42
from qgis .PyQt .QtWidgets import QMenu , QAction
43
- from qgis .PyQt .QtGui import QIcon
43
+ from qgis .PyQt .QtGui import QIcon , QKeySequence
44
44
45
45
from processing .core .Processing import Processing
46
46
from processing .gui .AlgorithmDialog import AlgorithmDialog
@@ -189,7 +189,8 @@ def initGui(self):
189
189
self .toolboxAction .setObjectName ('toolboxAction' )
190
190
self .toolboxAction .setIcon (
191
191
QgsApplication .getThemeIcon ("/processingAlgorithm.svg" ))
192
- self .iface .registerMainWindowAction (self .toolboxAction , 'Ctrl+Alt+T' )
192
+ self .iface .registerMainWindowAction (self .toolboxAction ,
193
+ QKeySequence ('Ctrl+Alt+T' ).toString (QKeySequence .NativeText ))
193
194
self .toolboxAction .toggled .connect (self .openToolbox )
194
195
self .iface .attributesToolBar ().insertAction (self .iface .actionOpenStatisticalSummary (), self .toolboxAction )
195
196
self .menu .addAction (self .toolboxAction )
@@ -199,23 +200,27 @@ def initGui(self):
199
200
self .tr ('Graphical &Modeler...' ), self .iface .mainWindow ())
200
201
self .modelerAction .setObjectName ('modelerAction' )
201
202
self .modelerAction .triggered .connect (self .openModeler )
202
- self .iface .registerMainWindowAction (self .modelerAction , 'Ctrl+Alt+M' )
203
+ self .iface .registerMainWindowAction (self .modelerAction ,
204
+ QKeySequence ('Ctrl+Alt+M' ).toString (QKeySequence .NativeText ))
203
205
self .menu .addAction (self .modelerAction )
204
206
205
207
self .historyAction = QAction (
206
208
QIcon (os .path .join (pluginPath , 'images' , 'history.svg' )),
207
209
self .tr ('&History...' ), self .iface .mainWindow ())
208
210
self .historyAction .setObjectName ('historyAction' )
209
211
self .historyAction .triggered .connect (self .openHistory )
210
- self .iface .registerMainWindowAction (self .historyAction , 'Ctrl+Alt+H' )
212
+ self .iface .registerMainWindowAction (self .historyAction ,
213
+ QKeySequence ('Ctrl+Alt+H' ).toString (QKeySequence .NativeText ))
211
214
self .menu .addAction (self .historyAction )
212
215
self .toolbox .processingToolbar .addAction (self .historyAction )
213
216
214
217
self .resultsAction = QAction (
215
218
QgsApplication .getThemeIcon ("/processingResult.svg" ),
216
219
self .tr ('&Results Viewer' ), self .iface .mainWindow ())
217
220
self .resultsAction .setCheckable (True )
218
- self .iface .registerMainWindowAction (self .resultsAction , 'Ctrl+Alt+R' )
221
+ self .iface .registerMainWindowAction (self .resultsAction ,
222
+ QKeySequence ('Ctrl+Alt+R' ).toString (QKeySequence .NativeText ))
223
+
219
224
self .menu .addAction (self .resultsAction )
220
225
self .toolbox .processingToolbar .addAction (self .resultsAction )
221
226
self .resultsDock .visibilityChanged .connect (self .resultsAction .setChecked )
0 commit comments