2
2
3
3
"""
4
4
***************************************************************************
5
- SextantePlugin .py
5
+ ProcessingPlugin .py
6
6
---------------------
7
7
Date : August 2012
8
8
Copyright : (C) 2012 by Victor Olaya
30
30
from PyQt4 .QtGui import *
31
31
from qgis .core import *
32
32
from PyQt4 import QtGui
33
- from sextante .commander .CommanderWindow import CommanderWindow
34
- from sextante .core .Sextante import Sextante
35
- from sextante .core .QGisLayers import QGisLayers
36
- from sextante .core .SextanteUtils import SextanteUtils
37
- from sextante .gui .SextanteToolbox import SextanteToolbox
38
- from sextante .gui .HistoryDialog import HistoryDialog
39
- from sextante .gui .ConfigDialog import ConfigDialog
40
- from sextante .gui .ResultsDialog import ResultsDialog
41
- from sextante .modeler .ModelerDialog import ModelerDialog
42
- import sextante .resources_rc
33
+ from processing .commander .CommanderWindow import CommanderWindow
34
+ from processing .core .Processing import Processing
35
+ from processing .core .QGisLayers import QGisLayers
36
+ from processing .core .ProcessingUtils import ProcessingUtils
37
+ from processing .gui .ProcessingToolbox import ProcessingToolbox
38
+ from processing .gui .HistoryDialog import HistoryDialog
39
+ from processing .gui .ConfigDialog import ConfigDialog
40
+ from processing .gui .ResultsDialog import ResultsDialog
41
+ from processing .modeler .ModelerDialog import ModelerDialog
42
+ import processing .resources_rc
43
43
44
44
cmd_folder = os .path .split (inspect .getfile ( inspect .currentframe () ))[0 ]
45
45
if cmd_folder not in sys .path :
46
46
sys .path .insert (0 , cmd_folder )
47
47
48
- class SextantePlugin :
48
+ class ProcessingPlugin :
49
49
50
50
def __init__ (self , iface ):
51
51
self .iface = iface
52
52
QGisLayers .setInterface (iface )
53
- Sextante .initialize ()
54
- Sextante .setInterface (iface )
55
- Sextante .setPlugin (self )
53
+ Processing .initialize ()
54
+ Processing .setInterface (iface )
55
+ Processing .setPlugin (self )
56
56
57
57
def initGui (self ):
58
58
self .commander = None
59
- self .toolbox = SextanteToolbox (self .iface )
59
+ self .toolbox = ProcessingToolbox (self .iface )
60
60
self .iface .addDockWidget (Qt .RightDockWidgetArea , self .toolbox )
61
61
self .toolbox .hide ()
62
- Sextante .addAlgListListener (self .toolbox )
62
+ Processing .addAlgListListener (self .toolbox )
63
63
64
64
self .menu = QMenu (self .iface .mainWindow ())
65
- self .menu .setTitle (QCoreApplication .translate ("SEXTANTE " , "Analysis " ))
65
+ self .menu .setTitle (QCoreApplication .translate ("Processing " , "Processing " ))
66
66
67
67
self .toolboxAction = self .toolbox .toggleViewAction ()
68
- self .toolboxAction .setIcon (QIcon (":/sextante /images/toolbox .png" ))
69
- self .toolboxAction .setText (QCoreApplication .translate ("SEXTANTE " , "&SEXTANTE toolbox " ))
68
+ self .toolboxAction .setIcon (QIcon (":/processing /images/alg .png" ))
69
+ self .toolboxAction .setText (QCoreApplication .translate ("Processing " , "Toolbox " ))
70
70
self .menu .addAction (self .toolboxAction )
71
71
72
- self .modelerAction = QAction (QIcon (":/sextante /images/model.png" ),
73
- QCoreApplication .translate ("SEXTANTE " , "&SEXTANTE modeler" ),
72
+ self .modelerAction = QAction (QIcon (":/processing /images/model.png" ),
73
+ QCoreApplication .translate ("Processing " , "Graphical modeler" ),
74
74
self .iface .mainWindow ())
75
75
self .modelerAction .triggered .connect (self .openModeler )
76
76
self .menu .addAction (self .modelerAction )
77
77
78
- self .historyAction = QAction (QIcon (":/sextante /images/history.gif" ),
79
- QCoreApplication .translate ("SEXTANTE " , "&SEXTANTE history and log" ),
78
+ self .historyAction = QAction (QIcon (":/processing /images/history.gif" ),
79
+ QCoreApplication .translate ("Processing " , "History and log" ),
80
80
self .iface .mainWindow ())
81
81
self .historyAction .triggered .connect (self .openHistory )
82
82
self .menu .addAction (self .historyAction )
83
83
84
- self .configAction = QAction (QIcon (":/sextante /images/config.png" ),
85
- QCoreApplication .translate ("SEXTANTE " , "&SEXTANTE options and configuration" ),
84
+ self .configAction = QAction (QIcon (":/processing /images/config.png" ),
85
+ QCoreApplication .translate ("Processing " , "Options and configuration" ),
86
86
self .iface .mainWindow ())
87
87
self .configAction .triggered .connect (self .openConfig )
88
88
self .menu .addAction (self .configAction )
89
89
90
- self .resultsAction = QAction (QIcon (":/sextante /images/results.png" ),
91
- QCoreApplication .translate ("SEXTANTE " , "&SEXTANTE results viewer" ),
90
+ self .resultsAction = QAction (QIcon (":/processing /images/results.png" ),
91
+ QCoreApplication .translate ("Processing " , "&Results viewer" ),
92
92
self .iface .mainWindow ())
93
93
self .resultsAction .triggered .connect (self .openResults )
94
94
self .menu .addAction (self .resultsAction )
95
95
96
96
menuBar = self .iface .mainWindow ().menuBar ()
97
97
menuBar .insertMenu (self .iface .firstRightStandardMenu ().menuAction (), self .menu )
98
98
99
- self .commanderAction = QAction (QIcon (":/sextante /images/toolbox .png" ),
100
- QCoreApplication .translate ("SEXTANTE " , "&SEXTANTE commander " ),
99
+ self .commanderAction = QAction (QIcon (":/processing /images/commander .png" ),
100
+ QCoreApplication .translate ("Processing " , "&Commander " ),
101
101
self .iface .mainWindow ())
102
102
self .commanderAction .triggered .connect (self .openCommander )
103
103
self .menu .addAction (self .commanderAction )
@@ -107,7 +107,7 @@ def unload(self):
107
107
self .toolbox .setVisible (False )
108
108
self .menu .deleteLater ()
109
109
#delete temporary output files
110
- folder = SextanteUtils .tempFolder ()
110
+ folder = ProcessingUtils .tempFolder ()
111
111
if QDir (folder ).exists ():
112
112
shutil .rmtree (folder , True )
113
113
@@ -116,7 +116,7 @@ def unload(self):
116
116
def openCommander (self ):
117
117
if self .commander is None :
118
118
self .commander = CommanderWindow (self .iface .mainWindow (), self .iface .mapCanvas ())
119
- Sextante .addAlgListListener (self .commander )
119
+ Processing .addAlgListListener (self .commander )
120
120
self .commander .prepareGui ()
121
121
self .commander .show ()
122
122
#dlg.exec_()
0 commit comments