Skip to content
Permalink
Browse files

Merge pull request #325 from slarosa/master

Updating help and minor changes for console
  • Loading branch information
brushtyler committed Nov 11, 2012
2 parents c4b74c9 + b2eb1c1 commit badeeae6d9f45d1deb5e87850078ac11c6ffef48
Binary file not shown.
Binary file not shown.
@@ -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 @@
# 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 @@
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,35 +62,19 @@
</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>
<receiver>Help</receiver>
<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 @@ <h4 id="features">Features</h4>
<table id="header">
<tr>
<td>
<h4 id="toolbar">Toolbar</h4>
<span id="toolbar" class="_titleP">Toolbar</span>
</td>
</tr>
</table>
@@ -139,17 +173,6 @@ <h4 id="toolbar">Toolbar</h4>
<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 @@ def clearConsole(self):
#self.SendScintilla(QsciScintilla.SCI_CLEARALL)
self.setText('')
self.insertInitText()
self.edit.setFocus()

def contextMenuEvent(self, e):
menu = QMenu(self)
@@ -191,7 +192,7 @@ def contextMenuEvent(self, e):
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()))

0 comments on commit badeeae

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