-
Notifications
You must be signed in to change notification settings - Fork 0
/
widgets.py
159 lines (132 loc) · 8.22 KB
/
widgets.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
import os
from PySide2.QtWidgets import QDialog, QDialogButtonBox, QDoubleSpinBox, QSpinBox, QPushButton
from uiloader import loadUi
class UselessBoxWidget(QDialog):
def __init__(self, *args, **kwargs):
QDialog.__init__(self, *args, **kwargs)
# load the ui file
self.ui = loadUi( os.path.join(os.path.dirname(os.path.abspath(__file__)), 'useless-box-ui.ui'),
self,
workingDirectory = os.path.dirname(os.path.abspath(__file__)))
# create aliases for ui elements
self.width_x_spinbox = self.findChild(QDoubleSpinBox, 'width_x_spinbox')
self.width_y_spinbox = self.findChild(QDoubleSpinBox, 'width_y_spinbox')
self.height_x_spinbox = self.findChild(QDoubleSpinBox, 'height_z_spinbox')
self.width_x_help_button = self.findChild(QPushButton, 'width_x_help_button')
self.width_y_help_button = self.findChild(QPushButton, 'width_y_help_button')
self.height_z_help_button = self.findChild(QPushButton, 'height_z_help_button')
self.buttonBox = self.findChild(QDialogButtonBox, 'buttonBox')
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
class UselessBoxOnPointWidget(QDialog):
def __init__(self, *args, **kwargs):
QDialog.__init__(self, *args, **kwargs)
# load the ui file
self.ui = loadUi(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'useless-box-on-point-ui.ui'),
self,
workingDirectory = os.path.dirname(os.path.abspath(__file__)))
# create aliases for ui elements
self.width_x_spinbox = self.findChild(QDoubleSpinBox, 'width_x_spinbox')
self.width_y_spinbox = self.findChild(QDoubleSpinBox, 'width_y_spinbox')
self.height_x_spinbox = self.findChild(QDoubleSpinBox, 'height_z_spinbox')
self.point_help_button = self.findChild(QPushButton, 'point_help_button')
self.width_x_help_button = self.findChild(QPushButton, 'width_x_help_button')
self.width_y_help_button = self.findChild(QPushButton, 'width_y_help_button')
self.height_z_help_button = self.findChild(QPushButton, 'height_z_help_button')
self.buttonBox = self.findChild(QDialogButtonBox, 'buttonBox')
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
class UselessCylinderWidget(QDialog):
def __init__(self, *args, **kwargs):
QDialog.__init__(self, *args, **kwargs)
# load the ui file
self.ui = loadUi(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'useless-cylinder-ui.ui'),
self,
workingDirectory = os.path.dirname(os.path.abspath(__file__)))
# create aliases for ui elements
self.diameter_spinbox = self.findChild(QDoubleSpinBox, 'diameter_spinbox')
self.height_z_spinbox = self.findChild(QDoubleSpinBox, 'height_z_spinbox')
self.diameter_help_button = self.findChild(QPushButton, 'diameter_help_button')
self.height_z_help_button = self.findChild(QPushButton, 'height_z_help_button')
self.buttonBox = self.findChild(QDialogButtonBox, 'buttonBox')
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
class UselessCylinderThroughLineWidget(QDialog):
def __init__(self, *args, **kwargs):
QDialog.__init__(self, *args, **kwargs)
# load the ui file
self.ui = loadUi(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'useless-cylinder-through-line-ui.ui'),
self,
workingDirectory = os.path.dirname(os.path.abspath(__file__)))
# create aliases for ui elements
self.diameter_spinbox = self.findChild(QDoubleSpinBox, 'diameter_spinbox')
self.diameter_help_button = self.findChild(QPushButton, 'diameter_help_button')
self.line_help_button = self.findChild(QPushButton, 'line_help_button')
self.buttonBox = self.findChild(QDialogButtonBox, 'buttonBox')
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
class UselessCirclePipeAlongPathWidget(QDialog):
def __init__(self, *args, **kwargs):
QDialog.__init__(self, *args, **kwargs)
# load the ui file
self.ui = loadUi(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'useless-circle-pipe-along-path-ui.ui'),
self,
workingDirectory = os.path.dirname(os.path.abspath(__file__)))
# create aliases for ui elements
self.diameter_spinbox = self.findChild(QDoubleSpinBox, 'diameter_spinbox')
self.diameter_help_button = self.findChild(QPushButton, 'diameter_help_button')
self.path_help_button = self.findChild(QPushButton, 'path_help_button')
self.buttonBox = self.findChild(QDialogButtonBox, 'buttonBox')
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
class UselessSquarePipeAlongPathWidget(QDialog):
def __init__(self, *args, **kwargs):
QDialog.__init__(self, *args, **kwargs)
# load the ui file
self.ui = loadUi(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'useless-square-pipe-along-path-ui.ui'),
self,
workingDirectory = os.path.dirname(os.path.abspath(__file__)))
# create aliases for ui elements
self.width_spinbox = self.findChild(QDoubleSpinBox, 'width_spinbox')
self.width_help_button = self.findChild(QPushButton, 'width_help_button')
self.path_help_button = self.findChild(QPushButton, 'path_help_button')
self.buttonBox = self.findChild(QDialogButtonBox, 'buttonBox')
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
class UselessRectanglePipeAlongPathWidget(QDialog):
def __init__(self, *args, **kwargs):
QDialog.__init__(self, *args, **kwargs)
# load the ui file
self.ui = loadUi(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'useless-rectangle-pipe-along-path-ui.ui'),
self,
workingDirectory = os.path.dirname(os.path.abspath(__file__)))
# create aliases for ui elements
self.width_x_spinbox = self.findChild(QDoubleSpinBox, 'width_x_spinbox')
self.width_x_help_button = self.findChild(QPushButton, 'width_x_help_button')
self.width_y_spinbox = self.findChild(QDoubleSpinBox, 'width_y_spinbox')
self.width_y_help_button = self.findChild(QPushButton, 'width_y_help_button')
self.path_help_button = self.findChild(QPushButton, 'path_help_button')
self.buttonBox = self.findChild(QDialogButtonBox, 'buttonBox')
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
class UselessRectangleGridWidget(QDialog):
def __init__(self, *args, **kwargs):
QDialog.__init__(self, *args, **kwargs)
# load the ui file
self.ui = loadUi(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'useless-rectangle-grid-ui.ui'),
self,
workingDirectory = os.path.dirname(os.path.abspath(__file__)))
# create aliases for ui elements
self.width_x_outline_spinbox = self.findChild(QDoubleSpinBox, 'width_x_outline_spinbox')
self.width_x_outline_help_button = self.findChild(QPushButton, 'width_x_help_outline_button')
self.width_y_outline_spinbox = self.findChild(QDoubleSpinBox, 'width_y_outline_spinbox')
self.width_y_outline_help_button = self.findChild(QPushButton, 'width_y_outline_help_button')
self.count_x_spinbox = self.findChild(QSpinBox, 'count_x_spinbox')
self.count_x_help_button = self.findChild(QPushButton, 'count_x_help_button')
self.count_y_spinbox = self.findChild(QSpinBox, 'count_y_spinbox')
self.count_y_help_button = self.findChild(QPushButton, 'count_y_help_button')
self.rib_thickness_spinbox = self.findChild(QDoubleSpinBox, 'rib_thickness_spinbox')
self.rib_thickness_help_button = self.findChild(QPushButton, 'rib_thickness_help_button')
self.buttonBox = self.findChild(QDialogButtonBox, 'buttonBox')
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)