mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
updating help and minor changes for console
This commit is contained in:
parent
c4b74c9266
commit
b2eb1c10e9
BIN
images/console/imgHelpConsole.png
Normal file
BIN
images/console/imgHelpConsole.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
BIN
images/console/imgHelpMenu.png
Normal file
BIN
images/console/imgHelpMenu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.6 KiB |
@ -489,6 +489,8 @@
|
||||
<file>console/iconRunConsole.png</file>
|
||||
<file>console/iconAboutConsole.png</file>
|
||||
<file>console/iconCodepadConsole.png</file>
|
||||
<file>console/imgHelpConsole.png</file>
|
||||
<file>console/imgHelpMenu.png</file>
|
||||
<file>flags/sr_Cyrl.png</file>
|
||||
<file>flags/sr_Latn.png</file>
|
||||
<file>flags/sw.png</file>
|
||||
|
@ -23,7 +23,6 @@ __copyright__ = '(C) 2012, Salvatore Larosa'
|
||||
# This will get replaced with a git SHA1 when you do a git archive
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
from PyQt4.QtWebKit import *
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
from ui_console_help import Ui_Help
|
||||
@ -33,11 +32,10 @@ import os
|
||||
class HelpDialog(QDialog, Ui_Help):
|
||||
def __init__(self, parent):
|
||||
QDialog.__init__(self, parent)
|
||||
self.setModal(True)
|
||||
self.setupUi(self)
|
||||
|
||||
self.setWindowTitle(QCoreApplication.translate("PythonConsole","Help Python Console"))
|
||||
self.setMaximumSize(500, 300)
|
||||
self.setMaximumSize(530, 300)
|
||||
|
||||
qgisDataDir = QgsApplication.pkgDataPath()
|
||||
listFile = os.listdir(qgisDataDir + "/python/console/console_help/i18n")
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>519</width>
|
||||
<height>328</height>
|
||||
<width>555</width>
|
||||
<height>363</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -62,22 +62,6 @@
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>Help</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
@ -85,12 +69,12 @@
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
<x>259</x>
|
||||
<y>310</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
<x>259</x>
|
||||
<y>163</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
@ -8,18 +8,29 @@
|
||||
|
||||
<style>
|
||||
body{
|
||||
font-family: verdana,arial,helvetica,sans-serif;
|
||||
/*font-family:Verdana,Geneva,sans-serif;*/
|
||||
font-family: 'Trebuchet MS', sans-serif;
|
||||
font-size : 12px;
|
||||
}
|
||||
#header{
|
||||
background: #cccccc;
|
||||
background: #f6f6f6;
|
||||
border-bottom: 3px solid #000;
|
||||
width: 100%;
|
||||
}
|
||||
#headerTool td{
|
||||
background: #f6f6f6;
|
||||
/*width: 100%;*/
|
||||
}
|
||||
._titleP {
|
||||
padding: 5px;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
._title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -29,22 +40,45 @@
|
||||
<img src="qrc:/images/console/imgHelpDialog.png" />
|
||||
</td>
|
||||
<td>
|
||||
<h2 id="headerTitle">Python Console for QGIS</h2>
|
||||
<span id="headerTitle" class="_title">Python Console for QGIS</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p align="justify">
|
||||
<span id="headerSubject">Python Console based on PyQScintilla2.</span>
|
||||
<br><br>
|
||||
<span id="headerSubjectMain">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.</span>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="qrc:/images/console/imgHelpConsole.png" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p align="justify">
|
||||
<span id="">The console is splitted in two main panes, output and input areas.
|
||||
Both are resizable by using the horizontal splitter.
|
||||
Output area pane is a widget read-only which shows the commands output.
|
||||
You can drag and drop or copy text into input area (no matter if selected text contains >>> or ...).
|
||||
Use 'Share on codepad' from contextual menu for sharing snippets code.
|
||||
The context menu looks like the image below.<br><br>
|
||||
<img src="qrc:/images/console/imgHelpMenu.png"><br>
|
||||
Input area pane is the interactive python shell for input commands.</span>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p align="justify">
|
||||
<span id="headerSubject">Python Console based on PyQScintilla2.</span>
|
||||
<br><br>
|
||||
<span id="headerSubjectMain">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.</span>
|
||||
</p>
|
||||
<table id="header">
|
||||
<tr>
|
||||
<td>
|
||||
<h4 id="features">Features</h4>
|
||||
<span id="features" class="_titleP">Features</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -86,7 +120,7 @@
|
||||
<table id="header">
|
||||
<tr>
|
||||
<td>
|
||||
<h4 id="toolbar">Toolbar</h4>
|
||||
<span id="toolbar" class="_titleP">Toolbar</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -139,17 +173,6 @@
|
||||
<td colspan="2"><span id="toolbarRun">Run command (like Enter key pressed)</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table id="header">
|
||||
<tr>
|
||||
<td>
|
||||
<h4 id="thanks">Acknowledgments</h4>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<span id="thanksText">Thanks to Larry Shaffer who provided the API files.</span>
|
||||
</p>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
var parameter = window.location.search.replace( "?", "" );
|
||||
|
@ -158,6 +158,7 @@ class EditorOutput(QsciScintilla):
|
||||
#self.SendScintilla(QsciScintilla.SCI_CLEARALL)
|
||||
self.setText('')
|
||||
self.insertInitText()
|
||||
self.edit.setFocus()
|
||||
|
||||
def contextMenuEvent(self, e):
|
||||
menu = QMenu(self)
|
||||
@ -191,7 +192,7 @@ class EditorOutput(QsciScintilla):
|
||||
runAction.setEnabled(True)
|
||||
copyAction.setEnabled(True)
|
||||
pastebinAction.setEnabled(True)
|
||||
if not self.text() == '':
|
||||
if not self.text(3) == '':
|
||||
selectAllAction.setEnabled(True)
|
||||
clearAction.setEnabled(True)
|
||||
action = menu.exec_(self.mapToGlobal(e.pos()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user