本文整理汇总了Python中PyQt4.QtGui.QDoubleSpinBox.setVisible方法的典型用法代码示例。如果您正苦于以下问题:Python QDoubleSpinBox.setVisible方法的具体用法?Python QDoubleSpinBox.setVisible怎么用?Python QDoubleSpinBox.setVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QDoubleSpinBox
的用法示例。
在下文中一共展示了QDoubleSpinBox.setVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: EditGeometryProperties
# 需要导入模块: from PyQt4.QtGui import QDoubleSpinBox [as 别名]
# 或者: from PyQt4.QtGui.QDoubleSpinBox import setVisible [as 别名]
#.........这里部分代码省略.........
self.opacity_edit.setRange(0.1, 1.0)
self.opacity_edit.setDecimals(1)
self.opacity_edit.setSingleStep(0.1)
self.opacity_edit.setValue(opacity)
if self.use_slider:
self.opacity_slider_edit = QSlider(QtCore.Qt.Horizontal)
self.opacity_slider_edit.setRange(1, 10)
self.opacity_slider_edit.setValue(opacity * 10)
self.opacity_slider_edit.setTickInterval(1)
self.opacity_slider_edit.setTickPosition(QSlider.TicksBelow)
self.line_width = QLabel("Line Width:")
self.line_width_edit = QSpinBox(self)
self.line_width_edit.setRange(1, 15)
self.line_width_edit.setSingleStep(1)
self.line_width_edit.setValue(line_width)
if self.use_slider:
self.line_width_slider_edit = QSlider(QtCore.Qt.Horizontal)
self.line_width_slider_edit.setRange(1, 15)
self.line_width_slider_edit.setValue(line_width)
self.line_width_slider_edit.setTickInterval(1)
self.line_width_slider_edit.setTickPosition(QSlider.TicksBelow)
if self.representation in ['point', 'surface']:
self.line_width.setEnabled(False)
self.line_width_edit.setEnabled(False)
self.line_width_slider_edit.setEnabled(False)
self.point_size = QLabel("Point Size:")
self.point_size_edit = QSpinBox(self)
self.point_size_edit.setRange(1, 15)
self.point_size_edit.setSingleStep(1)
self.point_size_edit.setValue(point_size)
self.point_size.setVisible(False)
self.point_size_edit.setVisible(False)
if self.use_slider:
self.point_size_slider_edit = QSlider(QtCore.Qt.Horizontal)
self.point_size_slider_edit.setRange(1, 15)
self.point_size_slider_edit.setValue(point_size)
self.point_size_slider_edit.setTickInterval(1)
self.point_size_slider_edit.setTickPosition(QSlider.TicksBelow)
self.point_size_slider_edit.setVisible(False)
if self.representation in ['wire', 'surface']:
self.point_size.setEnabled(False)
self.point_size_edit.setEnabled(False)
if self.use_slider:
self.point_size_slider_edit.setEnabled(False)
self.bar_scale = QLabel("Bar Scale:")
self.bar_scale_edit = QDoubleSpinBox(self)
#self.bar_scale_edit.setRange(0.01, 1.0) # was 0.1
#self.bar_scale_edit.setRange(0.05, 5.0)
self.bar_scale_edit.setDecimals(1)
#self.bar_scale_edit.setSingleStep(bar_scale / 10.)
self.bar_scale_edit.setSingleStep(0.1)
self.bar_scale_edit.setValue(bar_scale)
#if self.use_slider:
#self.bar_scale_slider_edit = QSlider(QtCore.Qt.Horizontal)
#self.bar_scale_slider_edit.setRange(1, 100) # 1/0.05 = 100/5.0
#self.bar_scale_slider_edit.setValue(opacity * 0.05)
#self.bar_scale_slider_edit.setTickInterval(10)
#self.bar_scale_slider_edit.setTickPosition(QSlider.TicksBelow)
if self.representation != 'bar':