@@ -65,41 +65,40 @@ def initGui(self):
65
65
self .menu = QMenu (self .iface .mainWindow ())
66
66
self .menu .setTitle (QCoreApplication .translate ("SEXTANTE" , "Analysis" ))
67
67
68
- self .toolboxAction = QAction (QIcon (":/sextante/images/toolbox.png" ),
69
- QCoreApplication .translate ("SEXTANTE" , "&SEXTANTE toolbox" ),
70
- self .iface .mainWindow ())
71
- QObject .connect (self .toolboxAction , SIGNAL ("triggered()" ), self .openToolbox )
68
+ self .toolboxAction = self .toolbox .toggleViewAction ()
69
+ self .toolboxAction .setIcon (QIcon (":/sextante/images/toolbox.png" ))
70
+ self .toolboxAction .setText (QCoreApplication .translate ("SEXTANTE" , "&SEXTANTE toolbox" ))
72
71
self .menu .addAction (self .toolboxAction )
73
72
74
73
self .modelerAction = QAction (QIcon (":/sextante/images/model.png" ),
75
74
QCoreApplication .translate ("SEXTANTE" , "&SEXTANTE modeler" ),
76
75
self .iface .mainWindow ())
77
- QObject . connect ( self .modelerAction , SIGNAL ( " triggered()" ), self .openModeler )
76
+ self .modelerAction . triggered . connect ( self .openModeler )
78
77
self .menu .addAction (self .modelerAction )
79
78
80
79
self .historyAction = QAction (QIcon (":/sextante/images/history.gif" ),
81
80
QCoreApplication .translate ("SEXTANTE" , "&SEXTANTE history and log" ),
82
81
self .iface .mainWindow ())
83
- QObject . connect ( self .historyAction , SIGNAL ( " triggered()" ), self .openHistory )
82
+ self .historyAction . triggered . connect ( self .openHistory )
84
83
self .menu .addAction (self .historyAction )
85
84
86
85
self .configAction = QAction (QIcon (":/sextante/images/config.png" ),
87
86
QCoreApplication .translate ("SEXTANTE" , "&SEXTANTE options and configuration" ),
88
87
self .iface .mainWindow ())
89
- QObject . connect ( self .configAction , SIGNAL ( " triggered()" ), self .openConfig )
88
+ self .configAction . triggered . connect ( self .openConfig )
90
89
self .menu .addAction (self .configAction )
91
90
92
91
self .resultsAction = QAction (QIcon (":/sextante/images/results.png" ),
93
92
QCoreApplication .translate ("SEXTANTE" , "&SEXTANTE results viewer" ),
94
93
self .iface .mainWindow ())
95
- QObject . connect ( self .resultsAction , SIGNAL ( " triggered()" ), self .openResults )
94
+ self .resultsAction . triggered . connect ( self .openResults )
96
95
self .menu .addAction (self .resultsAction )
97
96
98
97
#=======================================================================
99
98
# self.helpAction = QAction(QIcon(":/sextante/images/help.png"),
100
99
# QCoreApplication.translate("SEXTANTE", "&SEXTANTE help"),
101
100
# self.iface.mainWindow())
102
- # QObject.connect( self.helpAction, SIGNAL(" triggered()"), self.openHelp)
101
+ # self.helpAction. triggered.connect( self.openHelp)
103
102
# self.menu.addAction(self.helpAction)
104
103
#=======================================================================
105
104
0 commit comments