本文整理汇总了Python中pyqtgraph.ColorButton方法的典型用法代码示例。如果您正苦于以下问题:Python pyqtgraph.ColorButton方法的具体用法?Python pyqtgraph.ColorButton怎么用?Python pyqtgraph.ColorButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyqtgraph
的用法示例。
在下文中一共展示了pyqtgraph.ColorButton方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import pyqtgraph [as 别名]
# 或者: from pyqtgraph import ColorButton [as 别名]
def __init__(self, number):
self.number = number
self.letter = self.chanstr[self.number]
self.longName = "Channel %s" % self.letter
self.shortName = "Ch %s" % self.letter
self.dock = Dock(self.longName, area=None, size=(100, 50), widget=None, hideTitle=False, autoOrientation=False)
self.dock.setFixedHeight(50)
self.widget = pg.LayoutWidget()
self.dock.addWidget(self.widget, row=0, col=0, rowspan=1, colspan=1)
self.enabled = QtGui.QCheckBox("")
self.enabled.stateChanged.connect(self._enabledChange)
self.widget.addWidget(self.enabled, row=0, col=0, rowspan=0, colspan=1)
self.pen = self.pens[self.number]
self.picker = pg.ColorButton(color=self.pen.color())
self.picker.sigColorChanging.connect(self.pickChange)
self.picker.sigColorChanged.connect(self.pickDone)
self.picker.setFixedSize(28, 21)
self.picker.setFlat(True)
self.widget.addWidget(self.picker, row=0, col=2, rowspan=0, colspan=1)
self.ranges = QtGui.QComboBox()
self.ranges.currentIndexChanged.connect(self._rangesChange)
self.widget.addWidget(self.ranges, row=0, col=3, rowspan=0, colspan=500)
self.plot = None
self.xdata = None
self.ydata = None
self.enum = None
self.range = None
self.rangeMap = {}
self.resetRange = False
self.lock = th.Lock()
if self.lock.acquire(False):
self.lock.release()
self.freeze(True)
self.ranges.setEnabled(False)