Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed bug when using multiple layers in saga (#5652) git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@198 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
- Loading branch information
volayaf
committed
May 31, 2012
1 parent
d2c7008
commit ce52bb5
Showing
8 changed files
with
108 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
v.to.rast | ||
v.to.rast.attribute | ||
Vector (v.*) | ||
ParameterVector|input|input|-1|False | ||
ParameterSelection|use|use|attr | ||
ParameterTableField|column|column|input | ||
OutputRaster|output|output |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
v.to.rast | ||
v.to.rast.value | ||
Vector (v.*) | ||
ParameterVector|input|input|-1|False | ||
ParameterSelection|use|use|val | ||
ParameterNumber|value|value|None|None|1 | ||
OutputRaster|output|output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,38 @@ | ||
import os | ||
from sextante.gui.InteractiveHTMLViewerDialog import InteractiveHTMLViewerDialog | ||
class ExternalAppsConfigurer(): | ||
|
||
@staticmethod | ||
def configure(): | ||
def configure(self): | ||
#TODO find a way of automating this, not having to add each provider here manually | ||
settings = {} | ||
folders = self.findFolder("c:\\","saga") | ||
settings["SAGA binaries folder"] = folders | ||
folders['SAGA'] = settings | ||
|
||
pass | ||
html = "" | ||
for key in settings.keys(): | ||
html += self.createHTMLSection(settings[key], key) | ||
|
||
def folderFinder(self, s): | ||
pass | ||
dialog = InteractiveHTMLViewerDialog(html, self) | ||
dialog.exec_() | ||
|
||
def findFolder(self, head, name): | ||
name = name.upper() | ||
found = [] | ||
for root, dirs, files in os.walk(head): | ||
for d in dirs: | ||
if d.upper().endswith(name): | ||
found.append(os.path.join(root, d)) | ||
return found | ||
|
||
def createHTMLSection(self, settings, name): | ||
html = "<h2>" + name.upper() + "</h2>\n" | ||
html += "<ul>\n" | ||
for key, setting in settings.items(): | ||
html += "<li>" + key + " : " + setting[0] + "</li>\n" | ||
if len(setting) > 1: | ||
html += "<ul>\n" | ||
for i in range(1, len(setting)): | ||
html += "<li><a href=\"" + key + "|" + str(i) + ">" + setting[i] + "</a></li>\n" | ||
html += "<ul>\n" | ||
html += "<ul>\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
from PyQt4 import QtCore, QtGui, QtWebKit | ||
from PyQt4.QtCore import * | ||
from PyQt4.QtGui import * | ||
|
||
class InteractiveHTMLViewerDialog(QtGui.QDialog): | ||
|
||
def __init__(self, html, linkHandler): | ||
QtGui.QDialog.__init__(self) | ||
self.html = html | ||
self.linkHandler = linkHandler | ||
self.setModal(True) | ||
self.setupUi() | ||
|
||
def setupUi(self): | ||
self.resize(600, 500) | ||
self.webView = QtWebKit.QWebView() | ||
self.webView.page().setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateAllLinks) | ||
self.setWindowTitle("Help") | ||
self.closeButton = QtGui.QPushButton() | ||
self.closeButton.setText("Close") | ||
self.closeButton.setMaximumWidth(150) | ||
self.horizontalLayout= QtGui.QHBoxLayout() | ||
self.horizontalLayout.setSpacing(2) | ||
self.horizontalLayout.setMargin(0) | ||
self.horizontalLayout.addStretch(1000) | ||
self.horizontalLayout.addWidget(self.closeButton) | ||
self.verticalLayout= QtGui.QVBoxLayout() | ||
self.verticalLayout.setSpacing(2) | ||
self.verticalLayout.setMargin(0) | ||
self.verticalLayout.addWidget(self.webView) | ||
self.verticalLayout.addLayout(self.horizontalLayout) | ||
self.setLayout(self.verticalLayout) | ||
QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), self.closeWindow) | ||
QObject.connect(self.webView, SIGNAL("linkClicked(const QUrl&)"), self.linkClicked) | ||
try: | ||
url = QtCore.QUrl(self.filename) | ||
self.webView.load(url) | ||
except: | ||
pass | ||
|
||
def linkClicked(self, url): | ||
pass | ||
|
||
|
||
def closeWindow(self): | ||
self.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters