| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| from PyQt4 import QtCore, QtGui, QtWebKit | ||
| from PyQt4.QtCore import * | ||
| from PyQt4.QtGui import * | ||
| import os | ||
|
|
||
| class HelpDialog(QtGui.QDialog): | ||
|
|
||
| def __init__(self): | ||
| QtGui.QDialog.__init__(self) | ||
| self.setModal(True) | ||
| self.setupUi() | ||
|
|
||
| def setupUi(self): | ||
| self.resize(500, 300) | ||
| self.webView = QtWebKit.QWebView() | ||
| self.setWindowTitle("Help Python Console") | ||
| self.verticalLayout= QtGui.QVBoxLayout() | ||
| self.verticalLayout.setSpacing(2) | ||
| self.verticalLayout.setMargin(0) | ||
| self.verticalLayout.addWidget(self.webView) | ||
| 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) | ||
| QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), self.closeWindow) | ||
| self.verticalLayout.addLayout(self.horizontalLayout) | ||
| self.setLayout(self.verticalLayout) | ||
| filename = os.path.dirname(__file__) + "/helpConsole/help.htm" | ||
| url = QtCore.QUrl(filename) | ||
| self.webView.load(url) | ||
|
|
||
| def closeWindow(self): | ||
| self.close() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| FILE(GLOB HTML_FILES *.htm) | ||
| INSTALL(FILES ${HTML_FILES} DESTINATION ${QGIS_PYTHON_DIR}/helpConsole) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| <head> | ||
| <title>Help Python Console</title> | ||
| <style> | ||
| body{ | ||
| font-family: verdana,arial,helvetica,sans-serif; | ||
| /*font-family:Verdana,Geneva,sans-serif;*/ | ||
| font-size : 12px; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <table> | ||
| <tr> | ||
| <td> | ||
| <img src="../iconConsole/imgHelpDialog.png" /> | ||
| </td> | ||
| <td> | ||
| <h2>Python Console for QGIS</h2> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
| <p align="justify"> | ||
| To access Quantum GIS environment from this console | ||
| use qgis.utils.iface object (instance of QgisInterface class). | ||
| To import the class QgisInterface can also use the dedicated | ||
| button on the toolbar on the left. | ||
| <br><br> | ||
| The following is a description of the tools in the toolbar: | ||
| </p> | ||
| <table width="100%" bordercolor="#000" border="1"> | ||
| <tr> | ||
| <td><img src="../iconConsole/iconClearConsole.png" /></td> | ||
| <td>Tool to clear python console</td> | ||
| </tr> | ||
| <tr> | ||
| <td><img src="../iconConsole/iconTempConsole.png" /></td> | ||
| <td>Tool to import iface class</td> | ||
| </tr> | ||
| <tr> | ||
| <td><img src="../iconConsole/iconOpenConsole.png" /></td> | ||
| <td>Tool to open a python script and load in console</td> | ||
| </tr> | ||
| <tr> | ||
| <td><img src="../iconConsole/iconSaveConsole.png" /></td> | ||
| <td>Tool to save a python script</td> | ||
| </tr> | ||
| <tr> | ||
| <td><img src="../iconConsole/iconHelpConsole.png" /></td> | ||
| <td>This! ;-)</td> | ||
| </tr> | ||
| <tr> | ||
| <td><img src="../iconConsole/iconRunConsole.png" /></td> | ||
| <td>Run commnand (like Enter key pressed)</td> | ||
| </tr> | ||
| </table> | ||
| </body> | ||
| </html> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| SET(ICON_FILES | ||
| iconClearConsole.png | ||
| iconOpenConsole.png | ||
| iconRunConsole.png | ||
| iconTempConsole.png | ||
| iconSaveConsole.png | ||
| iconHelpConsole.png | ||
| imgHelpDialog.png | ||
| ) | ||
|
|
||
| FILE(GLOB ICON_FILES *.png) | ||
| INSTALL(FILES ${ICON_FILES} DESTINATION ${QGIS_PYTHON_DIR}/iconConsole) |