Skip to content
Permalink
Browse files

python fixes:

- update sip bindings (including QgsRasterPipe and QgsOWSSourceSelect)
- helpConsole: show icons from resources
  • Loading branch information
jef-n committed Oct 5, 2012
1 parent b326276 commit 3c525fdf30fd78cf01829362ee28d9ee47ba1801
@@ -335,7 +335,7 @@ class QgsRasterLayer : QgsMapLayer
QList< QPair< QString, QColor > > legendSymbologyItems() const;

/** \brief Get a legend image for this layer */
QPixmap legendAsPixmap();
QPixmap legendAsPixmap() /Deprecated/;

/** \brief Overloaded version of above function that can print layer name onto legend */
QPixmap legendAsPixmapBool( bool ) /Deprecated/;
@@ -481,7 +481,7 @@ class QgsRasterLayer : QgsMapLayer
/** \brief Draws a thumbnail of the rasterlayer into the supplied QImage pointer
* @note added in QGIS 1.6
* */
/* void thumbnailAsImage( QImage * thepImage ); */
/* void thumbnailAsImage( QImage * thepImage ) /Deprecated/; */

/** \brief Emit a signal asking for a repaint. (inherited from maplayer) */
void triggerRepaint();
@@ -29,6 +29,16 @@ class QgsRasterPipe
/** Try to insert interface at specified index and connect
* if connection would fail, the interface is not inserted and false is returned */
bool insert( int idx, QgsRasterInterface* theInterface /Transfer/ );
%MethodCode
sipRes = sipCpp->insert( a0, a1 );
if( !sipRes )
{
// if insertion failed transfer ownership back to python
PyObject *o = sipGetPyObject( a1, sipType_QgsRasterInterface );
if( o )
sipTransferBreak( o );
}
%End

/** Try to replace interface at specified index and connect
* if connection would fail, the interface is not inserted and false is returned */
@@ -32,6 +32,7 @@ class QgisInterface : QObject

public slots: // TODO: do these functions really need to be slots?

/* Exposed functions */
/** Set the app font size
* @param fontSize point size of font
* @note added in 2.0
@@ -106,9 +106,15 @@ class QgsOWSSourceSelect : QDialog
//! Set supported CRSs
void populateCRS();

//! Clear CRSs
void clearCRS();

//! Populate times
void populateTimes();

//! Clear times
void clearTimes();

//! Connection name
QString connName();

@@ -154,4 +160,8 @@ class QgsOWSSourceSelect : QDialog

//! Returns currently selected time
QString selectedTime();

//! Returns currently selected cache load control
QNetworkRequest::CacheLoadControl selectedCacheLoadControl();

};
@@ -1,5 +1,5 @@
<!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">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "httpqrc://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="httpqrc://www.w3.org/1999/xhtml">
<head>
<title>Help Python Console</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@@ -26,7 +26,7 @@
<table id="header">
<tr>
<td>
<img src="../iconConsole/imgHelpDialog.png" />
<img src="qrc:/iconConsole/imgHelpDialog.png" />
</td>
<td>
<h2 id="headerTitle">Python Console for QGIS</h2>
@@ -87,35 +87,35 @@ <h4 id="toolbar">Toolbar</h4>
<p><span id="toolbarTitle">The following is a description of the tools in the toolbar:</span></p>
<table width="100%" border="0" id="headerTool">
<tr>
<td><img src="../iconConsole/iconClearConsole.png" /></td>
<td><img src="qrc:/images/console/iconClearConsole.png" /></td>
<td colspan="2"><span id="toolbarClear">Tool to clear python console</span></td>
</tr>
<tr>
<td><img src="../iconConsole/iconClassConsole.png" /></td>
<td><img src="../iconConsole/iconIfaceConsole.png" /></td>
<td><img src="qrc:/images/console/iconClassConsole.png" /></td>
<td><img src="qrc:/images/console/iconIfaceConsole.png" /></td>
<td><span id="toolbarIfaceClass">Tool to import iface class</span></td>
</tr>
<tr>
<td></td>
<td><img src="../iconConsole/iconSextanteConsole.png" /></td>
<td><img src="qrc:/images/console/iconSextanteConsole.png" /></td>
<td><span id="toolbarSextClass">Tool to import Sextante class</span></td>
</tr>
<tr>
<td><img src="../iconConsole/iconScriptConsole.png" /></td>
<td><img src="../iconConsole/iconOpenConsole.png" /></td>
<td><img src="qrc:/images/console/iconScriptConsole.png" /></td>
<td><img src="qrc:/images/console/iconOpenConsole.png" /></td>
<td><span id="toolbarScriptOpen">Tool to open a python script and load in console</span></td>
</tr>
<tr>
<td></td>
<td><img src="../iconConsole/iconSaveConsole.png" /></td>
<td><img src="qrc:/images/console/iconSaveConsole.png" /></td>
<td><span id="toolbarScriptSave">Tool to save a python script</span></td>
</tr>
<tr>
<td><img src="../iconConsole/iconHelpConsole.png" /></td>
<td><img src="qrc:/images/console/iconHelpConsole.png" /></td>
<td colspan="2"><span id="toolbarHelp">Help</span></td>
</tr>
<tr>
<td><img src="../iconConsole/iconRunConsole.png" /></td>
<td><img src="qrc:/images/console/iconRunConsole.png" /></td>
<td colspan="2"><span id="toolbarRun">Run command (like Enter key pressed)</span></td>
</tr>
</table>
@@ -155,4 +155,4 @@ <h4 id="thanks">Acknowledgments</h4>
encode.src = "js/encoding.js";
document.body.appendChild(encode);
</script>
</html>
</html>

0 comments on commit 3c525fd

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