I hereby claim:
- I am nathanw2 on github.
- I am nathanw (https://keybase.io/nathanw) on keybase.
- I have a public key whose fingerprint is B849 7CA0 ADD2 5303 8919 A42B E6AE 465E EFAF DFAE
To claim this, I am signing this object:
| bool enableMove = false, enableRotate = false, enablePin = false, enableShowHide = false, enableChange = false; | |
| QMap<QString, QgsMapLayer*> layers = QgsMapLayerRegistry::instance()->mapLayers(); | |
| for ( QMap<QString, QgsMapLayer*>::iterator it = layers.begin(); it != layers.end(); ++it ) | |
| { | |
| QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( it.value() ); | |
| if ( !vlayer || !vlayer->isEditable() || | |
| ( !vlayer->diagramsEnabled() && !vlayer->labelsEnabled() ) ) | |
| continue; |
| from PyQt4.QtCore import QPointF, QRectF, QTimer, QObject, pyqtProperty, QPropertyAnimation, Qt | |
| from PyQt4.QtGui import QPainter, QBrush, QColor | |
| from qgis.gui import QgsMapCanvasItem | |
| from qgis.core import QgsPoint | |
| class PingLocationMarker(QgsMapCanvasItem): | |
| """ | |
| Position marker for the current location in the viewer. | |
| """ | |
| class AniObject(QObject): |
| import requests | |
| import base64 | |
| @qgsfunction(args='auto', group='Custom') | |
| def show_camera(feed, feature, parent): | |
| svg = """ | |
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| <svg> | |
| <g> | |
| <image xlink:href="data:image/jpeg;base64,{0}" height="256" width="320" /> |
I hereby claim:
To claim this, I am signing this object:
| class MyInterface: | |
| def method1(self, arg): | |
| pass | |
| def method2(self, arg): | |
| pass | |
| class MyObject(MyInterface): | |
| def method1(self, arg): |
| @ECHO OFF | |
| REM --------------------------------------------------------------------------------------- | |
| REM Change %OSGEO4W_ROOT% in setenv.bat to change in the location of QGIS. | |
| REM --------------------------------------------------------------------------------------- | |
| for %%x in (%cmdcmdline%) do if /i "%%~x"=="/c" set DOUBLECLICKED=1 | |
| REM Change OSGeo4W_ROOT to point to your install of QGIS. |
| from PyQt4.QtGui import * | |
| tab = QTabWidget() | |
| mainwidget = iface.mainWindow().centralWidget().findChild(QStackedWidget) | |
| mainwidget.layout().addWidget(tab) | |
| tab.addTab(iface.mapCanvas(), "Canvas") | |
| py = iface.mainWindow().findChild(QDockWidget, 'PythonConsole') | |
| widget = py.widget() | |
| editor = widget.findChild(QWidget, "EditorWidget") |
| QGraphicsOpacityEffect *effect = new QGraphicsOpacityEffect(); | |
| ui->label->setGraphicsEffect(effect); | |
| QPropertyAnimation *anim = new QPropertyAnimation(effect,"opacity"); | |
| anim->setDuration(1000); | |
| anim->setStartValue(1.0); | |
| anim->setEndValue(0.0); | |
| anim->setEasingCurve(QEasingCurve::OutQuad); |
| from qgis.core import * | |
| from qgis.gui import * | |
| @qgsfunction(args=-1, group='Custom') | |
| def max_name(fields, feature, parent): | |
| realindex = [feature.fieldNameIndex(field) for field in fields] | |
| values = [feature[field] for field in fields] | |
| index = values.index(max(values)) | |
| index = realindex[index] | |
| return feature.fields()[index].name() |
| from PyQt4.QtCore import QThread, QObject, pyqtSignal | |
| class Worker(QObject): | |
| done = pyqtSignal() | |
| finalResult = pyqtSignal(int) | |
| def __init__(self, parent=None): | |
| super(Worker, self).__init__(parent) | |
| def do_stuff(self): |