Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
DialWidget Class Reference
Inheritance diagram for DialWidget:

## Public Member Functions
| __init__ (self, parent=None, **kw)
| computeDialAngle (self, event, fShift=0)
| computeValueFromAngle (self, dialAngle)
| get (self)
| highlightKnob (self, event)
| knobMouseDown (self, event)
| knobMouseUp (self, event)
| mouseDown (self, event)
| Canvas callback functions Dial.
| mouseMotion (self, event, fShift=0)
| mouseUp (self, event)
| restoreKnob (self, event)
| set (self, value, fCommand=1)
| setBackground (self)
| setBorderwidth (self)
| setNumDigits (self)
| setNumSegments (self)
| setRelief (self)
| shiftMouseMotion (self, event)
| updateDialSF (self, event)
| updateDialTask (self, state)
| updateIndicator (self, value)
| updateIndicatorDegrees (self, degAngle)
| updateIndicatorRadians (self, dialAngle)

## Public Attributes
float | knobSF = 0.0
| lastAngle = self.computeDialAngle(event)
| minExp
int | rollCount = 0
| snapAngle = TWO_PI / numSegments
| updateTask = taskMgr.add(self.updateDialTask, 'updateDial')
| value = value

## Protected Member Functions
| _onButtonPress (self, *args)
| _onButtonRelease (self, *args)

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self,
|  |  | parent = None,
|  | ** | kw )

## Member Function Documentation

## ◆ _onButtonPress()

_onButtonPress | ( |  | self,
|  | * | args )
| protected

     User redefinable callback executed on button press

## ◆ _onButtonRelease()

_onButtonRelease | ( |  | self,
|  | * | args )
| protected

     User redefinable callback executed on button release

## ◆ computeDialAngle()

computeDialAngle | ( |  | self,
|  |  | event,
|  |  | fShift = 0 )

## ◆ computeValueFromAngle()

computeValueFromAngle | ( |  | self,
|  |  | dialAngle )

## ◆ get()

get | ( |  | self | ) |

    self.get()
    Get current dial value

## ◆ highlightKnob()

highlightKnob | ( |  | self,
|  |  | event )

## ◆ knobMouseDown()

knobMouseDown | ( |  | self,
|  |  | event )

## ◆ knobMouseUp()

knobMouseUp | ( |  | self,
|  |  | event )

## ◆ mouseDown()

mouseDown | ( |  | self,
|  |  | event )

Canvas callback functions Dial.

## ◆ mouseMotion()

mouseMotion | ( |  | self,
|  |  | event,
|  |  | fShift = 0 )

## ◆ mouseUp()

mouseUp | ( |  | self,
|  |  | event )

## ◆ restoreKnob()

restoreKnob | ( |  | self,
|  |  | event )

## ◆ set()

set | ( |  | self,
|  |  | value,
|  |  | fCommand = 1 )

    self.set(value, fCommand = 1)
    Set dial to new value, execute command if fCommand == 1

## ◆ setBackground()

setBackground | ( |  | self | ) |

## ◆ setBorderwidth()

setBorderwidth | ( |  | self | ) |

## ◆ setNumDigits()

setNumDigits | ( |  | self | ) |

## ◆ setNumSegments()

setNumSegments | ( |  | self | ) |

## ◆ setRelief()

setRelief | ( |  | self | ) |

## ◆ shiftMouseMotion()

shiftMouseMotion | ( |  | self,
|  |  | event )

## ◆ updateDialSF()

updateDialSF | ( |  | self,
|  |  | event )

## ◆ updateDialTask()

updateDialTask | ( |  | self,
|  |  | state )

## ◆ updateIndicator()

updateIndicator | ( |  | self,
|  |  | value )

## ◆ updateIndicatorDegrees()

updateIndicatorDegrees | ( |  | self,
|  |  | degAngle )

## ◆ updateIndicatorRadians()

updateIndicatorRadians | ( |  | self,
|  |  | dialAngle )

## Member Data Documentation

## ◆ knobSF

float knobSF = 0.0

## ◆ lastAngle

lastAngle = self.computeDialAngle(event)

## ◆ minExp

minExp

Initial value:
= math.floor(-self['numDigits']/
math.log10(Valuator.sfBase))

## ◆ rollCount

int rollCount = 0

## ◆ snapAngle

snapAngle = TWO_PI / numSegments

## ◆ updateTask

updateTask = taskMgr.add(self.updateDialTask, 'updateDial')

## ◆ value

value = value