forked from josauder/procedural_city_generation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
window.py
271 lines (263 loc) · 16.9 KB
/
window.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
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'window.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(1059, 766)
self.Centralwidget = QtGui.QWidget(MainWindow)
self.Centralwidget.setObjectName(_fromUtf8("Centralwidget"))
self.gridLayout = QtGui.QGridLayout(self.Centralwidget)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.console = QtGui.QPlainTextEdit(self.Centralwidget)
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(159, 158, 158))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(159, 158, 158))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(159, 158, 158))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
self.console.setPalette(palette)
self.console.setObjectName(_fromUtf8("console"))
self.gridLayout.addWidget(self.console, 4, 0, 1, 1)
self.console_header = QtGui.QGroupBox(self.Centralwidget)
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(189, 189, 189))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(180, 180, 180))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(189, 189, 189))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(180, 180, 180))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(189, 189, 189))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
self.console_header.setPalette(palette)
self.console_header.setObjectName(_fromUtf8("console_header"))
self.gridLayout.addWidget(self.console_header, 3, 0, 1, 1)
self.tabWidget = QtGui.QTabWidget(self.Centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(3)
sizePolicy.setVerticalStretch(3)
sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
self.tabWidget.setSizePolicy(sizePolicy)
self.tabWidget.setMinimumSize(QtCore.QSize(981, 0))
self.tabWidget.setIconSize(QtCore.QSize(16, 16))
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.roadmap_tab = QtGui.QWidget()
self.roadmap_tab.setObjectName(_fromUtf8("roadmap_tab"))
self.gridLayout_2 = QtGui.QGridLayout(self.roadmap_tab)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.roadmap_splitter = QtGui.QSplitter(self.roadmap_tab)
self.roadmap_splitter.setOrientation(QtCore.Qt.Horizontal)
self.roadmap_splitter.setChildrenCollapsible(False)
self.roadmap_splitter.setObjectName(_fromUtf8("roadmap_splitter"))
self.roadmap_group = QtGui.QGroupBox(self.roadmap_splitter)
self.roadmap_group.setObjectName(_fromUtf8("roadmap_group"))
self.roadmap_Options = QtGui.QPushButton(self.roadmap_group)
self.roadmap_Options.setGeometry(QtCore.QRect(10, 30, 81, 27))
self.roadmap_Options.setObjectName(_fromUtf8("roadmap_Options"))
self.roadmap_Run = QtGui.QPushButton(self.roadmap_group)
self.roadmap_Run.setGeometry(QtCore.QRect(10, 60, 81, 27))
self.roadmap_Run.setObjectName(_fromUtf8("roadmap_Run"))
self.roadmap_frame = QtGui.QFrame(self.roadmap_splitter)
self.roadmap_frame.setFrameShape(QtGui.QFrame.StyledPanel)
self.roadmap_frame.setFrameShadow(QtGui.QFrame.Raised)
self.roadmap_frame.setObjectName(_fromUtf8("roadmap_frame"))
self.gridLayout_7 = QtGui.QGridLayout(self.roadmap_frame)
self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
self.roadmap_widget = matplotlibWidget(self.roadmap_frame)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(100)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.roadmap_widget.sizePolicy().hasHeightForWidth())
self.roadmap_widget.setSizePolicy(sizePolicy)
self.roadmap_widget.setObjectName(_fromUtf8("roadmap_widget"))
self.gridLayout_7.addWidget(self.roadmap_widget, 0, 0, 1, 1)
self.gridLayout_2.addWidget(self.roadmap_splitter, 0, 0, 1, 1)
self.tabWidget.addTab(self.roadmap_tab, _fromUtf8(""))
self.polygons_tab = QtGui.QWidget()
self.polygons_tab.setObjectName(_fromUtf8("polygons_tab"))
self.gridLayout_3 = QtGui.QGridLayout(self.polygons_tab)
self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
self.polygons_splitter = QtGui.QSplitter(self.polygons_tab)
self.polygons_splitter.setOrientation(QtCore.Qt.Horizontal)
self.polygons_splitter.setChildrenCollapsible(False)
self.polygons_splitter.setObjectName(_fromUtf8("polygons_splitter"))
self.polygons_group = QtGui.QGroupBox(self.polygons_splitter)
self.polygons_group.setObjectName(_fromUtf8("polygons_group"))
self.polygons_Options = QtGui.QPushButton(self.polygons_group)
self.polygons_Options.setGeometry(QtCore.QRect(10, 30, 81, 27))
self.polygons_Options.setObjectName(_fromUtf8("polygons_Options"))
self.polygons_Run = QtGui.QPushButton(self.polygons_group)
self.polygons_Run.setGeometry(QtCore.QRect(10, 60, 81, 27))
self.polygons_Run.setObjectName(_fromUtf8("polygons_Run"))
self.polygons_frame = QtGui.QFrame(self.polygons_splitter)
self.polygons_frame.setFrameShape(QtGui.QFrame.StyledPanel)
self.polygons_frame.setFrameShadow(QtGui.QFrame.Raised)
self.polygons_frame.setObjectName(_fromUtf8("polygons_frame"))
self.gridLayout_8 = QtGui.QGridLayout(self.polygons_frame)
self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8"))
self.polygons_widget = matplotlibWidget(self.polygons_frame)
self.polygons_widget.setObjectName(_fromUtf8("polygons_widget"))
self.gridLayout_8.addWidget(self.polygons_widget, 0, 0, 1, 1)
self.gridLayout_3.addWidget(self.polygons_splitter, 0, 0, 1, 1)
self.tabWidget.addTab(self.polygons_tab, _fromUtf8(""))
self.building_generation_tab = QtGui.QWidget()
self.building_generation_tab.setObjectName(_fromUtf8("building_generation_tab"))
self.gridLayout_4 = QtGui.QGridLayout(self.building_generation_tab)
self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
self.building_generation_splitter = QtGui.QSplitter(self.building_generation_tab)
self.building_generation_splitter.setOrientation(QtCore.Qt.Horizontal)
self.building_generation_splitter.setChildrenCollapsible(False)
self.building_generation_splitter.setObjectName(_fromUtf8("building_generation_splitter"))
self.building_generation_group = QtGui.QGroupBox(self.building_generation_splitter)
self.building_generation_group.setObjectName(_fromUtf8("building_generation_group"))
self.building_generation_Options = QtGui.QPushButton(self.building_generation_group)
self.building_generation_Options.setGeometry(QtCore.QRect(10, 30, 81, 27))
self.building_generation_Options.setObjectName(_fromUtf8("building_generation_Options"))
self.building_generation_Run = QtGui.QPushButton(self.building_generation_group)
self.building_generation_Run.setGeometry(QtCore.QRect(10, 60, 81, 27))
self.building_generation_Run.setObjectName(_fromUtf8("building_generation_Run"))
self.building_generation_frame = QtGui.QFrame(self.building_generation_splitter)
self.building_generation_frame.setFrameShape(QtGui.QFrame.StyledPanel)
self.building_generation_frame.setFrameShadow(QtGui.QFrame.Raised)
self.building_generation_frame.setObjectName(_fromUtf8("building_generation_frame"))
self.gridLayout_9 = QtGui.QGridLayout(self.building_generation_frame)
self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9"))
self.building_generation_widget = matplotlibWidget(self.building_generation_frame)
self.building_generation_widget.setObjectName(_fromUtf8("building_generation_widget"))
self.gridLayout_9.addWidget(self.building_generation_widget, 0, 0, 1, 1)
self.gridLayout_4.addWidget(self.building_generation_splitter, 0, 0, 1, 1)
self.tabWidget.addTab(self.building_generation_tab, _fromUtf8(""))
self.visualization_tab = QtGui.QWidget()
self.visualization_tab.setObjectName(_fromUtf8("visualization_tab"))
self.gridLayout_5 = QtGui.QGridLayout(self.visualization_tab)
self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
self.visualization_splitter = QtGui.QSplitter(self.visualization_tab)
self.visualization_splitter.setOrientation(QtCore.Qt.Horizontal)
self.visualization_splitter.setChildrenCollapsible(False)
self.visualization_splitter.setObjectName(_fromUtf8("visualization_splitter"))
self.visualization_group = QtGui.QGroupBox(self.visualization_splitter)
self.visualization_group.setObjectName(_fromUtf8("visualization_group"))
self.visualization_Options = QtGui.QPushButton(self.visualization_group)
self.visualization_Options.setGeometry(QtCore.QRect(10, 30, 81, 27))
self.visualization_Options.setObjectName(_fromUtf8("visualization_Options"))
self.visualization_Run = QtGui.QPushButton(self.visualization_group)
self.visualization_Run.setGeometry(QtCore.QRect(10, 60, 81, 27))
self.visualization_Run.setObjectName(_fromUtf8("visualization_Run"))
self.visualization_frame = QtGui.QFrame(self.visualization_splitter)
self.visualization_frame.setFrameShape(QtGui.QFrame.StyledPanel)
self.visualization_frame.setFrameShadow(QtGui.QFrame.Raised)
self.visualization_frame.setObjectName(_fromUtf8("visualization_frame"))
self.gridLayout_5.addWidget(self.visualization_splitter, 0, 0, 1, 1)
self.tabWidget.addTab(self.visualization_tab, _fromUtf8(""))
self.advanced_tab = QtGui.QWidget()
self.advanced_tab.setObjectName(_fromUtf8("advanced_tab"))
self.gridLayout_6 = QtGui.QGridLayout(self.advanced_tab)
self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6"))
self.advanced_group = QtGui.QGroupBox(self.advanced_tab)
self.advanced_group.setObjectName(_fromUtf8("advanced_group"))
self.clean_directories = QtGui.QPushButton(self.advanced_group)
self.clean_directories.setGeometry(QtCore.QRect(10, 30, 201, 27))
self.clean_directories.setObjectName(_fromUtf8("clean_directories"))
self.run_tests = QtGui.QPushButton(self.advanced_group)
self.run_tests.setGeometry(QtCore.QRect(10, 60, 201, 27))
self.run_tests.setObjectName(_fromUtf8("run_tests"))
self.gridLayout_6.addWidget(self.advanced_group, 0, 0, 1, 1)
self.tabWidget.addTab(self.advanced_tab, _fromUtf8(""))
self.gridLayout.addWidget(self.tabWidget, 2, 0, 1, 1)
MainWindow.setCentralWidget(self.Centralwidget)
self.statusBar = QtGui.QStatusBar(MainWindow)
self.statusBar.setObjectName(_fromUtf8("statusBar"))
MainWindow.setStatusBar(self.statusBar)
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "Procedural City Generation", None))
self.console_header.setTitle(_translate("MainWindow", " Console", None))
self.roadmap_group.setTitle(_translate("MainWindow", "Commands", None))
self.roadmap_Options.setText(_translate("MainWindow", "Options", None))
self.roadmap_Run.setText(_translate("MainWindow", "Run", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.roadmap_tab), _translate("MainWindow", "Roadmap Generation", None))
self.polygons_group.setTitle(_translate("MainWindow", "Commands", None))
self.polygons_Options.setText(_translate("MainWindow", "Options", None))
self.polygons_Run.setText(_translate("MainWindow", "Run", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.polygons_tab), _translate("MainWindow", "Polygon Extraction", None))
self.building_generation_group.setTitle(_translate("MainWindow", "Commands", None))
self.building_generation_Options.setText(_translate("MainWindow", "Options", None))
self.building_generation_Run.setText(_translate("MainWindow", "Run", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.building_generation_tab), _translate("MainWindow", "Building Generation", None))
self.visualization_group.setTitle(_translate("MainWindow", "Commands", None))
self.visualization_Options.setText(_translate("MainWindow", "Options", None))
self.visualization_Run.setText(_translate("MainWindow", "Run", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.visualization_tab), _translate("MainWindow", "Visualize in Blender", None))
self.advanced_group.setTitle(_translate("MainWindow", "Commands", None))
self.clean_directories.setText(_translate("MainWindow", "Clean Directories", None))
self.run_tests.setText(_translate("MainWindow", "Run Tests", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.advanced_tab), _translate("MainWindow", "Advanced", None))
from GUI import matplotlibWidget