File: __init__.py.in

package info (click to toggle)
qgis 3.40.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,183,672 kB
  • sloc: cpp: 1,595,771; python: 372,544; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 161
file content (82 lines) | stat: -rw-r--r-- 4,324 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# -*- 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

# Classes patched
QgsSettingsEnumEditorWidgetWrapper = PyQgsSettingsEnumEditorWidgetWrapper