Panda3D
Public Member Functions | List of all members
DWBPackageInstaller Class Reference
Inheritance diagram for DWBPackageInstaller:
DirectWaitBar PackageInstaller DirectFrame DirectObject DirectGuiWidget DirectGuiBase

Public Member Functions

def __init__ (self, appRunner, parent=None, kw)
 
def cleanup (self)
 
def destroy (self)
 
def downloadFinished (self, success)
 
def downloadProgress (self, overallProgress)
 
def packageProgress (self, package, progress)
 
def packageStarted (self, package)
 
- Public Member Functions inherited from DirectWaitBar
def __init__ (self, parent=None, kw)
 
def destroy (self)
 
def finish (self, N=10)
 
def getPercent (self)
 
def setBarBorderWidth (self)
 
def setBarColor (self)
 
def setBarRelief (self)
 
def setBarTexture (self)
 
def setRange (self)
 
def setValue (self)
 
def update (self, value)
 
def updateBarStyle (self)
 
- Public Member Functions inherited from DirectFrame
def __init__ (self, parent=None, kw)
 
def destroy (self)
 
def setGeom (self)
 
def setImage (self)
 
def setText (self)
 
- Public Member Functions inherited from DirectGuiWidget
def __init__ (self, parent=None, kw)
 
def copyOptions (self, other)
 
def destroy (self)
 
def disableEdit (self)
 
def editStart (self, event)
 
def editStop (self, event)
 
def enableEdit (self)
 
def frameInitialiseFunc (self)
 
def getBounds (self, state=0)
 
def getCenter (self)
 
def getFrameType (self, state=0)
 
def getHeight (self)
 
def getWidth (self)
 
def guiDragTask (self, state)
 
def guiScaleTask (self, state)
 
def printConfig (self, indent=0)
 
def resetFrameSize (self)
 
def setBorderUvWidth (self)
 
def setBorderWidth (self)
 
def setFrameColor (self)
 
def setFrameSize (self, fClearFrame=0)
 
def setFrameTexture (self)
 
def setFrameVisibleScale (self)
 
def setProp (self, propString, value)
 
def setRelief (self, fSetStyle=1)
 
def setState (self)
 
def taskName (self, idString)
 
def uniqueName (self, idString)
 
def updateFrameStyle (self)
 
- Public Member Functions inherited from DirectGuiBase
def __init__ (self)
 
def __setitem__ (self, key, value)
 
def addoptions (self, optionDefs, optionkeywords)
 
def bind (self, event, command, extraArgs=[])
 
def cget (self, option)
 
def component (self, name)
 
def components (self)
 
def configure (self, option=None, kw)
 
def createcomponent (self, componentName, componentAliases, componentGroup, widgetClass, widgetArgs, kw)
 
def defineoptions (self, keywords, optionDefs, dynamicGroups=())
 
def destroy (self)
 
def destroycomponent (self, name)
 
def hascomponent (self, component)
 
def initialiseoptions (self, myClass)
 
def isinitoption (self, option)
 
def options (self)
 
def postInitialiseFunc (self)
 
def unbind (self, event)
 
- Public Member Functions inherited from PackageInstaller
def __init__ (self, appRunner, taskChain='default')
 
def addPackage (self, packageName, version=None, hostUrl=None)
 
def cleanup (self)
 
def destroy (self)
 
def donePackages (self)
 
def downloadFinished (self, success)
 
def downloadProgress (self, overallProgress)
 
def downloadStarted (self)
 
def packageFinished (self, package, success)
 
def packageProgress (self, package, progress)
 
def packageStarted (self, package)
 
- Public Member Functions inherited from DirectObject
def __init__ (self)
 
def accept (self, event, method, extraArgs=[])
 
def acceptOnce (self, event, method, extraArgs=[])
 
def addTask (self, args, kwargs)
 
def detectLeaks (self)
 
def doMethodLater (self, args, kwargs)
 
def getAllAccepting (self)
 
def ignore (self, event)
 
def ignoreAll (self)
 
def isAccepting (self, event)
 
def isIgnoring (self, event)
 
def removeAllTasks (self)
 
def removeTask (self, taskOrName)
 

Additional Inherited Members

- Public Attributes inherited from DirectWaitBar
 barStyle
 
- Public Attributes inherited from DirectGuiWidget
 bounds
 
 frameStyle
 
 guiId
 
 guiItem
 
 ll
 
 stateNodePath
 
 ur
 
- Public Attributes inherited from DirectGuiBase
 fInit
 
 guiId
 
 postInitialiseFuncList
 
- Public Attributes inherited from PackageInstaller
 appRunner
 
 callbackLock
 
 calledDownloadFinished
 
 calledDownloadStarted
 
 descFileTask
 
 done
 
 downloadTask
 
 earlyDone
 
 failed
 
 needsDescFile
 
 needsDownload
 
 packageLock
 
 packages
 
 progressTask
 
 state
 
 taskChain
 
 uniqueId
 
- Static Public Attributes inherited from DirectFrame
tuple DefDynGroups = ('text', 'geom', 'image')
 
- Static Public Attributes inherited from DirectGuiWidget
float gridSpacing = 0.05
 
dictionary guiDict = {}
 
 guiEdit = get_config_showbase().GetBool('direct-gui-edit', 0)
 
 inactiveInitState = DGG.NORMAL
 
int snapToGrid = 0
 
- Static Public Attributes inherited from PackageInstaller
 globalLock = Lock()
 
int nextUniqueId = 1
 
 notify = directNotify.newCategory("PackageInstaller")
 
int S_done = 3
 
int S_initial = 0
 
int S_ready = 1
 
int S_started = 2
 

Detailed Description

This class presents a PackageInstaller that also inherits from
DirectWaitBar, so it updates its own GUI as it downloads.

Specify perPackage = True to make the progress bar reset for each
package, or False (the default) to show one continuous progress
bar for all packages.

Specify updateText = True (the default) to update the text label
with the name of the package or False to leave it up to you to set
it.

You can specify a callback function with finished = func; this
function will be called, with one boolean parameter, when the
download has completed.  The parameter will be true on success, or
false on failure.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  appRunner,
  parent = None,
  kw 
)

Member Function Documentation

◆ cleanup()

def cleanup (   self)

◆ destroy()

def destroy (   self)

◆ downloadFinished()

def downloadFinished (   self,
  success 
)
This callback is made when all of the packages have been
downloaded and installed (or there has been some failure).  If
all packages where successfully installed, success is True.

If there were no packages that required downloading, this
callback will be made immediately, *without* a corresponding
call to downloadStarted(). 

◆ downloadProgress()

def downloadProgress (   self,
  overallProgress 
)
This callback is made repeatedly between downloadStarted()
and downloadFinished() to update the current progress through
all packages.  The progress value ranges from 0 (beginning) to
1 (complete). 

◆ packageProgress()

def packageProgress (   self,
  package,
  progress 
)
This callback is made repeatedly between packageStarted()
and packageFinished() to update the current progress on the
indicated package only.  The progress value ranges from 0
(beginning) to 1 (complete). 

◆ packageStarted()

def packageStarted (   self,
  package 
)
This callback is made for each package between
downloadStarted() and downloadFinished() to indicate the start
of a new package.