2016-01-08 21:31:41 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
"""
|
|
|
|
***************************************************************************
|
|
|
|
__init__.py
|
|
|
|
---------------------
|
|
|
|
Date : May 2014
|
|
|
|
Copyright : (C) 2014 by Nathan Woodrow
|
|
|
|
Email : woodrow dot nathan at gmail dot com
|
|
|
|
***************************************************************************
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
***************************************************************************
|
|
|
|
"""
|
|
|
|
|
|
|
|
__author__ = 'Nathan Woodrow'
|
|
|
|
__date__ = 'May 2014'
|
|
|
|
__copyright__ = '(C) 2014, Nathan Woodrow'
|
|
|
|
# This will get replaced with a git SHA1 when you do a git archive
|
|
|
|
__revision__ = '$Format:%H$'
|
|
|
|
|
2018-05-14 19:53:02 -04:00
|
|
|
from qgis.PyQt.QtCore import NULL
|
2014-05-19 21:40:26 +10:00
|
|
|
from qgis._core import *
|
2014-11-29 18:37:23 +10:00
|
|
|
|
2018-05-14 11:30:27 -04:00
|
|
|
from .additions.readwritecontextentercategory import ReadWriteContextEnterCategory
|
|
|
|
from .additions.projectdirtyblocker import ProjectDirtyBlocker
|
|
|
|
from .additions.qgstaskwrapper import QgsTaskWrapper
|
|
|
|
from .additions.qgsfunction import register_function, qgsfunction
|
|
|
|
from .additions.edit import edit, QgsEditError
|
|
|
|
from .additions.fromfunction import fromFunction
|
|
|
|
from .additions.processing import processing_output_layer_repr, processing_source_repr
|
|
|
|
from .additions.qgsgeometry import _geometryNonZero
|
|
|
|
from .additions.qgsdefaultvalue import _isValid
|
|
|
|
|
|
|
|
# Injections into classes
|
2016-08-02 08:39:58 +10:00
|
|
|
QgsGeometry.__nonzero__ = _geometryNonZero
|
|
|
|
QgsGeometry.__bool__ = _geometryNonZero
|
2017-09-26 13:35:44 +02:00
|
|
|
QgsDefaultValue.__bool__ = _isValid
|
2018-02-27 21:32:45 -04:00
|
|
|
QgsReadWriteContext.enterCategory = ReadWriteContextEnterCategory
|
2018-03-09 11:54:57 +10:00
|
|
|
QgsProject.blockDirtying = ProjectDirtyBlocker
|
2016-12-05 11:49:11 +10:00
|
|
|
QgsTask.fromFunction = fromFunction
|
2017-06-11 19:35:43 +10:00
|
|
|
QgsProcessingFeatureSourceDefinition.__repr__ = processing_source_repr
|
|
|
|
QgsProcessingOutputLayerDefinition.__repr__ = processing_output_layer_repr
|