@@ -325,16 +325,6 @@ def __init__(self, parent=None):
325
325
self .optionsButton .setIconVisibleInMenu (True )
326
326
self .optionsButton .setToolTip (optionsBt )
327
327
self .optionsButton .setText (optionsBt )
328
- # Action menu for class
329
- actionClassBt = QCoreApplication .translate ("PythonConsole" , "Import Class" )
330
- self .actionClass = QAction (self )
331
- self .actionClass .setCheckable (False )
332
- self .actionClass .setEnabled (True )
333
- self .actionClass .setIcon (QgsApplication .getThemeIcon ("console/iconClassConsole.png" ))
334
- self .actionClass .setMenuRole (QAction .PreferencesRole )
335
- self .actionClass .setIconVisibleInMenu (True )
336
- self .actionClass .setToolTip (actionClassBt )
337
- self .actionClass .setText (actionClassBt )
338
328
# Action for Run script
339
329
runBt = QCoreApplication .translate ("PythonConsole" , "Run Command" )
340
330
self .runButton = QAction (self )
@@ -365,7 +355,6 @@ def __init__(self, parent=None):
365
355
self .toolBar .setMovable (False )
366
356
self .toolBar .setFloatable (False )
367
357
self .toolBar .addAction (self .clearButton )
368
- self .toolBar .addAction (self .actionClass )
369
358
self .toolBar .addAction (self .runButton )
370
359
self .toolBar .addSeparator ()
371
360
self .toolBar .addAction (self .showEditorButton )
@@ -400,28 +389,6 @@ def __init__(self, parent=None):
400
389
self .toolBarEditor .addSeparator ()
401
390
self .toolBarEditor .addAction (self .objectListButton )
402
391
403
- # Menu Import Class
404
- default_command = {
405
- (QCoreApplication .translate ("PythonConsole" , "Import Processing Class" ),
406
- QgsApplication .getThemeIcon ("console/iconProcessingConsole.png" )):
407
- ["import processing" ],
408
- (QCoreApplication .translate ("PythonConsole" , "Import PyQt.QtCore Class" ),
409
- QgsApplication .getThemeIcon ("console/iconQtCoreConsole.png" )):
410
- ["from qgis.PyQt.QtCore import *" ],
411
- (QCoreApplication .translate ("PythonConsole" , "Import PyQt.QtGui Class" ),
412
- QgsApplication .getThemeIcon ("console/iconQtGuiConsole.png" )):
413
- ["from qgis.PyQt.QtGui import *" , "from qgis.PyQt.QtWidgets import *" ]
414
- }
415
-
416
- self .classMenu = QMenu ()
417
- for (title , icon ), commands in list (default_command .items ()):
418
- action = self .classMenu .addAction (icon , title )
419
- action .triggered .connect (partial (self .shell .commandConsole , commands ))
420
-
421
- cM = self .toolBar .widgetForAction (self .actionClass )
422
- cM .setMenu (self .classMenu )
423
- cM .setPopupMode (QToolButton .InstantPopup )
424
-
425
392
self .widgetButton = QWidget ()
426
393
sizePolicy = QSizePolicy (QSizePolicy .Fixed , QSizePolicy .Preferred )
427
394
sizePolicy .setHorizontalStretch (0 )
0 commit comments