23 from PyQt4
import QtCore, QtGui
24 from render_mode_widget
import RenderModeWidget
29 RenderModeWidget.__init__(self, parent)
35 self.
mode_ = gfx.RenderMode.SLINE
46 self.detail_spinbox_.setRange(min_detail, max_detail)
47 self.detail_spinbox_.setSingleStep(1)
52 self.radius_spinbox_.setRange(min_line_width, max_line_width)
53 self.radius_spinbox_.setDecimals(2)
54 self.radius_spinbox_.setSingleStep(0.1)
56 sline_label = QtGui.QLabel(
"Spline Settings")
57 font = sline_label.font()
60 detail_label = QtGui.QLabel(
"Spline Detail")
61 aa_label = QtGui.QLabel(
"AA-Lines")
62 radius_label = QtGui.QLabel(
"Line Width")
63 grid = QtGui.QGridLayout()
64 grid.addWidget(sline_label, 0, 0, 1, 1)
65 grid.addWidget(detail_label, 1, 0, 1, 3)
67 grid.addWidget(aa_label, 2, 0, 1, 3)
69 grid.addWidget(radius_label, 3, 0, 1, 3)
71 grid.setRowStretch(4,1)
78 self.setMinimumSize(250,120)
81 self.GetOptions().SetSplineDetail(value)
85 self.GetOptions().SetAALines(value)
89 self.GetOptions().SetLineWidth(value)
93 self.detail_spinbox_.setValue(options.GetSplineDetail())
94 self.aa_rendering_cb_.setChecked(options.GetAALines())
95 self.radius_spinbox_.setValue(options.GetLineWidth())