mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			103 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			103 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
# -*- 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'
 | 
						|
 | 
						|
from qgis.PyQt import QtCore
 | 
						|
from qgis._gui import *
 | 
						|
from qgis.core import Qgis as _Qgis
 | 
						|
from .additions.qgssettingsenumflageditorwrapper import PyQgsSettingsEnumEditorWidgetWrapper
 | 
						|
 | 
						|
@MONKEYPATCH_INJECTIONS@
 | 
						|
 | 
						|
# monkey patching scoped based enum
 | 
						|
QgsMapToolCapture.CaptureTechnique = _Qgis.CaptureTechnique
 | 
						|
QgsMapToolCapture.StraightSegments = _Qgis.CaptureTechnique.StraightSegments
 | 
						|
QgsMapToolCapture.StraightSegments.is_monkey_patched = True
 | 
						|
QgsMapToolCapture.StraightSegments.__doc__ = "Default capture mode - capture occurs with straight line segments"
 | 
						|
QgsMapToolCapture.CircularString = _Qgis.CaptureTechnique.CircularString
 | 
						|
QgsMapToolCapture.CircularString.is_monkey_patched = True
 | 
						|
QgsMapToolCapture.CircularString.__doc__ = "Capture in circular strings"
 | 
						|
QgsMapToolCapture.Streaming = _Qgis.CaptureTechnique.Streaming
 | 
						|
QgsMapToolCapture.Streaming.is_monkey_patched = True
 | 
						|
QgsMapToolCapture.Streaming.__doc__ = "Streaming points digitizing mode (points are automatically added as the mouse cursor moves)."
 | 
						|
QgsMapToolCapture.Shape = _Qgis.CaptureTechnique.Shape
 | 
						|
QgsMapToolCapture.Shape.is_monkey_patched = True
 | 
						|
QgsMapToolCapture.Shape.__doc__ = "Digitize shapes."
 | 
						|
 | 
						|
QgsActionMenu.ActionType = _Qgis.ActionType
 | 
						|
# monkey patching scoped based enum
 | 
						|
QgsActionMenu.Invalid = _Qgis.ActionType.Invalid
 | 
						|
QgsActionMenu.Invalid.is_monkey_patched = True
 | 
						|
QgsActionMenu.Invalid.__doc__ = "Invalid"
 | 
						|
QgsActionMenu.MapLayerAction = _Qgis.ActionType.MapLayerAction
 | 
						|
QgsActionMenu.MapLayerAction.is_monkey_patched = True
 | 
						|
QgsActionMenu.MapLayerAction.__doc__ = "Standard actions (defined by core or plugins), corresponds to QgsMapLayerAction class."
 | 
						|
QgsActionMenu.AttributeAction = _Qgis.ActionType.AttributeAction
 | 
						|
QgsActionMenu.AttributeAction.is_monkey_patched = True
 | 
						|
QgsActionMenu.AttributeAction.__doc__ = "Custom actions (manually defined in layer properties), corresponds to QgsAction class."
 | 
						|
 | 
						|
QgsMapLayerAction.Target = _Qgis.MapLayerActionTarget
 | 
						|
# monkey patching scoped based enum
 | 
						|
QgsMapLayerAction.Layer = _Qgis.MapLayerActionTarget.Layer
 | 
						|
QgsMapLayerAction.Layer.is_monkey_patched = True
 | 
						|
QgsMapLayerAction.Layer.__doc__ = "Action targets a complete layer"
 | 
						|
QgsMapLayerAction.SingleFeature = _Qgis.MapLayerActionTarget.SingleFeature
 | 
						|
QgsMapLayerAction.SingleFeature.is_monkey_patched = True
 | 
						|
QgsMapLayerAction.SingleFeature.__doc__ = "Action targets a single feature from a layer"
 | 
						|
QgsMapLayerAction.MultipleFeatures = _Qgis.MapLayerActionTarget.MultipleFeatures
 | 
						|
QgsMapLayerAction.MultipleFeatures.is_monkey_patched = True
 | 
						|
QgsMapLayerAction.MultipleFeatures.__doc__ = "Action targets multiple features from a layer"
 | 
						|
QgsMapLayerAction.AllActions = _Qgis.MapLayerActionTarget.AllActions
 | 
						|
QgsMapLayerAction.AllActions.is_monkey_patched = True
 | 
						|
QgsMapLayerAction.AllActions.__doc__ = ""
 | 
						|
QgsMapLayerAction.Targets = _Qgis.MapLayerActionTargets
 | 
						|
 | 
						|
QgsMapLayerAction.Flag = _Qgis.MapLayerActionFlag
 | 
						|
# monkey patching scoped based enum
 | 
						|
QgsMapLayerAction.EnabledOnlyWhenEditable = _Qgis.MapLayerActionFlag.EnabledOnlyWhenEditable
 | 
						|
QgsMapLayerAction.EnabledOnlyWhenEditable.is_monkey_patched = True
 | 
						|
QgsMapLayerAction.EnabledOnlyWhenEditable.__doc__ = "Action should be shown only for editable layers"
 | 
						|
QgsMapLayerAction.Flags = _Qgis.MapLayerActionFlags
 | 
						|
 | 
						|
QgsProcessingGui.WidgetType = _Qgis.ProcessingMode
 | 
						|
# monkey patching scoped based enum
 | 
						|
QgsProcessingGui.Standard = _Qgis.ProcessingMode.Standard
 | 
						|
QgsProcessingGui.Standard.is_monkey_patched = True
 | 
						|
QgsProcessingGui.Standard.__doc__ = "Standard (single-run) algorithm mode"
 | 
						|
QgsProcessingGui.Batch = _Qgis.ProcessingMode.Batch
 | 
						|
QgsProcessingGui.Batch.is_monkey_patched = True
 | 
						|
QgsProcessingGui.Batch.__doc__ = "Batch processing mode"
 | 
						|
QgsProcessingGui.Modeler = _Qgis.ProcessingMode.Modeler
 | 
						|
QgsProcessingGui.Modeler.is_monkey_patched = True
 | 
						|
QgsProcessingGui.Modeler.__doc__ = "Modeler mode"
 | 
						|
 | 
						|
 | 
						|
# monkey patch old settings wrappers
 | 
						|
QgsSettingsStringEditorWidgetWrapper = QgsSettingsStringLineEditWrapper
 | 
						|
QgsSettingsBoolEditorWidgetWrapper = QgsSettingsBoolCheckBoxWrapper
 | 
						|
QgsSettingsIntegerEditorWidgetWrapper = QgsSettingsIntegerSpinBoxWrapper
 | 
						|
QgsSettingsDoubleEditorWidgetWrapper = QgsSettingsDoubleSpinBoxWrapper
 | 
						|
QgsSettingsColorEditorWidgetWrapper = QgsSettingsColorButtonWrapper
 | 
						|
 | 
						|
# Classes patched
 | 
						|
QgsSettingsEnumEditorWidgetWrapper = PyQgsSettingsEnumEditorWidgetWrapper
 |