-
Notifications
You must be signed in to change notification settings - Fork 9
/
VoxelizeWindow_GUI.py
137 lines (129 loc) · 7.58 KB
/
VoxelizeWindow_GUI.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'VoxelizeWindow_GUI.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Voxelize_Window(object):
def setupUi(self, Voxelize_Window):
Voxelize_Window.setObjectName("Voxelize_Window")
Voxelize_Window.resize(600, 307)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(Voxelize_Window.sizePolicy().hasHeightForWidth())
Voxelize_Window.setSizePolicy(sizePolicy)
Voxelize_Window.setMaximumSize(QtCore.QSize(16777215, 307))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("icons/voxels.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Voxelize_Window.setWindowIcon(icon)
self.verticalLayout_2 = QtWidgets.QVBoxLayout(Voxelize_Window)
self.verticalLayout_2.setSpacing(12)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.centralwidget_2 = QtWidgets.QVBoxLayout()
self.centralwidget_2.setObjectName("centralwidget_2")
self.fLayout_voxelize = QtWidgets.QFormLayout()
self.fLayout_voxelize.setVerticalSpacing(12)
self.fLayout_voxelize.setObjectName("fLayout_voxelize")
self.label_input = QtWidgets.QLabel(Voxelize_Window)
self.label_input.setObjectName("label_input")
self.fLayout_voxelize.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_input)
self.hLayout_input = QtWidgets.QHBoxLayout()
self.hLayout_input.setObjectName("hLayout_input")
self.edit_input = QtWidgets.QLineEdit(Voxelize_Window)
self.edit_input.setObjectName("edit_input")
self.hLayout_input.addWidget(self.edit_input)
self.pB_input = QtWidgets.QPushButton(Voxelize_Window)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pB_input.sizePolicy().hasHeightForWidth())
self.pB_input.setSizePolicy(sizePolicy)
self.pB_input.setMaximumSize(QtCore.QSize(35, 35))
self.pB_input.setObjectName("pB_input")
self.hLayout_input.addWidget(self.pB_input)
self.fLayout_voxelize.setLayout(0, QtWidgets.QFormLayout.FieldRole, self.hLayout_input)
self.label_output = QtWidgets.QLabel(Voxelize_Window)
self.label_output.setObjectName("label_output")
self.fLayout_voxelize.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_output)
self.hLayout_output = QtWidgets.QHBoxLayout()
self.hLayout_output.setObjectName("hLayout_output")
self.edit_output = QtWidgets.QLineEdit(Voxelize_Window)
self.edit_output.setObjectName("edit_output")
self.hLayout_output.addWidget(self.edit_output)
self.pB_output = QtWidgets.QPushButton(Voxelize_Window)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pB_output.sizePolicy().hasHeightForWidth())
self.pB_output.setSizePolicy(sizePolicy)
self.pB_output.setMinimumSize(QtCore.QSize(0, 0))
self.pB_output.setMaximumSize(QtCore.QSize(35, 35))
self.pB_output.setObjectName("pB_output")
self.hLayout_output.addWidget(self.pB_output)
self.fLayout_voxelize.setLayout(1, QtWidgets.QFormLayout.FieldRole, self.hLayout_output)
self.label_resolution = QtWidgets.QLabel(Voxelize_Window)
self.label_resolution.setObjectName("label_resolution")
self.fLayout_voxelize.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_resolution)
self.hLayout_resolution = QtWidgets.QHBoxLayout()
self.hLayout_resolution.setObjectName("hLayout_resolution")
self.sB_resolution = QtWidgets.QSpinBox(Voxelize_Window)
self.sB_resolution.setMaximum(10000)
self.sB_resolution.setProperty("value", 256)
self.sB_resolution.setObjectName("sB_resolution")
self.hLayout_resolution.addWidget(self.sB_resolution)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.hLayout_resolution.addItem(spacerItem)
self.fLayout_voxelize.setLayout(2, QtWidgets.QFormLayout.FieldRole, self.hLayout_resolution)
self.label_crop = QtWidgets.QLabel(Voxelize_Window)
self.label_crop.setObjectName("label_crop")
self.fLayout_voxelize.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_crop)
self.cB_crop = QtWidgets.QCheckBox(Voxelize_Window)
self.cB_crop.setText("")
self.cB_crop.setObjectName("cB_crop")
self.fLayout_voxelize.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.cB_crop)
self.label_flip = QtWidgets.QLabel(Voxelize_Window)
self.label_flip.setObjectName("label_flip")
self.fLayout_voxelize.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_flip)
self.cB_flip = QtWidgets.QCheckBox(Voxelize_Window)
self.cB_flip.setText("")
self.cB_flip.setObjectName("cB_flip")
self.fLayout_voxelize.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.cB_flip)
self.centralwidget_2.addLayout(self.fLayout_voxelize)
self.hLayout_pB_voxelize = QtWidgets.QHBoxLayout()
self.hLayout_pB_voxelize.setObjectName("hLayout_pB_voxelize")
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.hLayout_pB_voxelize.addItem(spacerItem1)
self.pB_voxelize = QtWidgets.QPushButton(Voxelize_Window)
self.pB_voxelize.setObjectName("pB_voxelize")
self.hLayout_pB_voxelize.addWidget(self.pB_voxelize)
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.hLayout_pB_voxelize.addItem(spacerItem2)
self.centralwidget_2.addLayout(self.hLayout_pB_voxelize)
self.verticalLayout_2.addLayout(self.centralwidget_2)
self.label_statusBar = QtWidgets.QLabel(Voxelize_Window)
self.label_statusBar.setText("")
self.label_statusBar.setObjectName("label_statusBar")
self.verticalLayout_2.addWidget(self.label_statusBar)
self.retranslateUi(Voxelize_Window)
QtCore.QMetaObject.connectSlotsByName(Voxelize_Window)
def retranslateUi(self, Voxelize_Window):
_translate = QtCore.QCoreApplication.translate
Voxelize_Window.setWindowTitle(_translate("Voxelize_Window", "Voxelize Mesh"))
self.label_input.setText(_translate("Voxelize_Window", "Input file"))
self.pB_input.setText(_translate("Voxelize_Window", "..."))
self.label_output.setText(_translate("Voxelize_Window", "Output file"))
self.pB_output.setText(_translate("Voxelize_Window", "..."))
self.label_resolution.setText(_translate("Voxelize_Window", "Resolution"))
self.label_crop.setText(_translate("Voxelize_Window", "Crop"))
self.label_flip.setText(_translate("Voxelize_Window", "Flip"))
self.pB_voxelize.setText(_translate("Voxelize_Window", "Voxelize"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Voxelize_Window = QtWidgets.QDialog()
ui = Ui_Voxelize_Window()
ui.setupUi(Voxelize_Window)
Voxelize_Window.show()
sys.exit(app.exec_())