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.edit import edit, QgsEditError
|
|
|
|
from .additions.fromfunction import fromFunction
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
from .additions.markerlinesymbollayer import *
|
2018-05-18 06:47:18 -08:00
|
|
|
from .additions.metaenum import metaEnumFromType, metaEnumFromValue
|
2018-05-14 11:30:27 -04:00
|
|
|
from .additions.processing import processing_output_layer_repr, processing_source_repr
|
2018-05-16 11:29:28 -04:00
|
|
|
from .additions.projectdirtyblocker import ProjectDirtyBlocker
|
|
|
|
from .additions.qgsfeature import mapping_feature
|
|
|
|
from .additions.qgsfunction import register_function, qgsfunction
|
|
|
|
from .additions.qgsgeometry import _geometryNonZero, mapping_geometry
|
2018-06-21 06:11:45 -04:00
|
|
|
from .additions.qgssettings import _qgssettings_enum_value, _qgssettings_set_enum_value, _qgssettings_flag_value
|
2018-05-16 11:29:28 -04:00
|
|
|
from .additions.qgstaskwrapper import QgsTaskWrapper
|
|
|
|
from .additions.readwritecontextentercategory import ReadWriteContextEnterCategory
|
2019-01-10 14:52:01 +10:00
|
|
|
from .additions.validitycheck import check
|
2018-05-14 11:30:27 -04:00
|
|
|
|
|
|
|
# Injections into classes
|
2018-05-16 11:29:28 -04:00
|
|
|
QgsFeature.__geo_interface__ = property(mapping_feature)
|
|
|
|
QgsGeometry.__bool__ = _geometryNonZero
|
|
|
|
QgsGeometry.__geo_interface__ = property(mapping_geometry)
|
|
|
|
QgsGeometry.__nonzero__ = _geometryNonZero
|
2017-06-11 19:35:43 +10:00
|
|
|
QgsProcessingFeatureSourceDefinition.__repr__ = processing_source_repr
|
|
|
|
QgsProcessingOutputLayerDefinition.__repr__ = processing_output_layer_repr
|
2018-05-16 11:29:28 -04:00
|
|
|
QgsProject.blockDirtying = ProjectDirtyBlocker
|
|
|
|
QgsReadWriteContext.enterCategory = ReadWriteContextEnterCategory
|
2018-05-18 09:25:12 -08:00
|
|
|
QgsSettings.enumValue = _qgssettings_enum_value
|
2018-06-21 06:11:45 -04:00
|
|
|
QgsSettings.setEnumValue = _qgssettings_set_enum_value
|
2018-05-18 09:25:12 -08:00
|
|
|
QgsSettings.flagValue = _qgssettings_flag_value
|
2018-05-16 11:29:28 -04:00
|
|
|
QgsTask.fromFunction = fromFunction
|