23 from PyQt5
import QtCore, QtWidgets
24 from .render_mode_widget
import RenderModeWidget
29 RenderModeWidget.__init__(self, parent)
35 self.
mode_mode_ = gfx.RenderMode.TUBE
39 max_spline_detail = 20
51 tube_label = QtWidgets.QLabel(
"Tube Settings")
52 font = tube_label.font()
56 poly_mode_label = QtWidgets.QLabel(
"Poly Mode")
64 spline_label = QtWidgets.QLabel(
"Spline Detail")
67 self.
spline_spinbox_spline_spinbox_.setRange(min_spline_detail, max_spline_detail)
70 arc_label = QtWidgets.QLabel(
"Arc Detail")
73 self.
arc_spinbox_arc_spinbox_.setRange(min_arc_detail, max_arc_detail)
76 radius_label = QtWidgets.QLabel(
"Tube radius")
84 self.
radius_slider_radius_slider_ = QtWidgets.QSlider(QtCore.Qt.Horizontal, self)
85 self.
radius_slider_radius_slider_.setRange(int(min_radius*10.0), int(max_radius*10.0))
86 self.
radius_slider_radius_slider_.setTickPosition(QtWidgets.QSlider.NoTicks)
90 ratio_label = QtWidgets.QLabel(
"Tube ratio")
96 self.
ratio_slider_ratio_slider_ = QtWidgets.QSlider(QtCore.Qt.Horizontal, self)
97 self.
ratio_slider_ratio_slider_.setRange(int(min_ratio*10.0), int(max_ratio*10.0))
98 self.
ratio_slider_ratio_slider_.setTickPosition(QtWidgets.QSlider.NoTicks)
101 grid = QtWidgets.QGridLayout()
102 grid.addWidget(tube_label,0,0,1,3)
103 grid.addWidget(poly_mode_label,1,0,1,3)
105 grid.addWidget(spline_label, 2, 0, 1, 3)
107 grid.addWidget(arc_label,3,0,1,3)
109 grid.addWidget(radius_label,4,0,1,1)
112 grid.addWidget(ratio_label,5,0,1,1)
115 grid.setRowStretch(6,1)
126 self.setMinimumSize(250,200)
129 self.
poly_mode_cb_poly_mode_cb_.setCurrentIndex(options.GetPolyMode())
130 self.
spline_spinbox_spline_spinbox_.setValue(options.GetSplineDetail())
131 self.
arc_spinbox_arc_spinbox_.setValue(options.GetArcDetail())
136 self.
GetOptionsGetOptions().SetPolyMode(value)
140 self.
GetOptionsGetOptions().SetSplineDetail(value)
144 self.
GetOptionsGetOptions().SetArcDetail(value)
148 self.
GetOptionsGetOptions().SetTubeRadius(value)
152 self.
GetOptionsGetOptions().SetTubeRadius(value/10.0)
155 self.
GetOptionsGetOptions().SetTubeRatio(value)
158 self.
GetOptionsGetOptions().SetTubeRatio(value/10.0)
161 value = round(value, 2)
168 value = round(value, 2)
175 return self.
text_text_
178 return self.
mode_mode_