-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathAttributeAssignment_base.py
105 lines (101 loc) · 5.13 KB
/
AttributeAssignment_base.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# -*- coding: utf-8 -*-
"""
/***************************************************************************
AttributeAssignment
A QGIS plugin
Easy to assign an attribute on QGIS
-------------------
begin : 2018-03-14
git sha : $Format:%H$
copyright : (C) 2018 by Yasunori Kirimoto
email : contact@day-journal.com
license : GNU General Public License v2.0
***************************************************************************/
"""
from qgsfieldcombobox import QgsFieldComboBox
from qgsmaplayercombobox import QgsMapLayerComboBox
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_AttributeAssignment(object):
def setupUi(self, AttributeAssignment):
AttributeAssignment.setObjectName("AttributeAssignment")
AttributeAssignment.setEnabled(True)
AttributeAssignment.resize(240, 220)
self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
self.formLayout = QtWidgets.QFormLayout(AttributeAssignment)
self.formLayout.setFieldGrowthPolicy(
QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
self.formLayout.setRowWrapPolicy(QtWidgets.QFormLayout.DontWrapRows)
self.formLayout.setContentsMargins(20, 20, 20, 20)
self.formLayout.setSpacing(10)
self.formLayout.setObjectName("formLayout")
self.label_layer = QtWidgets.QLabel(AttributeAssignment)
font = QtGui.QFont()
font.setPointSize(10)
self.label_layer.setFont(font)
self.label_layer.setObjectName("label_layer")
self.formLayout.setWidget(
0, QtWidgets.QFormLayout.LabelRole, self.label_layer)
self.mMapLayerComboBox = QgsMapLayerComboBox(AttributeAssignment)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(25)
sizePolicy.setHeightForWidth(
self.mMapLayerComboBox.sizePolicy().hasHeightForWidth())
self.mMapLayerComboBox.setSizePolicy(sizePolicy)
self.mMapLayerComboBox.setAllowEmptyLayer(False)
self.mMapLayerComboBox.setShowCrs(False)
self.mMapLayerComboBox.setObjectName("mMapLayerComboBox")
self.formLayout.setWidget(
1, QtWidgets.QFormLayout.SpanningRole, self.mMapLayerComboBox)
self.label_field = QtWidgets.QLabel(AttributeAssignment)
font = QtGui.QFont()
font.setPointSize(10)
self.label_field.setFont(font)
self.label_field.setObjectName("label_field")
self.formLayout.setWidget(
3, QtWidgets.QFormLayout.LabelRole, self.label_field)
self.mFieldComboBox = QgsFieldComboBox(AttributeAssignment)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(25)
sizePolicy.setHeightForWidth(
self.mFieldComboBox.sizePolicy().hasHeightForWidth())
self.mFieldComboBox.setSizePolicy(sizePolicy)
self.mFieldComboBox.setObjectName("mFieldComboBox")
self.formLayout.setWidget(
4, QtWidgets.QFormLayout.SpanningRole, self.mFieldComboBox)
self.label_value = QtWidgets.QLabel(AttributeAssignment)
font = QtGui.QFont()
font.setPointSize(10)
self.label_value.setFont(font)
self.label_value.setObjectName("label_value")
self.formLayout.setWidget(
6, QtWidgets.QFormLayout.LabelRole, self.label_value)
self.mValuePlaceholder = QtWidgets.QWidget(AttributeAssignment)
sizePolicy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(25)
sizePolicy.setHeightForWidth(
self.mValuePlaceholder.sizePolicy().hasHeightForWidth())
self.mValuePlaceholder.setSizePolicy(sizePolicy)
self.mValuePlaceholder.setObjectName("mValuePlaceholder")
self.formLayout.setWidget(
7, QtWidgets.QFormLayout.SpanningRole, self.mValuePlaceholder)
self.label_layer.raise_()
self.mValuePlaceholder.raise_()
self.label_field.raise_()
self.mMapLayerComboBox.raise_()
self.mFieldComboBox.raise_()
self.label_value.raise_()
self.retranslateUi(AttributeAssignment)
QtCore.QMetaObject.connectSlotsByName(AttributeAssignment)
def retranslateUi(self, AttributeAssignment):
_translate = QtCore.QCoreApplication.translate
AttributeAssignment.setWindowTitle(_translate(
"AttributeAssignment", "AttributeAssignment"))
self.label_layer.setText(_translate("AttributeAssignment", "Layer"))
self.label_field.setText(_translate("AttributeAssignment", "Field"))
self.label_value.setText(_translate("AttributeAssignment", "Value"))