Skip to content
Permalink
Browse files

use QDesktopServices to open help files

  • Loading branch information
alexbruy committed Oct 4, 2012
1 parent 4475854 commit 4e02cfbab7bfecd1b9e9e7977a328c38dfeaa4c1
Showing with 28 additions and 28 deletions.
  1. +2 −9 python/plugins/sextante/SextantePlugin.py
  2. +26 −19 python/plugins/sextante/about/AboutDialog.py
@@ -1,6 +1,5 @@
import os, sys
import inspect
import subprocess

from PyQt4.QtCore import *
from PyQt4.QtGui import *
@@ -122,14 +121,8 @@ def openConfig(self):
dlg.exec_()

def openAbout(self):
dlg = AboutDialog(self)
dlg = AboutDialog()
dlg.exec_()

def openHelp(self):
filename = os.path.dirname(__file__) + "/help/index.html"
if os.name == "nt":
os.startfile(filename)
elif sys.platform == "darwin":
subprocess.Popen(('open', filename))
else:
subprocess.call(('xdg-open', filename))
QDesktopServices.openUrl(QUrl(os.path.dirname(__file__) + "/help/index.html"))
@@ -10,30 +10,37 @@

class AboutDialog(QDialog, Ui_DlgAbout):

def __init__(self, parent):
def __init__(self):
QDialog.__init__(self)
self.setupUi(self)

self.buttonBox.helpRequested.connect(self.openHelp)

self.setAboutText()

def setAboutText(self):
strAbout = self.tr("""
<img src="qrc:/sextante/images/sextante_logo.png" />
<h2>SEXTANTE for QGIS</h2>
<p>SEXTANTE, a geoprocessing platform for QGIS</p>
<p>A development by Victor Olaya (volayaf@gmail.com).</p>
<p>Portions of this software contributed by:
<ul>
<li>Alexander Bruy</li>
<li>Carson Farmer (fTools algorithms)</li>
<li>Julien Malik (Orfeo Toolbox connectors)</li>
<li>Evgeniy Nikulin (Original Field Pyculator code)</li>
<li>Michael Nimm (mmqgis algorithms)</li>
<li>Camilo Polymeris (Threading). Developed as part of Google Summer of Code 2012</li>
</ul>
</p>
<p>You are currently using SEXTANTE v%1</p>
<p>This software is distributed under the terms of the GNU GPL License v2.
<p>For more information, please visit our website at <a href="http://sextantegis.com">http://sextantegis.com</a></p>
""").arg(version())
<img src="qrc:/sextante/images/sextante_logo.png" />
<h2>SEXTANTE for QGIS</h2>
<p>SEXTANTE, a geoprocessing platform for QGIS</p>
<p>A development by Victor Olaya (volayaf@gmail.com).</p>
<p>Portions of this software contributed by:
<ul>
<li>Alexander Bruy</li>
<li>Carson Farmer (fTools algorithms)</li>
<li>Julien Malik (Orfeo Toolbox connectors)</li>
<li>Evgeniy Nikulin (Original Field Pyculator code)</li>
<li>Michael Nimm (mmqgis algorithms)</li>
<li>Camilo Polymeris (Threading). Developed as part of Google
Summer of Code 2012</li>
</ul>
</p>
<p>You are currently using SEXTANTE v%1</p>
<p>This software is distributed under the terms of the GNU GPL License v2.
<p>For more information, please visit our website at
<a href="http://sextantegis.com">http://sextantegis.com</a></p>
""").arg(version())
self.webView.setHtml(strAbout)

def openHelp(self):
QDesktopServices.openUrl(QUrl(os.path.join(os.path.dirname(__file__), os.path.pardir) + "/help/index.html"))

0 comments on commit 4e02cfb

Please sign in to comment.
You can’t perform that action at this time.