This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def testIntersection(self): | |
| myLine = QgsGeometry.fromPolyline([QgsPoint(0, 0),QgsPoint(1, 1),QgsPoint(2, 2)]) | |
| myPoint = QgsGeometry.fromPoint(QgsPoint(1, 1)) | |
| intersectionGeom = QgsGeometry.intersection(myLine, myPoint) | |
| myMessage = ('Expected:\n%s\nGot:\n%s\n' % | |
| (QGis.Point, intersectionGeom.type())) | |
| assert intersectionGeom.wkbType() == QGis.WKBPoint, myMessage | |
| def testBuffer(self): | |
| myPoint = QgsGeometry.fromPoint(QgsPoint(1, 1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from PyQt4 import QtGui, QtCore | |
| app = QtGui.QApplication(sys.argv) | |
| lineEdit = QtGui.QLineEdit() | |
| completer = QtGui.QCompleter(['QgsVectorLayer', 'QgsRasterLayer']) | |
| lineEdit.setCompleter(completer) | |
| lineEdit.show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def paste(self): | |
| """Reimplement QScintilla method""" | |
| stringPaste = unicode(QApplication.clipboard().text()) | |
| self.insertFromDropPaste(stringPaste) | |
| def dropEvent(self, e): | |
| if e.mimeData().hasText(): | |
| stringDrag = e.mimeData().text() | |
| self.insertFromDropPaste(stringDrag) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| /*************************************************************************** | |
| Lizmap | |
| A QGIS plugin | |
| Publication plugin for Lizmap web application, by 3liz.com | |
| ------------------- | |
| begin : 2011-11-01 | |
| copyright : (C) 2011 by 3liz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // add default base layer | |
| baseLayerDefault = baselayers[0] | |
| map.addLayer(baseLayerDefault); | |
| select.push('<input type="radio" name="baselayers" value="'+baseLayerDefault.name+'">'+baseLayerDefault.name+'</input>'); | |
| for (var i=1,len=baselayers.length; i<len; i++) { | |
| var baselayer = baselayers[i] | |
| baselayer.units = projection.proj.units; | |
| map.addLayer(baselayer); | |
| var blConfig = config.layers[baselayer.name]; | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.extend(PM, | |
| { | |
| Custom: { | |
| showGroupInfo: function(nome_layer){ | |
| var nome = nome_layer.replace(/ligrp_/, ''); | |
| var server = window.location.hostname; | |
| var Url = 'http://www.google.it/?search='+nome+'; | |
| window.location.href = URL; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/python/console/console.py b/python/console/console.py | |
| index 6dd69f1..670e3a3 100644 | |
| --- a/python/console/console.py | |
| +++ b/python/console/console.py | |
| @@ -340,6 +340,7 @@ class PythonConsoleWidget(QWidget): | |
| sF.write('\n') | |
| sF.write(s) | |
| sF.close() | |
| + self.callWidgetMessageBar('Script was correctly saved.') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/python/console/console_editor.py b/python/console/console_editor.py | |
| index cdf79cb..06c5342 100644 | |
| --- a/python/console/console_editor.py | |
| +++ b/python/console/console_editor.py | |
| @@ -602,11 +602,12 @@ class Editor(QsciScintilla): | |
| return True | |
| def keyPressEvent(self, e): | |
| - t = unicode(e.text()) | |
| - ## Close bracket automatically |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/app/qgsaddattrdialog.cpp b/src/app/qgsaddattrdialog.cpp | |
| index c21e204..b32cb00 100644 | |
| --- a/src/app/qgsaddattrdialog.cpp | |
| +++ b/src/app/qgsaddattrdialog.cpp | |
| @@ -61,7 +61,7 @@ void QgsAddAttrDialog::on_mTypeBox_currentIndexChanged( int idx ) | |
| mLength->setMinimum( mTypeBox->itemData( idx, Qt::UserRole + 2 ).toInt() ); | |
| mLength->setMaximum( mTypeBox->itemData( idx, Qt::UserRole + 3 ).toInt() ); | |
| - mLength->setVisible( mLength->minimum() < mLength->maximum() ); | |
| + mLength->setEnabled( mLength->minimum() < mLength->maximum() ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/app/qgsaddattrdialog.cpp b/src/app/qgsaddattrdialog.cpp | |
| index c21e204..b32cb00 100644 | |
| --- a/src/app/qgsaddattrdialog.cpp | |
| +++ b/src/app/qgsaddattrdialog.cpp | |
| @@ -61,7 +61,7 @@ void QgsAddAttrDialog::on_mTypeBox_currentIndexChanged( int idx ) | |
| mLength->setMinimum( mTypeBox->itemData( idx, Qt::UserRole + 2 ).toInt() ); | |
| mLength->setMaximum( mTypeBox->itemData( idx, Qt::UserRole + 3 ).toInt() ); | |
| - mLength->setVisible( mLength->minimum() < mLength->maximum() ); | |
| + mLength->setEnabled( mLength->minimum() < mLength->maximum() ); | |
| if ( mLength->value() < mLength->minimum() ) |
OlderNewer