23 from PyQt5
import QtCore, QtWidgets
24 from .render_mode_widget
import RenderModeWidget
29 RenderModeWidget.__init__(self, parent)
32 self.
text_text_ =
"Helix & Strand Cartoon"
35 self.
mode_mode_ = gfx.RenderMode.HSC
39 max_spline_detail = 20
62 poly_mode_label = QtWidgets.QLabel(
"Poly Mode")
70 spline_label = QtWidgets.QLabel(
"Spline Detail")
73 self.
spline_spinbox_spline_spinbox_.setRange(min_spline_detail, max_spline_detail)
76 arc_label = QtWidgets.QLabel(
"Arc Detail")
79 self.
arc_spinbox_arc_spinbox_.setRange(min_arc_detail, max_arc_detail)
82 tube_label = QtWidgets.QLabel(
"Tube")
83 font = tube_label.font()
87 radius_tube_label = QtWidgets.QLabel(
"Radius")
95 self.
width_tube_slider_width_tube_slider_.setRange(int(min_width*10.0), int(max_tube_width*10.0))
100 ratio_tube_label = QtWidgets.QLabel(
"Ratio")
108 self.
thickness_tube_slider_thickness_tube_slider_.setRange(int(min_tube_ratio*10.0), int(max_tube_ratio*10))
113 tube_profile_label = QtWidgets.QLabel(
"Tube Profile Type")
118 helix_label = QtWidgets.QLabel(
"Helix")
119 font = helix_label.font()
123 radius_helix_label = QtWidgets.QLabel(
"Width")
131 self.
width_helix_slider_width_helix_slider_.setRange(int(min_width*10.0), int(max_width*10.0))
136 ratio_helix_label = QtWidgets.QLabel(
"Thickness")
149 ecc_helix_label = QtWidgets.QLabel(
"ECC")
157 self.
ecc_helix_slider_ecc_helix_slider_.setRange(int(min_ecc*10), int(max_ecc*10))
158 self.
ecc_helix_slider_ecc_helix_slider_.setTickPosition(QtWidgets.QSlider.NoTicks)
162 helix_profile_label = QtWidgets.QLabel(
"Helix Profile Type")
167 helix_mode_label = QtWidgets.QLabel(
"Helix Render Mode")
172 strand_label = QtWidgets.QLabel(
"Strand")
173 font = strand_label.font()
177 radius_strand_label = QtWidgets.QLabel(
"Width")
190 ratio_strand_label = QtWidgets.QLabel(
"Thickness")
203 ecc_strand_label = QtWidgets.QLabel(
"ECC")
216 strand_profile_label = QtWidgets.QLabel(
"Strand Profile Type")
221 strand_mode_label = QtWidgets.QLabel(
"Strand Render Mode")
227 grid = QtWidgets.QGridLayout()
228 grid.addWidget(poly_mode_label,row,0,1,1)
231 grid.addWidget(spline_label, row, 0, 1, 3)
234 grid.addWidget(arc_label,row,0,1,3)
237 grid.addWidget(tube_label, row, 0, 1, 3)
239 grid.addWidget(radius_tube_label, row, 0, 1, 1)
243 grid.addWidget(ratio_tube_label, row, 0, 1, 1)
247 grid.addWidget(tube_profile_label, row, 0, 1, 3)
250 grid.addWidget(helix_label, row, 0, 1, 3)
252 grid.addWidget(radius_helix_label, row, 0, 1, 1)
256 grid.addWidget(ratio_helix_label, row, 0, 1, 1)
260 grid.addWidget(ecc_helix_label, row, 0, 1, 1)
264 grid.addWidget(helix_profile_label, row, 0, 1, 3)
267 grid.addWidget(helix_mode_label, row, 0, 1, 3)
270 grid.addWidget(strand_label, row, 0, 1, 3)
272 grid.addWidget(radius_strand_label, row, 0, 1, 1)
276 grid.addWidget(ratio_strand_label, row, 0, 1, 1)
280 grid.addWidget(ecc_strand_label, row, 0, 1, 1)
284 grid.addWidget(strand_profile_label, row, 0, 1, 3)
287 grid.addWidget(strand_mode_label, row, 0, 1, 3)
290 grid.setRowStretch(row+1,1)
321 self.setMinimumSize(250,550)
325 self.
poly_mode_cb_poly_mode_cb_.setCurrentIndex(options.GetPolyMode())
326 self.
spline_spinbox_spline_spinbox_.setValue(options.GetSplineDetail())
327 self.
arc_spinbox_arc_spinbox_.setValue(options.GetArcDetail())
344 self.
GetOptionsGetOptions().SetPolyMode(value)
348 self.
GetOptionsGetOptions().SetSplineDetail(value)
352 self.
GetOptionsGetOptions().SetArcDetail(value)
356 self.
GetOptionsGetOptions().SetTubeRadius(value)
360 self.
GetOptionsGetOptions().SetTubeRadius(value/10.0)
364 self.
GetOptionsGetOptions().SetTubeRatio(value)
368 self.
GetOptionsGetOptions().SetTubeRatio(value/10.0)
372 self.
GetOptionsGetOptions().SetTubeProfileType(value)
376 self.
GetOptionsGetOptions().SetHelixWidth(value)
380 self.
GetOptionsGetOptions().SetHelixWidth(value/10.0)
384 self.
GetOptionsGetOptions().SetHelixThickness(value)
388 self.
GetOptionsGetOptions().SetHelixThickness(value/10.0)
392 self.
GetOptionsGetOptions().SetHelixEcc(value)
396 self.
GetOptionsGetOptions().SetHelixProfileType(value)
400 self.
GetOptionsGetOptions().SetHelixMode(value)
404 self.
GetOptionsGetOptions().SetHelixEcc(value/10.0)
408 self.
GetOptionsGetOptions().SetStrandWidth(value)
412 self.
GetOptionsGetOptions().SetStrandWidth(value/10.0)
416 self.
GetOptionsGetOptions().SetStrandThickness(value)
420 self.
GetOptionsGetOptions().SetStrandThickness(value/10.0)
424 self.
GetOptionsGetOptions().SetStrandEcc(value)
428 self.
GetOptionsGetOptions().SetStrandEcc(value/10.0)
432 self.
GetOptionsGetOptions().SetStrandProfileType(value)
436 self.
GetOptionsGetOptions().SetStrandMode(value)
440 value = round(value, 2)
447 value = round(value, 2)
454 value = round(value, 2)
461 value = round(value, 2)
468 value = round(value, 2)
475 value = round(value, 2)
482 value = round(value, 2)
489 value = round(value, 2)
496 return self.
text_text_
499 return self.
mode_mode_