Python pyqtgraph.ColorButton() Examples

The following are 1 code examples of pyqtgraph.ColorButton(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module pyqtgraph , or try the search function .
Example #1
Source File: picopyscope.py    From picosdk-python-examples with ISC License 5 votes vote down vote up
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)