Eidolon
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
BaseSpectrumWidget Class Reference
Inheritance diagram for BaseSpectrumWidget:
Inheritance graph
Collaboration diagram for BaseSpectrumWidget:
Collaboration graph

Classes

class  SmallButton
 

Public Member Functions

def __init__ (self, parent=None, minheight=240)
 
def getValues (self)
 
def setValues (self, colorIndex=None, alphaIndex=None)
 
def interpolateColor (self, t)
 
def setLinearAlpha (self, linear)
 
def setDoubleHeight (self, dblHeight)
 
def getSpectrumDim (self)
 
def mousePressEvent (self, e)
 
def mouseDoubleClickEvent (self, e)
 
def wheelEvent (self, e)
 
def mouseMoveEvent (self, e)
 
def keyPressEvent (self, e)
 
def paintEvent (self, e)
 

Public Attributes

 minheight
 
 isDblHeight
 
 bg
 
 bar
 
 colors
 
 colorpos
 
 alphactrls
 
 bottomheight
 
 margin
 
 markerheight
 
 markerwidth
 
 markerangle
 
 ctrlradius
 
 isLinearAlpha
 
 colorselected
 
 alphaselected
 
 delMarker
 
 expandMarker
 
 linMarker
 
 minv
 
 maxv
 
 minx
 
 maxx
 

Static Public Attributes

 UPARROW
 
 DOWNARROW
 

Private Member Functions

def _markerRect (self, i)
 
def _getMarkerIndex (self, x, y)
 
def _getCtrlIndex (self, x, y)
 
def _chooseColor (self)
 
def _setSelectedColorPos (self, pos)
 
def _setSelectedAlphaPos (self, x, y)
 
def _remove (self)
 
def _setMouseToolTip (self, x, y)
 

Detailed Description

This widget implements a generic color spectrum with an alpha curve. The interface is defined a number of template
methods that are used to pass data between instances of this widget and an associated spectrum object. It stores
colors, positions, and alpha values, but does not define interpolation, this is left to the associated object.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  parent = None,
  minheight = 240 
)

Member Function Documentation

◆ _chooseColor()

def _chooseColor (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _getCtrlIndex()

def _getCtrlIndex (   self,
  x,
  y 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _getMarkerIndex()

def _getMarkerIndex (   self,
  x,
  y 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _markerRect()

def _markerRect (   self,
  i 
)
private
Get the dimensions of the rectangular marker area.
Here is the caller graph for this function:

◆ _remove()

def _remove (   self)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _setMouseToolTip()

def _setMouseToolTip (   self,
  x,
  y 
)
private
Here is the call graph for this function:

◆ _setSelectedAlphaPos()

def _setSelectedAlphaPos (   self,
  x,
  y 
)
private
Here is the caller graph for this function:

◆ _setSelectedColorPos()

def _setSelectedColorPos (   self,
  pos 
)
private
Here is the caller graph for this function:

◆ getSpectrumDim()

def getSpectrumDim (   self)
Get the dimensions of the spectrum area.
Here is the caller graph for this function:

◆ getValues()

def getValues (   self)
Copy values from the spectrum object into members `colors', `colorpos', `alphactrls', and `isLinearAlpha'.
Here is the caller graph for this function:

◆ interpolateColor()

def interpolateColor (   self,
  t 
)
Get the interpolated color in the spectrum at unit position `t'.
Here is the caller graph for this function:

◆ keyPressEvent()

def keyPressEvent (   self,
  e 
)
Here is the call graph for this function:

◆ mouseDoubleClickEvent()

def mouseDoubleClickEvent (   self,
  e 
)
Here is the call graph for this function:

◆ mouseMoveEvent()

def mouseMoveEvent (   self,
  e 
)
Here is the call graph for this function:

◆ mousePressEvent()

def mousePressEvent (   self,
  e 
)
Here is the call graph for this function:

◆ paintEvent()

def paintEvent (   self,
  e 
)
Here is the call graph for this function:

◆ setDoubleHeight()

def setDoubleHeight (   self,
  dblHeight 
)
Here is the caller graph for this function:

◆ setLinearAlpha()

def setLinearAlpha (   self,
  linear 
)
Set the alpha curve to be linear if `linear' is True, otherwise it's a cubic curve.
Here is the caller graph for this function:

◆ setValues()

def setValues (   self,
  colorIndex = None,
  alphaIndex = None 
)
Set the values in the spectrum object. If `colorIndex' is not None, the color value from `color' and
`colorpos' is set to that index in the object. If `alphaIndex' is not None, the alpha value from `alphactrls'
is set to that index. If both are None, all the values from `color', `colorpos', and `alphactrls' are set in
the spectrum object.
Here is the caller graph for this function:

◆ wheelEvent()

def wheelEvent (   self,
  e 
)
Here is the call graph for this function:

Member Data Documentation

◆ alphactrls

alphactrls

◆ alphaselected

alphaselected

◆ bar

bar

◆ bg

bg

◆ bottomheight

bottomheight

◆ colorpos

colorpos

◆ colors

colors

◆ colorselected

colorselected

◆ ctrlradius

ctrlradius

◆ delMarker

delMarker

◆ DOWNARROW

DOWNARROW
static

◆ expandMarker

expandMarker

◆ isDblHeight

isDblHeight

◆ isLinearAlpha

isLinearAlpha

◆ linMarker

linMarker

◆ margin

margin

◆ markerangle

markerangle

◆ markerheight

markerheight

◆ markerwidth

markerwidth

◆ maxv

maxv

◆ maxx

maxx

◆ minheight

minheight

◆ minv

minv

◆ minx

minx

◆ UPARROW

UPARROW
static

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