25
25
26
26
from PyQt4 .QtCore import *
27
27
from PyQt4 .QtGui import *
28
- from PyQt4 import QtCore , QtGui
28
+
29
+ import codecs
30
+ import pickle
31
+
32
+ from sextante .core .SextanteUtils import SextanteUtils
33
+
34
+ from sextante .gui .HelpEditionDialog import HelpEditionDialog
35
+ from sextante .gui .ParametersDialog import ParametersDialog
36
+
29
37
from sextante .modeler .ModelerParameterDefinitionDialog import ModelerParameterDefinitionDialog
30
38
from sextante .modeler .ModelerAlgorithm import ModelerAlgorithm
31
39
from sextante .modeler .ModelerParametersDialog import ModelerParametersDialog
32
40
from sextante .modeler .ModelerUtils import ModelerUtils
33
41
from sextante .modeler .WrongModelException import WrongModelException
34
42
from sextante .modeler .ModelerScene import ModelerScene
35
43
from sextante .modeler .Providers import Providers
36
- from sextante .gui .HelpEditionDialog import HelpEditionDialog
37
- import pickle
38
- from sextante .gui .ParametersDialog import ParametersDialog
39
- from sextante .core .SextanteUtils import SextanteUtils
40
- import codecs
41
44
42
- class ModelerDialog (QtGui .QDialog ):
45
+ from sextante .ui .ui_DlgModeler import Ui_DlgModeler
46
+
47
+ class ModelerDialog (QDialog , Ui_DlgModeler ):
43
48
def __init__ (self , alg = None ):
44
- QtGui .QDialog .__init__ (self )
45
- self .setupUi ()
46
- self .setWindowFlags (self .windowFlags () | QtCore .Qt .WindowSystemMenuHint |
47
- QtCore .Qt .WindowMinMaxButtonsHint )
49
+ QDialog .__init__ (self )
50
+
51
+ self .setupUi (self )
52
+
53
+ self .setWindowFlags (self .windowFlags () | Qt .WindowSystemMenuHint |
54
+ Qt .WindowMinMaxButtonsHint )
55
+
56
+ self .tabWidget .setCurrentIndex (0 )
57
+
58
+ self .scene = ModelerScene (self )
59
+ self .scene .setSceneRect (QRectF (0 , 0 , 4000 , 4000 ))
60
+ self .view .setScene (self .scene )
61
+ self .view .ensureVisible (0 , 0 , 10 , 10 )
62
+
63
+ # additional buttons
64
+ self .editHelpButton = QPushButton (self .tr ("Edit model help" ))
65
+ self .buttonBox .addButton (self .editHelpButton , QDialogButtonBox .ActionRole )
66
+ self .runButton = QPushButton (self .tr ("Run" ))
67
+ self .runButton .setToolTip (self .tr ("Execute current model" ))
68
+ self .buttonBox .addButton (self .runButton , QDialogButtonBox .ActionRole )
69
+ self .openButton = QPushButton (self .tr ("Open" ))
70
+ self .openButton .setToolTip (self .tr ("Open existing model" ))
71
+ self .buttonBox .addButton (self .openButton , QDialogButtonBox .ActionRole )
72
+ self .saveButton = QPushButton (self .tr ("Save" ))
73
+ self .saveButton .setToolTip (self .tr ("Save current model" ))
74
+ self .buttonBox .addButton (self .saveButton , QDialogButtonBox .ActionRole )
75
+
76
+ # fill trees with inputs and algorithms
77
+ self .fillInputsTree ()
78
+ self .fillAlgorithmTree ()
79
+
80
+ if hasattr (self .searchBox , 'setPlaceholderText' ):
81
+ self .searchBox .setPlaceholderText (self .tr ("Search..." ))
82
+ if hasattr (self .textName , 'setPlaceholderText' ):
83
+ self .textName .setPlaceholderText ("[Enter model name here]" )
84
+ if hasattr (self .textGroup , 'setPlaceholderText' ):
85
+ self .textGroup .setPlaceholderText ("[Enter group name here]" )
86
+
87
+ # connect signals and slots
88
+ self .inputsTree .doubleClicked .connect (self .addInput )
89
+
90
+ self .searchBox .textChanged .connect (self .fillAlgorithmTree )
91
+ self .algorithmTree .doubleClicked .connect (self .addAlgorithm )
92
+
93
+ self .openButton .clicked .connect (self .openModel )
94
+ self .saveButton .clicked .connect (self .saveModel )
95
+ self .runButton .clicked .connect (self .runModel )
96
+ self .editHelpButton .clicked .connect (self .editHelp )
97
+
48
98
if alg is not None :
49
99
self .alg = alg
50
100
self .textGroup .setText (alg .group )
51
101
self .textName .setText (alg .name )
52
102
self .repaintModel ()
53
103
else :
54
104
self .alg = ModelerAlgorithm ()
105
+
55
106
self .view .centerOn (0 , 0 )
56
107
self .alg .setModelerView (self )
57
108
self .help = None
58
109
self .update = False #indicates whether to update or not the toolbox after closing this dialog
59
110
60
- def setupUi (self ):
61
- self .resize (1000 , 600 )
62
- self .setWindowTitle ("SEXTANTE Modeler" )
63
- self .tabWidget = QtGui .QTabWidget ()
64
- self .tabWidget .setMaximumSize (QtCore .QSize (350 , 10000 ))
65
- self .tabWidget .setMinimumWidth (300 )
66
-
67
- #left hand side part
68
- #==================================
69
- self .inputsTree = QtGui .QTreeWidget ()
70
- self .inputsTree .setHeaderHidden (True )
71
- self .fillInputsTree ()
72
- self .inputsTree .doubleClicked .connect (self .addInput )
73
- self .tabWidget .addTab (self .inputsTree , "Inputs" )
74
-
75
- self .verticalLayout = QtGui .QVBoxLayout ()
76
- self .verticalLayout .setSpacing (2 )
77
- self .verticalLayout .setMargin (0 )
78
- self .searchBox = QtGui .QLineEdit ()
79
- self .searchBox .textChanged .connect (self .fillAlgorithmTree )
80
- self .verticalLayout .addWidget (self .searchBox )
81
- self .algorithmTree = QtGui .QTreeWidget ()
82
- self .algorithmTree .setHeaderHidden (True )
83
- self .fillAlgorithmTree ()
84
- self .verticalLayout .addWidget (self .algorithmTree )
85
- self .algorithmTree .doubleClicked .connect (self .addAlgorithm )
86
-
87
- self .algorithmsTab = QtGui .QWidget ()
88
- self .algorithmsTab .setLayout (self .verticalLayout )
89
- self .tabWidget .addTab (self .algorithmsTab , "Algorithms" )
90
-
91
- #right hand side part
92
- #==================================
93
- self .textName = QtGui .QLineEdit ()
94
- if hasattr (self .textName , 'setPlaceholderText' ):
95
- self .textName .setPlaceholderText ("[Enter model name here]" )
96
- self .textGroup = QtGui .QLineEdit ()
97
- if hasattr (self .textGroup , 'setPlaceholderText' ):
98
- self .textGroup .setPlaceholderText ("[Enter group name here]" )
99
- self .horizontalLayoutNames = QtGui .QHBoxLayout ()
100
- self .horizontalLayoutNames .setSpacing (2 )
101
- self .horizontalLayoutNames .setMargin (0 )
102
- self .horizontalLayoutNames .addWidget (self .textName )
103
- self .horizontalLayoutNames .addWidget (self .textGroup )
104
-
105
- self .scene = ModelerScene (self )
106
- self .scene .setSceneRect (QtCore .QRectF (0 , 0 , 4000 , 4000 ))
107
-
108
- self .canvasTabWidget = QtGui .QTabWidget ()
109
- self .canvasTabWidget .setMinimumWidth (300 )
110
- self .view = QtGui .QGraphicsView (self .scene )
111
-
112
- #=======================================================================
113
- # self.canvasTabWidget.addTab(self.view, "Design")
114
- # self.pythonText = QtGui.QTextEdit()
115
- # self.createScriptButton = QtGui.QPushButton()
116
- # self.createScriptButton.setText("Create script from model code")
117
- # self.createScriptButton.clicked.connect(self.createScript)
118
- # self.verticalLayoutPython = QtGui.QVBoxLayout()
119
- # self.verticalLayoutPython.setSpacing(2)
120
- # self.verticalLayoutPython.setMargin(0)
121
- # self.verticalLayoutPython.addWidget(self.pythonText)
122
- # self.verticalLayoutPython.addWidget(self.createScriptButton)
123
- # self.pythonWidget = QtGui.QWidget()
124
- # self.pythonWidget.setLayout(self.verticalLayoutPython)
125
- # self.canvasTabWidget.addTab(self.pythonWidget, "Python code")
126
- #=======================================================================
127
-
128
- self .canvasLayout = QtGui .QVBoxLayout ()
129
- self .canvasLayout .setSpacing (2 )
130
- self .canvasLayout .setMargin (0 )
131
- self .canvasLayout .addLayout (self .horizontalLayoutNames )
132
- self .canvasLayout .addWidget (self .view )#canvasTabWidget)
133
-
134
- #upper part, putting the two previous parts together
135
- #===================================================
136
- self .horizontalLayout = QtGui .QHBoxLayout ()
137
- self .horizontalLayout .setSpacing (2 )
138
- self .horizontalLayout .setMargin (0 )
139
- self .horizontalLayout .addWidget (self .tabWidget )
140
- self .horizontalLayout .addLayout (self .canvasLayout )
141
-
142
- #And the whole layout
143
- #==========================
144
-
145
- self .buttonBox = QtGui .QDialogButtonBox ()
146
- self .buttonBox .setOrientation (QtCore .Qt .Horizontal )
147
- self .editHelpButton = QtGui .QPushButton ()
148
- self .editHelpButton .setText ("Edit model help" )
149
- self .buttonBox .addButton (self .editHelpButton , QtGui .QDialogButtonBox .ActionRole )
150
- self .runButton = QtGui .QPushButton ()
151
- self .runButton .setText ("Run" )
152
- self .buttonBox .addButton (self .runButton , QtGui .QDialogButtonBox .ActionRole )
153
- self .openButton = QtGui .QPushButton ()
154
- self .openButton .setText ("Open" )
155
- self .buttonBox .addButton (self .openButton , QtGui .QDialogButtonBox .ActionRole )
156
- self .saveButton = QtGui .QPushButton ()
157
- self .saveButton .setText ("Save" )
158
- self .buttonBox .addButton (self .saveButton , QtGui .QDialogButtonBox .ActionRole )
159
- self .closeButton = QtGui .QPushButton ()
160
- self .closeButton .setText ("Close" )
161
- self .buttonBox .addButton (self .closeButton , QtGui .QDialogButtonBox .ActionRole )
162
- QObject .connect (self .openButton , QtCore .SIGNAL ("clicked()" ), self .openModel )
163
- QObject .connect (self .saveButton , QtCore .SIGNAL ("clicked()" ), self .saveModel )
164
- QObject .connect (self .closeButton , QtCore .SIGNAL ("clicked()" ), self .closeWindow )
165
- QObject .connect (self .runButton , QtCore .SIGNAL ("clicked()" ), self .runModel )
166
- QObject .connect (self .editHelpButton , QtCore .SIGNAL ("clicked()" ), self .editHelp )
167
-
168
- self .globalLayout = QtGui .QVBoxLayout ()
169
- self .globalLayout .setSpacing (2 )
170
- self .globalLayout .setMargin (0 )
171
- self .globalLayout .addLayout (self .horizontalLayout )
172
- self .globalLayout .addWidget (self .buttonBox )
173
- self .setLayout (self .globalLayout )
174
- QtCore .QMetaObject .connectSlotsByName (self )
175
-
176
- self .view .ensureVisible (0 , 0 , 10 , 10 )
177
-
178
- def closeWindow (self ):
179
- self .close ()
111
+ #~ def setupUi(self):
112
+ #~ self.resize(1000, 600)
113
+ #~ self.setWindowTitle("SEXTANTE Modeler")
114
+ #~ self.tabWidget = QtGui.QTabWidget()
115
+ #~ self.tabWidget.setMaximumSize(QtCore.QSize(350, 10000))
116
+ #~ self.tabWidget.setMinimumWidth(300)
117
+ #~
118
+ #~ #left hand side part
119
+ #~ #==================================
120
+ #~ self.inputsTree = QtGui.QTreeWidget()
121
+ #~ self.inputsTree.setHeaderHidden(True)
122
+ #~ self.fillInputsTree()
123
+ #~ self.inputsTree.doubleClicked.connect(self.addInput)
124
+ #~ self.tabWidget.addTab(self.inputsTree, "Inputs")
125
+ #~
126
+ #~ self.verticalLayout = QtGui.QVBoxLayout()
127
+ #~ self.verticalLayout.setSpacing(2)
128
+ #~ self.verticalLayout.setMargin(0)
129
+ #~ self.searchBox = QtGui.QLineEdit()
130
+ #~ self.searchBox.textChanged.connect(self.fillAlgorithmTree)
131
+ #~ self.verticalLayout.addWidget(self.searchBox)
132
+ #~ self.algorithmTree = QtGui.QTreeWidget()
133
+ #~ self.algorithmTree.setHeaderHidden(True)
134
+ #~ self.fillAlgorithmTree()
135
+ #~ self.verticalLayout.addWidget(self.algorithmTree)
136
+ #~ self.algorithmTree.doubleClicked.connect(self.addAlgorithm)
137
+ #~
138
+ #~ self.algorithmsTab = QtGui.QWidget()
139
+ #~ self.algorithmsTab.setLayout(self.verticalLayout)
140
+ #~ self.tabWidget.addTab(self.algorithmsTab, "Algorithms")
141
+ #~
142
+ #~ #right hand side part
143
+ #~ #==================================
144
+ #~ self.textName = QtGui.QLineEdit()
145
+ #~ if hasattr(self.textName, 'setPlaceholderText'):
146
+ #~ self.textName.setPlaceholderText("[Enter model name here]")
147
+ #~ self.textGroup = QtGui.QLineEdit()
148
+ #~ if hasattr(self.textGroup, 'setPlaceholderText'):
149
+ #~ self.textGroup.setPlaceholderText("[Enter group name here]")
150
+ #~ self.horizontalLayoutNames = QtGui.QHBoxLayout()
151
+ #~ self.horizontalLayoutNames.setSpacing(2)
152
+ #~ self.horizontalLayoutNames.setMargin(0)
153
+ #~ self.horizontalLayoutNames.addWidget(self.textName)
154
+ #~ self.horizontalLayoutNames.addWidget(self.textGroup)
155
+ #~
156
+ #~ self.scene = ModelerScene(self)
157
+ #~ self.scene.setSceneRect(QtCore.QRectF(0, 0, 4000, 4000))
158
+ #~
159
+ #~ self.canvasTabWidget = QtGui.QTabWidget()
160
+ #~ self.canvasTabWidget.setMinimumWidth(300)
161
+ #~ self.view = QtGui.QGraphicsView(self.scene)
162
+ #~
163
+ #~ #=======================================================================
164
+ #~ # self.canvasTabWidget.addTab(self.view, "Design")
165
+ #~ # self.pythonText = QtGui.QTextEdit()
166
+ #~ # self.createScriptButton = QtGui.QPushButton()
167
+ #~ # self.createScriptButton.setText("Create script from model code")
168
+ #~ # self.createScriptButton.clicked.connect(self.createScript)
169
+ #~ # self.verticalLayoutPython = QtGui.QVBoxLayout()
170
+ #~ # self.verticalLayoutPython.setSpacing(2)
171
+ #~ # self.verticalLayoutPython.setMargin(0)
172
+ #~ # self.verticalLayoutPython.addWidget(self.pythonText)
173
+ #~ # self.verticalLayoutPython.addWidget(self.createScriptButton)
174
+ #~ # self.pythonWidget = QtGui.QWidget()
175
+ #~ # self.pythonWidget.setLayout(self.verticalLayoutPython)
176
+ #~ # self.canvasTabWidget.addTab(self.pythonWidget, "Python code")
177
+ #~ #=======================================================================
178
+ #~
179
+ #~ self.canvasLayout = QtGui.QVBoxLayout()
180
+ #~ self.canvasLayout.setSpacing(2)
181
+ #~ self.canvasLayout.setMargin(0)
182
+ #~ self.canvasLayout.addLayout(self.horizontalLayoutNames)
183
+ #~ self.canvasLayout.addWidget(self.view)#canvasTabWidget)
184
+ #~
185
+ #~ #upper part, putting the two previous parts together
186
+ #~ #===================================================
187
+ #~ self.horizontalLayout = QtGui.QHBoxLayout()
188
+ #~ self.horizontalLayout.setSpacing(2)
189
+ #~ self.horizontalLayout.setMargin(0)
190
+ #~ self.horizontalLayout.addWidget(self.tabWidget)
191
+ #~ self.horizontalLayout.addLayout(self.canvasLayout)
192
+ #~
193
+ #~ #And the whole layout
194
+ #~ #==========================
195
+ #~
196
+ #~ self.buttonBox = QtGui.QDialogButtonBox()
197
+ #~ self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
198
+ #~ self.editHelpButton = QtGui.QPushButton()
199
+ #~ self.editHelpButton.setText("Edit model help")
200
+ #~ self.buttonBox.addButton(self.editHelpButton, QtGui.QDialogButtonBox.ActionRole)
201
+ #~ self.runButton = QtGui.QPushButton()
202
+ #~ self.runButton.setText("Run")
203
+ #~ self.buttonBox.addButton(self.runButton, QtGui.QDialogButtonBox.ActionRole)
204
+ #~ self.openButton = QtGui.QPushButton()
205
+ #~ self.openButton.setText("Open")
206
+ #~ self.buttonBox.addButton(self.openButton, QtGui.QDialogButtonBox.ActionRole)
207
+ #~ self.saveButton = QtGui.QPushButton()
208
+ #~ self.saveButton.setText("Save")
209
+ #~ self.buttonBox.addButton(self.saveButton, QtGui.QDialogButtonBox.ActionRole)
210
+ #~ self.closeButton = QtGui.QPushButton()
211
+ #~ self.closeButton.setText("Close")
212
+ #~ self.buttonBox.addButton(self.closeButton, QtGui.QDialogButtonBox.ActionRole)
213
+ #~ QObject.connect(self.openButton, QtCore.SIGNAL("clicked()"), self.openModel)
214
+ #~ QObject.connect(self.saveButton, QtCore.SIGNAL("clicked()"), self.saveModel)
215
+ #~ QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), self.closeWindow)
216
+ #~ QObject.connect(self.runButton, QtCore.SIGNAL("clicked()"), self.runModel)
217
+ #~ QObject.connect(self.editHelpButton, QtCore.SIGNAL("clicked()"), self.editHelp)
218
+ #~
219
+ #~ self.globalLayout = QtGui.QVBoxLayout()
220
+ #~ self.globalLayout.setSpacing(2)
221
+ #~ self.globalLayout.setMargin(0)
222
+ #~ self.globalLayout.addLayout(self.horizontalLayout)
223
+ #~ self.globalLayout.addWidget(self.buttonBox)
224
+ #~ self.setLayout(self.globalLayout)
225
+ #~ QtCore.QMetaObject.connectSlotsByName(self)
226
+ #~
227
+ #~ self.view.ensureVisible(0, 0, 10, 10)
180
228
181
229
def editHelp (self ):
182
230
dlg = HelpEditionDialog (self .alg )
@@ -223,15 +271,18 @@ def runModel(self):
223
271
224
272
def saveModel (self ):
225
273
if unicode (self .textGroup .text ()).strip () == "" or unicode (self .textName .text ()).strip () == "" :
226
- QMessageBox .warning (self , "Warning" , "Please enter group and model names before saving" )
274
+ QMessageBox .warning (self ,
275
+ self .tr ("Warning" ),
276
+ self .tr ("Please enter group and model names before saving" )
277
+ )
227
278
return
228
279
self .alg .setPositions (self .scene .getParameterPositions (), self .scene .getAlgorithmPositions ())
229
280
self .alg .name = unicode (self .textName .text ())
230
281
self .alg .group = unicode (self .textGroup .text ())
231
282
if self .alg .descriptionFile != None :
232
283
filename = self .alg .descriptionFile
233
284
else :
234
- filename = str ( QtGui . QFileDialog .getSaveFileName (self , "Save Model" , ModelerUtils .modelsFolder (), "SEXTANTE models (*.model)" ))
285
+ filename = unicode ( QFileDialog .getSaveFileName (self , self . tr ( "Save Model" ) , ModelerUtils .modelsFolder (), self . tr ( "SEXTANTE models (*.model)" ) ))
235
286
if filename :
236
287
if not filename .endswith (".model" ):
237
288
filename += ".model"
@@ -249,10 +300,13 @@ def saveModel(self):
249
300
pickle .dump (self .help , f )
250
301
f .close ()
251
302
self .help = None
252
- QtGui .QMessageBox .information (self , "Model saving" , "Model was correctly saved." )
303
+ QMessageBox .information (self ,
304
+ self .tr ("Model saving" ),
305
+ self .tr ("Model was correctly saved." )
306
+ )
253
307
254
308
def openModel (self ):
255
- filename = unicode (QtGui . QFileDialog .getOpenFileName (self , "Open Model" , ModelerUtils .modelsFolder (), "SEXTANTE models (*.model)" ))
309
+ filename = unicode (QFileDialog .getOpenFileName (self , self . tr ( "Open Model" ) , ModelerUtils .modelsFolder (), self . tr ( "SEXTANTE models (*.model)" ) ))
256
310
if filename :
257
311
try :
258
312
alg = ModelerAlgorithm ()
@@ -265,17 +319,18 @@ def openModel(self):
265
319
self .view .ensureVisible (self .scene .getLastAlgorithmItem ())
266
320
self .view .centerOn (0 ,0 )
267
321
except WrongModelException , e :
268
- QMessageBox .critical (self , "Could not open model" , "The selected model could not be loaded\n Wrong line:" + e .msg )
269
-
322
+ QMessageBox .critical (self ,
323
+ self .tr ("Could not open model" ),
324
+ self .tr ("The selected model could not be loaded.\n Wrong line: %1" ).arg (e .msg )
325
+ )
270
326
271
327
def repaintModel (self ):
272
328
self .scene = ModelerScene ()
273
- self .scene .setSceneRect (QtCore . QRectF (0 , 0 , ModelerAlgorithm .CANVAS_SIZE , ModelerAlgorithm .CANVAS_SIZE ))
329
+ self .scene .setSceneRect (QRectF (0 , 0 , ModelerAlgorithm .CANVAS_SIZE , ModelerAlgorithm .CANVAS_SIZE ))
274
330
self .scene .paintModel (self .alg )
275
331
self .view .setScene (self .scene )
276
332
#self.pythonText.setText(self.alg.getAsPythonCode())
277
333
278
-
279
334
def addInput (self ):
280
335
item = self .inputsTree .currentItem ()
281
336
paramType = str (item .text (0 ))
@@ -288,18 +343,16 @@ def addInput(self):
288
343
self .repaintModel ()
289
344
self .view .ensureVisible (self .scene .getLastParameterItem ())
290
345
291
-
292
346
def fillInputsTree (self ):
293
- parametersItem = QtGui . QTreeWidgetItem ()
294
- parametersItem .setText (0 , "Parameters" )
347
+ parametersItem = QTreeWidgetItem ()
348
+ parametersItem .setText (0 , self . tr ( "Parameters" ) )
295
349
for paramType in ModelerParameterDefinitionDialog .paramTypes :
296
- paramItem = QtGui . QTreeWidgetItem ()
350
+ paramItem = QTreeWidgetItem ()
297
351
paramItem .setText (0 , paramType )
298
352
parametersItem .addChild (paramItem )
299
353
self .inputsTree .addTopLevelItem (parametersItem )
300
354
parametersItem .setExpanded (True )
301
355
302
-
303
356
def addAlgorithm (self ):
304
357
item = self .algorithmTree .currentItem ()
305
358
if isinstance (item , TreeAlgorithmItem ):
@@ -331,15 +384,15 @@ def fillAlgorithmTree(self):
331
384
if alg .group in groups :
332
385
groupItem = groups [alg .group ]
333
386
else :
334
- groupItem = QtGui . QTreeWidgetItem ()
387
+ groupItem = QTreeWidgetItem ()
335
388
groupItem .setText (0 , alg .group )
336
389
groupItem .setToolTip (0 , alg .group )
337
390
groups [alg .group ] = groupItem
338
391
algItem = TreeAlgorithmItem (alg )
339
392
groupItem .addChild (algItem )
340
393
341
394
if len (groups ) > 0 :
342
- providerItem = QtGui . QTreeWidgetItem ()
395
+ providerItem = QTreeWidgetItem ()
343
396
providerItem .setText (0 , Providers .providers [providerName ].getDescription ())
344
397
providerItem .setToolTip (0 , Providers .providers [providerName ].getDescription ())
345
398
providerItem .setIcon (0 , Providers .providers [providerName ].getIcon ())
@@ -353,7 +406,7 @@ def fillAlgorithmTree(self):
353
406
354
407
self .algorithmTree .sortItems (0 , Qt .AscendingOrder )
355
408
356
- class TreeAlgorithmItem (QtGui . QTreeWidgetItem ):
409
+ class TreeAlgorithmItem (QTreeWidgetItem ):
357
410
358
411
def __init__ (self , alg ):
359
412
QTreeWidgetItem .__init__ (self )
0 commit comments