Qudi
Public Member Functions | Public Attributes | List of all members
guiutils.ColorBar Class Reference

Create a ColorBar according to a previously defined color map. More...

Inheritance diagram for guiutils.ColorBar:
Inheritance graph
[legend]
Collaboration diagram for guiutils.ColorBar:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, cmap, width, cb_min, cb_max)
 
def refresh_colorbar (self, cb_min, cb_max, width=None, height=None, xMin=None, yMin=None)
 Refresh the appearance of the colorbar for a changed count range. More...
 
def paint (self, p, args)
 Overwrite the paint method from GraphicsObject. More...
 
def boundingRect (self)
 Overwrite the paint method from GraphicsObject. More...
 

Public Attributes

 colors
 
 stops
 
 width
 
 pic
 

Detailed Description

Create a ColorBar according to a previously defined color map.

Parameters
objectpyqtgraph.ColorMap cmap: a defined colormap
floatwidth: width of the colorbar in x direction, starting from the origin.
numpy.arrayticks: optional, definition of the relative ticks marks

Member Function Documentation

◆ boundingRect()

def guiutils.ColorBar.boundingRect (   self)

Overwrite the paint method from GraphicsObject.

Get the position, width and hight of the displayed object.

◆ paint()

def guiutils.ColorBar.paint (   self,
  p,
  args 
)

Overwrite the paint method from GraphicsObject.

Parameters
objectp: a pyqtgraph.QtGui.QPainter object, which is used to set the color of the pen.

Since this colorbar object is in the end a GraphicsObject, it will drop an implementation error, since you have to write your own paint function for the created GraphicsObject.

◆ refresh_colorbar()

def guiutils.ColorBar.refresh_colorbar (   self,
  cb_min,
  cb_max,
  width = None,
  height = None,
  xMin = None,
  yMin = None 
)

Refresh the appearance of the colorbar for a changed count range.

Parameters
floatcb_min: The minimal count value should be passed here.
floatcb_max: The maximal count value should be passed here.
floatwidth: optional, with that you can change the width of the colorbar in the display.

The documentation for this class was generated from the following file: