Skip to content

Commit 6edc945

Browse files
committed
change line endings to UNIX
1 parent 1b803d7 commit 6edc945

File tree

271 files changed

+17493
-17493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+17493
-17493
lines changed
+130-130
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,130 @@
1-
from PyQt4.QtCore import *
2-
from PyQt4.QtGui import *
3-
from qgis.core import *
4-
import os, sys
5-
import inspect
6-
from sextante.core.Sextante import Sextante
7-
from sextante.gui.SextanteToolbox import SextanteToolbox
8-
from sextante.core.QGisLayers import QGisLayers
9-
from sextante.gui.HistoryDialog import HistoryDialog
10-
from sextante.core.SextanteUtils import SextanteUtils
11-
from sextante.gui.ConfigDialog import ConfigDialog
12-
from sextante.modeler.ModelerDialog import ModelerDialog
13-
from sextante.gui.ResultsDialog import ResultsDialog
14-
from sextante.about.AboutDialog import AboutDialog
15-
import subprocess
16-
17-
cmd_folder = os.path.split(inspect.getfile( inspect.currentframe() ))[0]
18-
if cmd_folder not in sys.path:
19-
sys.path.insert(0, cmd_folder)
20-
21-
class SextantePlugin:
22-
23-
def __init__(self, iface):
24-
self.iface = iface
25-
QGisLayers.setInterface(iface)
26-
Sextante.initialize()
27-
Sextante.setInterface(iface)
28-
29-
def initGui(self):
30-
self.toolbox = SextanteToolbox(self.iface)
31-
self.toolbox.setVisible(False)
32-
Sextante.addAlgListListener(self.toolbox)
33-
34-
self.menu = QMenu(self.iface.mainWindow())
35-
self.menu.setTitle("Analysis")
36-
37-
icon = QIcon(os.path.dirname(__file__) + "/images/toolbox.png")
38-
self.toolboxAction = QAction(icon, \
39-
"&SEXTANTE Toolbox", self.iface.mainWindow())
40-
QObject.connect(self.toolboxAction, SIGNAL("triggered()"), self.openToolbox)
41-
self.menu.addAction(self.toolboxAction)
42-
43-
icon = QIcon(os.path.dirname(__file__) + "/images/model.png")
44-
self.modelerAction = QAction(icon, \
45-
"&SEXTANTE Modeler", self.iface.mainWindow())
46-
QObject.connect(self.modelerAction, SIGNAL("triggered()"), self.openModeler)
47-
self.menu.addAction(self.modelerAction)
48-
49-
icon = QIcon(os.path.dirname(__file__) + "/images/history.gif")
50-
self.historyAction = QAction(icon, \
51-
"&SEXTANTE History and log", self.iface.mainWindow())
52-
QObject.connect(self.historyAction, SIGNAL("triggered()"), self.openHistory)
53-
self.menu.addAction(self.historyAction)
54-
55-
icon = QIcon(os.path.dirname(__file__) + "/images/config.png")
56-
self.configAction = QAction(icon, \
57-
"&SEXTANTE options and configuration", self.iface.mainWindow())
58-
QObject.connect(self.configAction, SIGNAL("triggered()"), self.openConfig)
59-
self.menu.addAction(self.configAction)
60-
61-
icon = QIcon(os.path.dirname(__file__) + "/images/results.png")
62-
self.resultsAction = QAction(icon, \
63-
"&SEXTANTE results viewer", self.iface.mainWindow())
64-
QObject.connect(self.resultsAction, SIGNAL("triggered()"), self.openResults)
65-
self.menu.addAction(self.resultsAction)
66-
67-
icon = QIcon(os.path.dirname(__file__) + "/images/help.png")
68-
self.helpAction = QAction(icon, \
69-
"&SEXTANTE help", self.iface.mainWindow())
70-
QObject.connect(self.helpAction, SIGNAL("triggered()"), self.openHelp)
71-
self.menu.addAction(self.helpAction)
72-
73-
icon = QIcon(os.path.dirname(__file__) + "/images/info.png")
74-
self.aboutAction = QAction(icon, \
75-
"&About SEXTANTE", self.iface.mainWindow())
76-
QObject.connect(self.aboutAction, SIGNAL("triggered()"), self.openAbout)
77-
self.menu.addAction(self.aboutAction)
78-
79-
menuBar = self.iface.mainWindow().menuBar()
80-
menuBar.insertMenu(menuBar.actions()[-1], self.menu)
81-
82-
def unload(self):
83-
self.toolbox.setVisible(False)
84-
self.menu.deleteLater()
85-
#delete temporary output files
86-
folder = SextanteUtils.tempFolder()
87-
for f in os.listdir(folder):
88-
path = os.path.join(folder,f)
89-
try:
90-
os.unlink(path)
91-
except:
92-
#leave files that could not be deleted
93-
pass
94-
95-
96-
def openToolbox(self):
97-
self.toolbox.setVisible(True)
98-
99-
def openModeler(self):
100-
dlg = ModelerDialog()
101-
dlg.exec_()
102-
if dlg.update:
103-
self.toolbox.updateTree()
104-
105-
def openResults(self):
106-
dlg = ResultsDialog()
107-
dlg.exec_()
108-
109-
def openHistory(self):
110-
dlg = HistoryDialog()
111-
dlg.exec_()
112-
113-
def openConfig(self):
114-
dlg = ConfigDialog(self.toolbox)
115-
dlg.exec_()
116-
117-
def openAbout(self):
118-
dlg = AboutDialog()
119-
dlg.exec_()
120-
121-
def openHelp(self):
122-
filename = os.path.dirname(__file__) + "/help/index.html"
123-
if os.name == "nt":
124-
os.startfile(filename)
125-
elif sys.platform == "darwin":
126-
subprocess.Popen(('open', filename))
127-
else:
128-
subprocess.call(('xdg-open', filename))
129-
130-
1+
from PyQt4.QtCore import *
2+
from PyQt4.QtGui import *
3+
from qgis.core import *
4+
import os, sys
5+
import inspect
6+
from sextante.core.Sextante import Sextante
7+
from sextante.gui.SextanteToolbox import SextanteToolbox
8+
from sextante.core.QGisLayers import QGisLayers
9+
from sextante.gui.HistoryDialog import HistoryDialog
10+
from sextante.core.SextanteUtils import SextanteUtils
11+
from sextante.gui.ConfigDialog import ConfigDialog
12+
from sextante.modeler.ModelerDialog import ModelerDialog
13+
from sextante.gui.ResultsDialog import ResultsDialog
14+
from sextante.about.AboutDialog import AboutDialog
15+
import subprocess
16+
17+
cmd_folder = os.path.split(inspect.getfile( inspect.currentframe() ))[0]
18+
if cmd_folder not in sys.path:
19+
sys.path.insert(0, cmd_folder)
20+
21+
class SextantePlugin:
22+
23+
def __init__(self, iface):
24+
self.iface = iface
25+
QGisLayers.setInterface(iface)
26+
Sextante.initialize()
27+
Sextante.setInterface(iface)
28+
29+
def initGui(self):
30+
self.toolbox = SextanteToolbox(self.iface)
31+
self.toolbox.setVisible(False)
32+
Sextante.addAlgListListener(self.toolbox)
33+
34+
self.menu = QMenu(self.iface.mainWindow())
35+
self.menu.setTitle("Analysis")
36+
37+
icon = QIcon(os.path.dirname(__file__) + "/images/toolbox.png")
38+
self.toolboxAction = QAction(icon, \
39+
"&SEXTANTE Toolbox", self.iface.mainWindow())
40+
QObject.connect(self.toolboxAction, SIGNAL("triggered()"), self.openToolbox)
41+
self.menu.addAction(self.toolboxAction)
42+
43+
icon = QIcon(os.path.dirname(__file__) + "/images/model.png")
44+
self.modelerAction = QAction(icon, \
45+
"&SEXTANTE Modeler", self.iface.mainWindow())
46+
QObject.connect(self.modelerAction, SIGNAL("triggered()"), self.openModeler)
47+
self.menu.addAction(self.modelerAction)
48+
49+
icon = QIcon(os.path.dirname(__file__) + "/images/history.gif")
50+
self.historyAction = QAction(icon, \
51+
"&SEXTANTE History and log", self.iface.mainWindow())
52+
QObject.connect(self.historyAction, SIGNAL("triggered()"), self.openHistory)
53+
self.menu.addAction(self.historyAction)
54+
55+
icon = QIcon(os.path.dirname(__file__) + "/images/config.png")
56+
self.configAction = QAction(icon, \
57+
"&SEXTANTE options and configuration", self.iface.mainWindow())
58+
QObject.connect(self.configAction, SIGNAL("triggered()"), self.openConfig)
59+
self.menu.addAction(self.configAction)
60+
61+
icon = QIcon(os.path.dirname(__file__) + "/images/results.png")
62+
self.resultsAction = QAction(icon, \
63+
"&SEXTANTE results viewer", self.iface.mainWindow())
64+
QObject.connect(self.resultsAction, SIGNAL("triggered()"), self.openResults)
65+
self.menu.addAction(self.resultsAction)
66+
67+
icon = QIcon(os.path.dirname(__file__) + "/images/help.png")
68+
self.helpAction = QAction(icon, \
69+
"&SEXTANTE help", self.iface.mainWindow())
70+
QObject.connect(self.helpAction, SIGNAL("triggered()"), self.openHelp)
71+
self.menu.addAction(self.helpAction)
72+
73+
icon = QIcon(os.path.dirname(__file__) + "/images/info.png")
74+
self.aboutAction = QAction(icon, \
75+
"&About SEXTANTE", self.iface.mainWindow())
76+
QObject.connect(self.aboutAction, SIGNAL("triggered()"), self.openAbout)
77+
self.menu.addAction(self.aboutAction)
78+
79+
menuBar = self.iface.mainWindow().menuBar()
80+
menuBar.insertMenu(menuBar.actions()[-1], self.menu)
81+
82+
def unload(self):
83+
self.toolbox.setVisible(False)
84+
self.menu.deleteLater()
85+
#delete temporary output files
86+
folder = SextanteUtils.tempFolder()
87+
for f in os.listdir(folder):
88+
path = os.path.join(folder,f)
89+
try:
90+
os.unlink(path)
91+
except:
92+
#leave files that could not be deleted
93+
pass
94+
95+
96+
def openToolbox(self):
97+
self.toolbox.setVisible(True)
98+
99+
def openModeler(self):
100+
dlg = ModelerDialog()
101+
dlg.exec_()
102+
if dlg.update:
103+
self.toolbox.updateTree()
104+
105+
def openResults(self):
106+
dlg = ResultsDialog()
107+
dlg.exec_()
108+
109+
def openHistory(self):
110+
dlg = HistoryDialog()
111+
dlg.exec_()
112+
113+
def openConfig(self):
114+
dlg = ConfigDialog(self.toolbox)
115+
dlg.exec_()
116+
117+
def openAbout(self):
118+
dlg = AboutDialog()
119+
dlg.exec_()
120+
121+
def openHelp(self):
122+
filename = os.path.dirname(__file__) + "/help/index.html"
123+
if os.name == "nt":
124+
os.startfile(filename)
125+
elif sys.platform == "darwin":
126+
subprocess.Popen(('open', filename))
127+
else:
128+
subprocess.call(('xdg-open', filename))
129+
130+

