23 from PyQt5
import QtCore, QtWidgets
24 from .render_mode_widget
import RenderModeWidget
29 RenderModeWidget.__init__(self, parent)
32 self.
text_text_ =
"Ball & Stick"
36 max_sphere_detail = 12
48 self.
mode_mode_ = gfx.RenderMode.CUSTOM
53 self.
sphere_spinbox_sphere_spinbox_.setRange(min_sphere_detail, max_sphere_detail)
56 self.
arc_spinbox_arc_spinbox_.setRange(min_arc_detail, max_arc_detail)
59 radius_bond_label = QtWidgets.QLabel(
"Bond Radius")
67 self.
radius_bond_slider_radius_bond_slider_.setRange(int(min_rad*100.0), int(max_bond_rad*100.0))
73 radius_sphere_label = QtWidgets.QLabel(
"Sphere Radius")
81 self.
radius_sphere_slider_radius_sphere_slider_.setRange(int(min_rad*100.0), int(max_sphere_rad*100.0))
85 custom_label = QtWidgets.QLabel(self.
text_text_)
86 font = custom_label.font()
89 sphere_label = QtWidgets.QLabel(
"Sphere Detail")
90 arc_label = QtWidgets.QLabel(
"Arc Detail")
91 grid = QtWidgets.QGridLayout()
92 grid.addWidget(custom_label,0,0,1,1)
93 grid.addWidget(sphere_label, 1, 0, 1, 3)
95 grid.addWidget(arc_label,2,0,1,3)
98 grid.addWidget(radius_bond_label, 3, 0, 1, 1)
102 grid.addWidget(radius_sphere_label, 4, 0, 1, 1)
106 grid.setRowStretch(3,1)
118 self.setMinimumSize(250,150)
121 self.
GetOptionsGetOptions().SetSphereDetail(value)
125 self.
GetOptionsGetOptions().SetArcDetail(value)
131 self.
GetOptionsGetOptions().SetSphereRad(value)
135 self.
GetOptionsGetOptions().SetBondRad(value/100.0)
139 self.
GetOptionsGetOptions().SetSphereRad(value)
145 self.
GetOptionsGetOptions().SetSphereRad(value/100.0)
149 value = round(value, 2)
156 value = round(value, 2)
163 self.
sphere_spinbox_sphere_spinbox_.setValue(options.GetSphereDetail())
164 self.
arc_spinbox_arc_spinbox_.setValue(options.GetArcDetail())
170 return self.
text_text_
173 return self.
mode_mode_