本文整理匯總了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)