23 from PyQt4
import QtCore, QtGui
24 from render_mode_widget
import RenderModeWidget
29 RenderModeWidget.__init__(self, parent)
35 self.
mode_ = gfx.RenderMode.TRACE
47 arc_label = QtGui.QLabel(
"Arc Detail")
50 self.arc_spinbox_.setRange(min_arc_detail, max_arc_detail)
53 radius_tube_label = QtGui.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(min_width*10.0, max_tube_width*10.0)
62 self.width_tube_slider_.setTickPosition(QtGui.QSlider.NoTicks)
63 self.width_tube_slider_.setTickInterval(1)
65 grid = QtGui.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)
76 QtCore.QObject.connect(self.
arc_spinbox_, QtCore.SIGNAL(
"valueChanged(int)"),
80 QtCore.SIGNAL(
"valueChanged(double)"),
83 QtCore.SIGNAL(
"valueChanged(int)"),
86 self.setMinimumSize(250,60)
89 self.arc_spinbox_.setValue(options.GetArcDetail())
94 self.GetOptions().SetPolyMode(value)
98 self.GetOptions().SetArcDetail(value)
102 self.GetOptions().SetTubeRadius(value)
105 self.GetOptions().SetTubeRadius(value/10.0)
108 value = round(value, 2)
109 if(abs(value*10.0 - self.width_tube_slider_.value())>=self.width_tube_slider_.singleStep()):
110 self.width_tube_slider_.setValue(value*10.0)
111 if(abs(value - self.width_tube_spinbox_.value())>=self.width_tube_spinbox_.singleStep()):
112 self.width_tube_spinbox_.setValue(value)