23 from PyQt5
import QtCore, QtWidgets
24 from .render_mode_widget
import RenderModeWidget
29 RenderModeWidget.__init__(self, parent)
35 self.
mode_ = gfx.RenderMode.TRACE
47 arc_label = QtWidgets.QLabel(
"Arc Detail")
50 self.arc_spinbox_.setRange(min_arc_detail, max_arc_detail)
53 radius_tube_label = QtWidgets.QLabel(
"Radius")
56 self.width_tube_spinbox_.setRange(min_width, max_tube_width)
57 self.width_tube_spinbox_.setDecimals(1)
58 self.width_tube_spinbox_.setSingleStep(0.1)
61 self.width_tube_slider_.setRange(int(min_width*10.0), int(max_tube_width*10.0))
62 self.width_tube_slider_.setTickPosition(QtWidgets.QSlider.NoTicks)
63 self.width_tube_slider_.setTickInterval(1)
65 grid = QtWidgets.QGridLayout()
66 grid.addWidget(arc_label,3,0,1,3)
69 grid.addWidget(radius_tube_label, 5, 0, 1, 1)
73 grid.setRowStretch(15,1)
80 self.setMinimumSize(250,60)
83 self.arc_spinbox_.setValue(options.GetArcDetail())
88 self.GetOptions().SetPolyMode(value)
92 self.GetOptions().SetArcDetail(value)
96 self.GetOptions().SetTubeRadius(value)
99 self.GetOptions().SetTubeRadius(value/10.0)
102 value = round(value, 2)
103 if(abs(value*10.0 - self.width_tube_slider_.value())>=self.width_tube_slider_.singleStep()):
104 self.width_tube_slider_.setValue(int(value*10.0))
105 if(abs(value - self.width_tube_spinbox_.value())>=self.width_tube_spinbox_.singleStep()):
106 self.width_tube_spinbox_.setValue(value)