forked from borysiasty/pointsamplingtool
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpointSamplingToolUi.py
More file actions
200 lines (193 loc) · 12.1 KB
/
pointSamplingToolUi.py
File metadata and controls
200 lines (193 loc) · 12.1 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pointSamplingToolUi.ui'
#
# Created: Fri Feb 17 20:24:02 2012
# by: PyQt4 UI code generator 4.9
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName(_fromUtf8("Dialog"))
Dialog.resize(470, 446)
Dialog.setFocusPolicy(QtCore.Qt.NoFocus)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8("pointSamplingToolIcon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Dialog.setWindowIcon(icon)
Dialog.setSizeGripEnabled(True)
self.gridlayout = QtGui.QGridLayout(Dialog)
self.gridlayout.setObjectName(_fromUtf8("gridlayout"))
self.tabWidget = QtGui.QTabWidget(Dialog)
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.tab = QtGui.QWidget()
self.tab.setObjectName(_fromUtf8("tab"))
self.gridlayout1 = QtGui.QGridLayout(self.tab)
self.gridlayout1.setObjectName(_fromUtf8("gridlayout1"))
self.vboxlayout = QtGui.QVBoxLayout()
self.vboxlayout.setObjectName(_fromUtf8("vboxlayout"))
self.label = QtGui.QLabel(self.tab)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
self.label.setObjectName(_fromUtf8("label"))
self.vboxlayout.addWidget(self.label)
self.inSample = QtGui.QComboBox(self.tab)
self.inSample.setObjectName(_fromUtf8("inSample"))
self.vboxlayout.addWidget(self.inSample)
self.gridlayout1.addLayout(self.vboxlayout, 0, 0, 1, 1)
self.vboxlayout1 = QtGui.QVBoxLayout()
self.vboxlayout1.setObjectName(_fromUtf8("vboxlayout1"))
self.label_2 = QtGui.QLabel(self.tab)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
self.label_2.setSizePolicy(sizePolicy)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.vboxlayout1.addWidget(self.label_2)
self.inData = QtGui.QListWidget(self.tab)
self.inData.viewport().setProperty("cursor", QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.inData.setEditTriggers(QtGui.QAbstractItemView.DoubleClicked|QtGui.QAbstractItemView.EditKeyPressed)
self.inData.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
self.inData.setViewMode(QtGui.QListView.ListMode)
self.inData.setObjectName(_fromUtf8("inData"))
self.vboxlayout1.addWidget(self.inData)
self.gridlayout1.addLayout(self.vboxlayout1, 1, 0, 1, 1)
self.groupBox_2 = QtGui.QGroupBox(self.tab)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
self.groupBox_2.setSizePolicy(sizePolicy)
self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
self.vboxlayout2 = QtGui.QVBoxLayout(self.groupBox_2)
self.vboxlayout2.setObjectName(_fromUtf8("vboxlayout2"))
self.hboxlayout = QtGui.QHBoxLayout()
self.hboxlayout.setObjectName(_fromUtf8("hboxlayout"))
self.outShape = QtGui.QLineEdit(self.groupBox_2)
self.outShape.setObjectName(_fromUtf8("outShape"))
self.hboxlayout.addWidget(self.outShape)
self.outButton = QtGui.QToolButton(self.groupBox_2)
self.outButton.setObjectName(_fromUtf8("outButton"))
self.hboxlayout.addWidget(self.outButton)
self.vboxlayout2.addLayout(self.hboxlayout)
self.addToToc = QtGui.QCheckBox(self.groupBox_2)
self.addToToc.setObjectName(_fromUtf8("addToToc"))
self.vboxlayout2.addWidget(self.addToToc)
self.gridlayout1.addWidget(self.groupBox_2, 2, 0, 1, 1)
self.tabWidget.addTab(self.tab, _fromUtf8(""))
self.tab_2 = QtGui.QWidget()
self.tab_2.setObjectName(_fromUtf8("tab_2"))
self.gridlayout2 = QtGui.QGridLayout(self.tab_2)
self.gridlayout2.setObjectName(_fromUtf8("gridlayout2"))
self.fieldsTable = QtGui.QTableWidget(self.tab_2)
self.fieldsTable.setEditTriggers(QtGui.QAbstractItemView.AnyKeyPressed|QtGui.QAbstractItemView.DoubleClicked|QtGui.QAbstractItemView.EditKeyPressed)
self.fieldsTable.setDragDropOverwriteMode(False)
self.fieldsTable.setAlternatingRowColors(False)
self.fieldsTable.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
self.fieldsTable.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.fieldsTable.setGridStyle(QtCore.Qt.SolidLine)
self.fieldsTable.setWordWrap(False)
self.fieldsTable.setCornerButtonEnabled(False)
self.fieldsTable.setRowCount(0)
self.fieldsTable.setColumnCount(2)
self.fieldsTable.setObjectName(_fromUtf8("fieldsTable"))
item = QtGui.QTableWidgetItem()
self.fieldsTable.setHorizontalHeaderItem(0, item)
item = QtGui.QTableWidgetItem()
self.fieldsTable.setHorizontalHeaderItem(1, item)
self.gridlayout2.addWidget(self.fieldsTable, 0, 0, 1, 1)
self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
self.tab_3 = QtGui.QWidget()
self.tab_3.setObjectName(_fromUtf8("tab_3"))
self.gridlayout3 = QtGui.QGridLayout(self.tab_3)
self.gridlayout3.setObjectName(_fromUtf8("gridlayout3"))
self.label_3 = QtGui.QLabel(self.tab_3)
self.label_3.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.label_3.setTextFormat(QtCore.Qt.AutoText)
self.label_3.setScaledContents(False)
self.label_3.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.label_3.setWordWrap(True)
self.label_3.setOpenExternalLinks(True)
self.label_3.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.gridlayout3.addWidget(self.label_3, 0, 0, 1, 1)
self.tabWidget.addTab(self.tab_3, _fromUtf8(""))
self.gridlayout.addWidget(self.tabWidget, 0, 0, 1, 1)
self.hboxlayout1 = QtGui.QHBoxLayout()
self.hboxlayout1.setObjectName(_fromUtf8("hboxlayout1"))
self.groupBox = QtGui.QGroupBox(Dialog)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
self.groupBox.setSizePolicy(sizePolicy)
self.groupBox.setMinimumSize(QtCore.QSize(0, 45))
self.groupBox.setObjectName(_fromUtf8("groupBox"))
self.statusLabel = QtGui.QLabel(self.groupBox)
self.statusLabel.setGeometry(QtCore.QRect(16, 20, 291, 20))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.statusLabel.sizePolicy().hasHeightForWidth())
self.statusLabel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setBold(False)
font.setItalic(True)
font.setWeight(50)
font.setKerning(True)
font.setStyleStrategy(QtGui.QFont.PreferDefault)
self.statusLabel.setFont(font)
self.statusLabel.setTextFormat(QtCore.Qt.AutoText)
self.statusLabel.setObjectName(_fromUtf8("statusLabel"))
self.hboxlayout1.addWidget(self.groupBox)
self.buttonBox = QtGui.QDialogButtonBox(Dialog)
self.buttonBox.setEnabled(True)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth())
self.buttonBox.setSizePolicy(sizePolicy)
self.buttonBox.setLayoutDirection(QtCore.Qt.LeftToRight)
self.buttonBox.setAutoFillBackground(False)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setCenterButtons(False)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.hboxlayout1.addWidget(self.buttonBox)
self.gridlayout.addLayout(self.hboxlayout1, 1, 0, 1, 1)
self.retranslateUi(Dialog)
self.tabWidget.setCurrentIndex(0)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog)
Dialog.setTabOrder(self.inSample, self.inData)
Dialog.setTabOrder(self.inData, self.outShape)
Dialog.setTabOrder(self.outShape, self.outButton)
Dialog.setTabOrder(self.outButton, self.addToToc)
Dialog.setTabOrder(self.addToToc, self.buttonBox)
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Point Sampling Tool", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("Dialog", "Layer containing sampling points:", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("Dialog", "Layers with fields/bands to get values from:", None, QtGui.QApplication.UnicodeUTF8))
self.groupBox_2.setTitle(QtGui.QApplication.translate("Dialog", "Output point vector layer:", None, QtGui.QApplication.UnicodeUTF8))
self.outButton.setText(QtGui.QApplication.translate("Dialog", "Browse", None, QtGui.QApplication.UnicodeUTF8))
self.addToToc.setText(QtGui.QApplication.translate("Dialog", "Add created layer to the TOC", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QtGui.QApplication.translate("Dialog", "General", None, QtGui.QApplication.UnicodeUTF8))
item = self.fieldsTable.horizontalHeaderItem(0)
item.setText(QtGui.QApplication.translate("Dialog", "source", None, QtGui.QApplication.UnicodeUTF8))
item = self.fieldsTable.horizontalHeaderItem(1)
item.setText(QtGui.QApplication.translate("Dialog", "name", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QtGui.QApplication.translate("Dialog", "Fields", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setText(QtGui.QApplication.translate("Dialog", "The Point Sampling Tool Plugin collects polygon attributes and raster values from multiple layers at specified sampling points. You need a point layer with locations of sampling points and at least one polygon or raster layer to probe values from. The plugin creates a new point layer with locations given by the sampling points and attributes taken from all the underlying polygons or/and raster cells.\n"
"\n"
"NOTE: This tool is not compatible with mulitipoint sources, unless each multipoint contains exactly one point. Using multipoint samples that contain more points in multipoints may produce unreliable results.", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QtGui.QApplication.translate("Dialog", "About", None, QtGui.QApplication.UnicodeUTF8))
self.groupBox.setTitle(QtGui.QApplication.translate("Dialog", "Status:", None, QtGui.QApplication.UnicodeUTF8))
self.statusLabel.setText(QtGui.QApplication.translate("Dialog", "Complete the input fields and press OK...", None, QtGui.QApplication.UnicodeUTF8))