23 from PyQt4
import QtCore, QtGui
30 from scene_selection_helper
import SelHelper
35 QtGui.QWidget.__init__(self, parent)
45 self.
mode_ = gfx.RenderMode.SIMPLE
51 self.radius_spinbox_.setRange(min_line_width, max_line_width)
52 self.radius_spinbox_.setDecimals(2)
53 self.radius_spinbox_.setSingleStep(0.1)
55 simple_label = QtGui.QLabel(
"Wireframe Settings")
56 font = simple_label.font()
59 radius_label = QtGui.QLabel(
"Line Width")
60 aa_label = QtGui.QLabel(
"AA-Lines")
62 grid = QtGui.QGridLayout()
63 grid.addWidget(simple_label,0,0,1,3)
64 grid.addWidget(aa_label, 1, 0, 1, 3)
66 grid.addWidget(radius_label,2,0,1,3)
68 grid.setRowStretch(5,1)
74 self.setMinimumSize(250,100)
77 scene_selection = gui.SceneSelection.Instance()
78 for i
in range(0,scene_selection.GetActiveNodeCount()):
79 node = scene_selection.GetActiveNode(i)
80 node.SetAALines(value)
83 scene_selection = gui.SceneSelection.Instance()
84 for i
in range(0,scene_selection.GetActiveNodeCount()):
85 node = scene_selection.GetActiveNode(i)
86 node.SetLineWidth(value)
89 scene_selection = gui.SceneSelection.Instance()
90 node = scene_selection.GetActiveNode(0)
91 self.radius_spinbox_.setValue(node.GetLineWidth())
96 if SelHelper().CheckNotFlags(SelHelper.HAS_IMG | SelHelper.IS_ONE_TYPE):
97 self.setEnabled(
False)