Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _create_main_frame(self):
"""Create main frame and layout."""
self.main_frame = QtGui.QWidget()
self.frame_editor = PositionEulerEditor(
self.base_frame, self.xlim, self.ylim, self.zlim)
self.connect(self.frame_editor, QtCore.SIGNAL("frameChanged()"),
self._on_update)
frame_selection = self._create_frame_selector()
plot = self._create_plot()
vbox = QtGui.QVBoxLayout()
vbox.addWidget(self.frame_editor)
vbox.addWidget(frame_selection)
vbox.addWidget(plot)
main_layout = QtGui.QHBoxLayout()
main_layout.addLayout(vbox)
def __init__(self, base_frame, xlim, ylim, zlim, parent=None):
super(PositionEulerEditor, self).__init__(parent)
self.dim_labels = ["x", "y", "z", "X", "Y'", "Z''"]
self.limits = [xlim, ylim, zlim,
(-3.141, 3.141), (-1.570, 1.570), (-3.141, 3.141)]
self.n_slider_steps = [int(100 * (upper - lower)) + 1
for lower, upper in self.limits]
self.setLayout(self._create(base_frame))