1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
from PyQt4 import QtCore, QtGui
|
11
|
|
12
|
class Ui_QgsMapserverExportBase(object):
|
13
|
def setupUi(self, QgsMapserverExportBase):
|
14
|
QgsMapserverExportBase.setObjectName("QgsMapserverExportBase")
|
15
|
QgsMapserverExportBase.resize(QtCore.QSize(QtCore.QRect(0,0,416,480).size()).expandedTo(QgsMapserverExportBase.minimumSizeHint()))
|
16
|
QgsMapserverExportBase.setSizeGripEnabled(True)
|
17
|
|
18
|
self.gridlayout = QtGui.QGridLayout(QgsMapserverExportBase)
|
19
|
self.gridlayout.setMargin(9)
|
20
|
self.gridlayout.setSpacing(6)
|
21
|
self.gridlayout.setObjectName("gridlayout")
|
22
|
|
23
|
self.grpWeb = QtGui.QGroupBox(QgsMapserverExportBase)
|
24
|
self.grpWeb.setObjectName("grpWeb")
|
25
|
|
26
|
self.gridlayout1 = QtGui.QGridLayout(self.grpWeb)
|
27
|
self.gridlayout1.setMargin(0)
|
28
|
self.gridlayout1.setSpacing(0)
|
29
|
self.gridlayout1.setObjectName("gridlayout1")
|
30
|
|
31
|
self.hboxlayout = QtGui.QHBoxLayout()
|
32
|
self.hboxlayout.setSpacing(6)
|
33
|
self.hboxlayout.setMargin(4)
|
34
|
self.hboxlayout.setObjectName("hboxlayout")
|
35
|
|
36
|
self.textLabel5_2 = QtGui.QLabel(self.grpWeb)
|
37
|
self.textLabel5_2.setMinimumSize(QtCore.QSize(60,0))
|
38
|
self.textLabel5_2.setObjectName("textLabel5_2")
|
39
|
self.hboxlayout.addWidget(self.textLabel5_2)
|
40
|
|
41
|
self.txtWebTemplate = QtGui.QLineEdit(self.grpWeb)
|
42
|
self.txtWebTemplate.setObjectName("txtWebTemplate")
|
43
|
self.hboxlayout.addWidget(self.txtWebTemplate)
|
44
|
|
45
|
self.btnChooseTemplateFile = QtGui.QPushButton(self.grpWeb)
|
46
|
self.btnChooseTemplateFile.setObjectName("btnChooseTemplateFile")
|
47
|
self.hboxlayout.addWidget(self.btnChooseTemplateFile)
|
48
|
self.gridlayout1.addLayout(self.hboxlayout,0,0,1,1)
|
49
|
|
50
|
self.hboxlayout1 = QtGui.QHBoxLayout()
|
51
|
self.hboxlayout1.setSpacing(6)
|
52
|
self.hboxlayout1.setMargin(4)
|
53
|
self.hboxlayout1.setObjectName("hboxlayout1")
|
54
|
|
55
|
self.textLabel5 = QtGui.QLabel(self.grpWeb)
|
56
|
self.textLabel5.setMinimumSize(QtCore.QSize(60,0))
|
57
|
self.textLabel5.setObjectName("textLabel5")
|
58
|
self.hboxlayout1.addWidget(self.textLabel5)
|
59
|
|
60
|
self.txtWebHeader = QtGui.QLineEdit(self.grpWeb)
|
61
|
self.txtWebHeader.setObjectName("txtWebHeader")
|
62
|
self.hboxlayout1.addWidget(self.txtWebHeader)
|
63
|
|
64
|
self.btnChooseHeaderFile = QtGui.QPushButton(self.grpWeb)
|
65
|
self.btnChooseHeaderFile.setObjectName("btnChooseHeaderFile")
|
66
|
self.hboxlayout1.addWidget(self.btnChooseHeaderFile)
|
67
|
self.gridlayout1.addLayout(self.hboxlayout1,1,0,1,1)
|
68
|
|
69
|
self.hboxlayout2 = QtGui.QHBoxLayout()
|
70
|
self.hboxlayout2.setSpacing(6)
|
71
|
self.hboxlayout2.setMargin(4)
|
72
|
self.hboxlayout2.setObjectName("hboxlayout2")
|
73
|
|
74
|
self.textLabel5_3 = QtGui.QLabel(self.grpWeb)
|
75
|
self.textLabel5_3.setMinimumSize(QtCore.QSize(60,0))
|
76
|
self.textLabel5_3.setObjectName("textLabel5_3")
|
77
|
self.hboxlayout2.addWidget(self.textLabel5_3)
|
78
|
|
79
|
self.txtWebFooter = QtGui.QLineEdit(self.grpWeb)
|
80
|
self.txtWebFooter.setObjectName("txtWebFooter")
|
81
|
self.hboxlayout2.addWidget(self.txtWebFooter)
|
82
|
|
83
|
self.btnChooseFooterFile = QtGui.QPushButton(self.grpWeb)
|
84
|
self.btnChooseFooterFile.setObjectName("btnChooseFooterFile")
|
85
|
self.hboxlayout2.addWidget(self.btnChooseFooterFile)
|
86
|
self.gridlayout1.addLayout(self.hboxlayout2,2,0,1,1)
|
87
|
self.gridlayout.addWidget(self.grpWeb,4,0,1,3)
|
88
|
|
89
|
self.grpMap = QtGui.QGroupBox(QgsMapserverExportBase)
|
90
|
self.grpMap.setObjectName("grpMap")
|
91
|
|
92
|
self.gridlayout2 = QtGui.QGridLayout(self.grpMap)
|
93
|
self.gridlayout2.setMargin(0)
|
94
|
self.gridlayout2.setSpacing(0)
|
95
|
self.gridlayout2.setObjectName("gridlayout2")
|
96
|
|
97
|
self.hboxlayout3 = QtGui.QHBoxLayout()
|
98
|
self.hboxlayout3.setSpacing(6)
|
99
|
self.hboxlayout3.setMargin(4)
|
100
|
self.hboxlayout3.setObjectName("hboxlayout3")
|
101
|
|
102
|
self.textLabel3 = QtGui.QLabel(self.grpMap)
|
103
|
self.textLabel3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
104
|
self.textLabel3.setObjectName("textLabel3")
|
105
|
self.hboxlayout3.addWidget(self.textLabel3)
|
106
|
|
107
|
self.cmbMapUnits = QtGui.QComboBox(self.grpMap)
|
108
|
self.cmbMapUnits.setObjectName("cmbMapUnits")
|
109
|
self.hboxlayout3.addWidget(self.cmbMapUnits)
|
110
|
|
111
|
self.textLabel4 = QtGui.QLabel(self.grpMap)
|
112
|
self.textLabel4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
113
|
self.textLabel4.setObjectName("textLabel4")
|
114
|
self.hboxlayout3.addWidget(self.textLabel4)
|
115
|
|
116
|
self.cmbMapImageType = QtGui.QComboBox(self.grpMap)
|
117
|
self.cmbMapImageType.setObjectName("cmbMapImageType")
|
118
|
self.hboxlayout3.addWidget(self.cmbMapImageType)
|
119
|
self.gridlayout2.addLayout(self.hboxlayout3,2,0,1,1)
|
120
|
|
121
|
self.hboxlayout4 = QtGui.QHBoxLayout()
|
122
|
self.hboxlayout4.setSpacing(6)
|
123
|
self.hboxlayout4.setMargin(4)
|
124
|
self.hboxlayout4.setObjectName("hboxlayout4")
|
125
|
|
126
|
self.textLabel2 = QtGui.QLabel(self.grpMap)
|
127
|
self.textLabel2.setObjectName("textLabel2")
|
128
|
self.hboxlayout4.addWidget(self.textLabel2)
|
129
|
|
130
|
self.txtMapWidth = QtGui.QLineEdit(self.grpMap)
|
131
|
self.txtMapWidth.setObjectName("txtMapWidth")
|
132
|
self.hboxlayout4.addWidget(self.txtMapWidth)
|
133
|
|
134
|
self.textLabel2_2 = QtGui.QLabel(self.grpMap)
|
135
|
self.textLabel2_2.setObjectName("textLabel2_2")
|
136
|
self.hboxlayout4.addWidget(self.textLabel2_2)
|
137
|
|
138
|
self.txtMapHeight = QtGui.QLineEdit(self.grpMap)
|
139
|
self.txtMapHeight.setObjectName("txtMapHeight")
|
140
|
self.hboxlayout4.addWidget(self.txtMapHeight)
|
141
|
self.gridlayout2.addLayout(self.hboxlayout4,1,0,1,1)
|
142
|
|
143
|
self.hboxlayout5 = QtGui.QHBoxLayout()
|
144
|
self.hboxlayout5.setSpacing(6)
|
145
|
self.hboxlayout5.setMargin(4)
|
146
|
self.hboxlayout5.setObjectName("hboxlayout5")
|
147
|
|
148
|
self.textLabel1 = QtGui.QLabel(self.grpMap)
|
149
|
self.textLabel1.setObjectName("textLabel1")
|
150
|
self.hboxlayout5.addWidget(self.textLabel1)
|
151
|
|
152
|
self.txtMapName = QtGui.QLineEdit(self.grpMap)
|
153
|
self.txtMapName.setObjectName("txtMapName")
|
154
|
self.hboxlayout5.addWidget(self.txtMapName)
|
155
|
self.gridlayout2.addLayout(self.hboxlayout5,0,0,1,1)
|
156
|
self.gridlayout.addWidget(self.grpMap,3,0,1,3)
|
157
|
|
158
|
self.textLabel7 = QtGui.QLabel(QgsMapserverExportBase)
|
159
|
self.textLabel7.setObjectName("textLabel7")
|
160
|
self.gridlayout.addWidget(self.textLabel7,0,0,1,1)
|
161
|
|
162
|
self.txtMapFilePath = QtGui.QLineEdit(QgsMapserverExportBase)
|
163
|
self.txtMapFilePath.setObjectName("txtMapFilePath")
|
164
|
self.gridlayout.addWidget(self.txtMapFilePath,0,1,1,1)
|
165
|
|
166
|
self.btnChooseProjectFile = QtGui.QPushButton(QgsMapserverExportBase)
|
167
|
self.btnChooseProjectFile.setObjectName("btnChooseProjectFile")
|
168
|
self.gridlayout.addWidget(self.btnChooseProjectFile,1,2,1,1)
|
169
|
|
170
|
self.txtQgisFilePath = QtGui.QLineEdit(QgsMapserverExportBase)
|
171
|
self.txtQgisFilePath.setObjectName("txtQgisFilePath")
|
172
|
self.gridlayout.addWidget(self.txtQgisFilePath,1,1,1,1)
|
173
|
|
174
|
self.textLabel7_2 = QtGui.QLabel(QgsMapserverExportBase)
|
175
|
self.textLabel7_2.setObjectName("textLabel7_2")
|
176
|
self.gridlayout.addWidget(self.textLabel7_2,1,0,1,1)
|
177
|
|
178
|
self.btnChooseFile = QtGui.QPushButton(QgsMapserverExportBase)
|
179
|
self.btnChooseFile.setObjectName("btnChooseFile")
|
180
|
self.gridlayout.addWidget(self.btnChooseFile,0,2,1,1)
|
181
|
|
182
|
self.chkExpLayersOnly = QtGui.QCheckBox(QgsMapserverExportBase)
|
183
|
self.chkExpLayersOnly.setObjectName("chkExpLayersOnly")
|
184
|
self.gridlayout.addWidget(self.chkExpLayersOnly,2,1,1,2)
|
185
|
|
186
|
self.buttonBox = QtGui.QDialogButtonBox(QgsMapserverExportBase)
|
187
|
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Help|QtGui.QDialogButtonBox.NoButton|QtGui.QDialogButtonBox.Ok)
|
188
|
self.buttonBox.setObjectName("buttonBox")
|
189
|
self.gridlayout.addWidget(self.buttonBox,5,0,1,3)
|
190
|
self.textLabel5_2.setBuddy(self.txtWebTemplate)
|
191
|
self.textLabel5.setBuddy(self.txtWebHeader)
|
192
|
self.textLabel5_3.setBuddy(self.txtWebFooter)
|
193
|
self.textLabel3.setBuddy(self.cmbMapUnits)
|
194
|
self.textLabel4.setBuddy(self.cmbMapImageType)
|
195
|
self.textLabel2.setBuddy(self.txtMapWidth)
|
196
|
self.textLabel2_2.setBuddy(self.txtMapHeight)
|
197
|
self.textLabel1.setBuddy(self.txtMapName)
|
198
|
self.textLabel7.setBuddy(self.txtMapFilePath)
|
199
|
self.textLabel7_2.setBuddy(self.txtQgisFilePath)
|
200
|
|
201
|
self.retranslateUi(QgsMapserverExportBase)
|
202
|
QtCore.QObject.connect(self.buttonBox,QtCore.SIGNAL("accepted()"),QgsMapserverExportBase.accept)
|
203
|
QtCore.QObject.connect(self.buttonBox,QtCore.SIGNAL("rejected()"),QgsMapserverExportBase.reject)
|
204
|
QtCore.QMetaObject.connectSlotsByName(QgsMapserverExportBase)
|
205
|
QgsMapserverExportBase.setTabOrder(self.txtMapFilePath,self.btnChooseFile)
|
206
|
QgsMapserverExportBase.setTabOrder(self.btnChooseFile,self.txtQgisFilePath)
|
207
|
QgsMapserverExportBase.setTabOrder(self.txtQgisFilePath,self.btnChooseProjectFile)
|
208
|
QgsMapserverExportBase.setTabOrder(self.btnChooseProjectFile,self.chkExpLayersOnly)
|
209
|
QgsMapserverExportBase.setTabOrder(self.chkExpLayersOnly,self.txtMapName)
|
210
|
QgsMapserverExportBase.setTabOrder(self.txtMapName,self.txtMapWidth)
|
211
|
QgsMapserverExportBase.setTabOrder(self.txtMapWidth,self.txtMapHeight)
|
212
|
QgsMapserverExportBase.setTabOrder(self.txtMapHeight,self.cmbMapUnits)
|
213
|
QgsMapserverExportBase.setTabOrder(self.cmbMapUnits,self.cmbMapImageType)
|
214
|
QgsMapserverExportBase.setTabOrder(self.cmbMapImageType,self.txtWebTemplate)
|
215
|
QgsMapserverExportBase.setTabOrder(self.txtWebTemplate,self.btnChooseTemplateFile)
|
216
|
QgsMapserverExportBase.setTabOrder(self.btnChooseTemplateFile,self.txtWebHeader)
|
217
|
QgsMapserverExportBase.setTabOrder(self.txtWebHeader,self.btnChooseHeaderFile)
|
218
|
QgsMapserverExportBase.setTabOrder(self.btnChooseHeaderFile,self.txtWebFooter)
|
219
|
QgsMapserverExportBase.setTabOrder(self.txtWebFooter,self.btnChooseFooterFile)
|
220
|
|
221
|
def retranslateUi(self, QgsMapserverExportBase):
|
222
|
QgsMapserverExportBase.setWindowTitle(QtGui.QApplication.translate("QgsMapserverExportBase", "Export to Mapserver", None, QtGui.QApplication.UnicodeUTF8))
|
223
|
self.grpWeb.setTitle(QtGui.QApplication.translate("QgsMapserverExportBase", "Web Interface Definition", None, QtGui.QApplication.UnicodeUTF8))
|
224
|
self.textLabel5_2.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Template", None, QtGui.QApplication.UnicodeUTF8))
|
225
|
self.txtWebTemplate.setToolTip(QtGui.QApplication.translate("QgsMapserverExportBase", "Path to the MapServer template file", None, QtGui.QApplication.UnicodeUTF8))
|
226
|
self.btnChooseTemplateFile.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Browse...", None, QtGui.QApplication.UnicodeUTF8))
|
227
|
self.textLabel5.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Header", None, QtGui.QApplication.UnicodeUTF8))
|
228
|
self.btnChooseHeaderFile.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Browse...", None, QtGui.QApplication.UnicodeUTF8))
|
229
|
self.textLabel5_3.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Footer", None, QtGui.QApplication.UnicodeUTF8))
|
230
|
self.btnChooseFooterFile.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Browse...", None, QtGui.QApplication.UnicodeUTF8))
|
231
|
self.grpMap.setTitle(QtGui.QApplication.translate("QgsMapserverExportBase", "Map", None, QtGui.QApplication.UnicodeUTF8))
|
232
|
self.textLabel3.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Units", None, QtGui.QApplication.UnicodeUTF8))
|
233
|
|
234
|
|
235
|
|
236
|
|
237
|
|
238
|
|
239
|
self.cmbMapUnits.addItem("dd")
|
240
|
self.cmbMapUnits.addItem("feet")
|
241
|
self.cmbMapUnits.addItem("meters")
|
242
|
self.cmbMapUnits.addItem("miles")
|
243
|
self.cmbMapUnits.addItem("inches")
|
244
|
self.cmbMapUnits.addItem("kilometers")
|
245
|
self.textLabel4.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Image type", None, QtGui.QApplication.UnicodeUTF8))
|
246
|
self.cmbMapImageType.addItem(QtGui.QApplication.translate("QgsMapserverExportBase", "gif", None, QtGui.QApplication.UnicodeUTF8))
|
247
|
self.cmbMapImageType.addItem(QtGui.QApplication.translate("QgsMapserverExportBase", "gtiff", None, QtGui.QApplication.UnicodeUTF8))
|
248
|
self.cmbMapImageType.addItem(QtGui.QApplication.translate("QgsMapserverExportBase", "jpeg", None, QtGui.QApplication.UnicodeUTF8))
|
249
|
self.cmbMapImageType.addItem(QtGui.QApplication.translate("QgsMapserverExportBase", "png", None, QtGui.QApplication.UnicodeUTF8))
|
250
|
self.cmbMapImageType.addItem(QtGui.QApplication.translate("QgsMapserverExportBase", "swf", None, QtGui.QApplication.UnicodeUTF8))
|
251
|
self.cmbMapImageType.addItem(QtGui.QApplication.translate("QgsMapserverExportBase", "userdefined", None, QtGui.QApplication.UnicodeUTF8))
|
252
|
self.cmbMapImageType.addItem(QtGui.QApplication.translate("QgsMapserverExportBase", "wbmp", None, QtGui.QApplication.UnicodeUTF8))
|
253
|
self.textLabel2.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Width", None, QtGui.QApplication.UnicodeUTF8))
|
254
|
self.textLabel2_2.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Height", None, QtGui.QApplication.UnicodeUTF8))
|
255
|
self.textLabel1.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Name", None, QtGui.QApplication.UnicodeUTF8))
|
256
|
self.txtMapName.setToolTip(QtGui.QApplication.translate("QgsMapserverExportBase", "Prefix attached to map, scalebar and legend GIF filenames created using this MapFile", None, QtGui.QApplication.UnicodeUTF8))
|
257
|
self.textLabel7.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Map file", None, QtGui.QApplication.UnicodeUTF8))
|
258
|
self.txtMapFilePath.setToolTip(QtGui.QApplication.translate("QgsMapserverExportBase", "Name for the map file to be created from the QGIS project file", None, QtGui.QApplication.UnicodeUTF8))
|
259
|
self.btnChooseProjectFile.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Browse...", None, QtGui.QApplication.UnicodeUTF8))
|
260
|
self.txtQgisFilePath.setToolTip(QtGui.QApplication.translate("QgsMapserverExportBase", "Full path to the QGIS project file to export to MapServer map format", None, QtGui.QApplication.UnicodeUTF8))
|
261
|
self.textLabel7_2.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "QGIS project file", None, QtGui.QApplication.UnicodeUTF8))
|
262
|
self.btnChooseFile.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Save As...", None, QtGui.QApplication.UnicodeUTF8))
|
263
|
self.chkExpLayersOnly.setToolTip(QtGui.QApplication.translate("QgsMapserverExportBase", "If checked, only the layer information will be processed", None, QtGui.QApplication.UnicodeUTF8))
|
264
|
self.chkExpLayersOnly.setText(QtGui.QApplication.translate("QgsMapserverExportBase", "Export LAYER information only", None, QtGui.QApplication.UnicodeUTF8))
|
265
|
|