python/plugins/sextante/__init__.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
def name():
2-
return "SEXTANTE"
3-
def description():
4-
return "SEXTANTE Geoprocessing Platform for QGIS"
5-
def version():
6-
return "Version 1.0.7"
7-
def icon():
8-
return "icon.png"
9-
def qgisMinimumVersion():
10-
return "1.0"
11-
def classFactory(iface):
12-
from sextante.SextantePlugin import SextantePlugin
13-
return SextantePlugin(iface)
1+
def name():
2+
return "SEXTANTE"
3+
def description():
4+
return "SEXTANTE Geoprocessing Platform for QGIS"
5+
def version():
6+
return "Version 1.0.7"
7+
def icon():
8+
return "icon.png"
9+
def qgisMinimumVersion():
10+
return "1.0"
11+
def classFactory(iface):
12+
from sextante.SextantePlugin import SextantePlugin
13+
return SextantePlugin(iface)
+36-36
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
from PyQt4 import QtCore, QtGui, QtWebKit
2-
from PyQt4.QtCore import *
3-
from PyQt4.QtGui import *
4-
import os
5-
6-
class AboutDialog(QtGui.QDialog):
7-
8-
def __init__(self):
9-
QtGui.QDialog.__init__(self)
10-
self.setModal(True)
11-
self.setupUi()
12-
13-
def setupUi(self):
14-
self.resize(600, 500)
15-
self.webView = QtWebKit.QWebView()
16-
self.setWindowTitle("About SEXTANTE")
17-
self.verticalLayout= QtGui.QVBoxLayout()
18-
self.verticalLayout.setSpacing(2)
19-
self.verticalLayout.setMargin(0)
20-
self.verticalLayout.addWidget(self.webView)
21-
self.closeButton = QtGui.QPushButton()
22-
self.closeButton.setText("Close")
23-
self.closeButton.setMaximumWidth(150)
24-
self.horizontalLayout= QtGui.QHBoxLayout()
25-
self.horizontalLayout.setSpacing(2)
26-
self.horizontalLayout.setMargin(0)
27-
self.horizontalLayout.addStretch(1000)
28-
self.horizontalLayout.addWidget(self.closeButton)
29-
QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), self.closeWindow)
30-
self.verticalLayout.addLayout(self.horizontalLayout)
31-
self.setLayout(self.verticalLayout)
32-
filename = os.path.dirname(__file__) + "/about.htm"
33-
url = QtCore.QUrl(filename)
34-
self.webView.load(url)
35-
36-
def closeWindow(self):
1+
from PyQt4 import QtCore, QtGui, QtWebKit
2+
from PyQt4.QtCore import *
3+
from PyQt4.QtGui import *
4+
import os
5+
6+
class AboutDialog(QtGui.QDialog):
7+
8+
def __init__(self):
9+
QtGui.QDialog.__init__(self)
10+
self.setModal(True)
11+
self.setupUi()
12+
13+
def setupUi(self):
14+
self.resize(600, 500)
15+
self.webView = QtWebKit.QWebView()
16+
self.setWindowTitle("About SEXTANTE")
17+
self.verticalLayout= QtGui.QVBoxLayout()
18+
self.verticalLayout.setSpacing(2)
19+
self.verticalLayout.setMargin(0)
20+
self.verticalLayout.addWidget(self.webView)
21+
self.closeButton = QtGui.QPushButton()
22+
self.closeButton.setText("Close")
23+
self.closeButton.setMaximumWidth(150)
24+
self.horizontalLayout= QtGui.QHBoxLayout()
25+
self.horizontalLayout.setSpacing(2)
26+
self.horizontalLayout.setMargin(0)
27+
self.horizontalLayout.addStretch(1000)
28+
self.horizontalLayout.addWidget(self.closeButton)
29+
QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), self.closeWindow)
30+
self.verticalLayout.addLayout(self.horizontalLayout)
31+
self.setLayout(self.verticalLayout)
32+
filename = os.path.dirname(__file__) + "/about.htm"
33+
url = QtCore.QUrl(filename)
34+
self.webView.load(url)
35+
36+
def closeWindow(self):
3737
self.close()

0 commit comments

Comments
 (0)