23 from PyQt4
import QtCore, QtGui
24 from render_mode_widget
import RenderModeWidget
29 RenderModeWidget.__init__(self, parent)
41 self.
mode_ = gfx.RenderMode.SIMPLE
47 self.radius_spinbox_.setRange(min_line_width, max_line_width)
48 self.radius_spinbox_.setDecimals(2)
49 self.radius_spinbox_.setSingleStep(0.1)
54 self.bo_distance_spinbox_.setRange(min_bo_dist, max_bo_dist)
55 self.bo_distance_spinbox_.setDecimals(2)
56 self.bo_distance_spinbox_.setSingleStep(0.01)
58 simple_label = QtGui.QLabel(
"Fast Bonds Simple Settings")
59 font = simple_label.font()
62 radius_label = QtGui.QLabel(
"Line Width")
63 aa_label = QtGui.QLabel(
"AA-Lines")
64 bo_label = QtGui.QLabel(
"Show Bond Order")
65 bo_distance = QtGui.QLabel(
"Bond Order Distance")
67 grid = QtGui.QGridLayout()
68 grid.addWidget(simple_label,0,0,1,3)
69 grid.addWidget(aa_label, 1, 0, 1, 3)
71 grid.addWidget(radius_label,2,0,1,3)
73 grid.addWidget(bo_label, 3, 0, 1, 3)
75 grid.addWidget(bo_distance, 4, 0, 1, 3)
77 grid.setRowStretch(5,1)
84 self.setMinimumSize(250,140)
86 self.setMinimumSize(250,140)
89 self.GetOptions().SetAALines(value)
93 self.GetOptions().SetLineWidth(value)
97 self.GetOptions().SetBondOrderFlag(value)
101 self.GetOptions().SetBondOrderDistance(value)
105 self.aa_rendering_cb_.setChecked(options.GetAALines())
106 self.radius_spinbox_.setValue(options.GetLineWidth())
107 self.bo_rendering_cb_.setChecked(options.GetBondOrderFlag())
108 self.bo_distance_spinbox_.setValue(options.GetBondOrderDistance())