Panda3D
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties
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__
 
def cleanup
 
def destroy
 
def downloadFinished
 
def downloadProgress
 
def packageProgress
 
def packageStarted
 
- Public Member Functions inherited from DirectWaitBar
def __init__
 
def destroy
 
def finish
 
def getPercent
 
def setBarBorderWidth
 
def setBarColor
 
def setBarRelief
 
def setBarTexture
 
def setRange
 
def setValue
 
def update
 
def updateBarStyle
 
- Public Member Functions inherited from DirectFrame
def __init__
 
def destroy
 
def setGeom
 
def setImage
 
def setText
 
- Public Member Functions inherited from DirectGuiWidget
def __init__
 
def copyOptions
 
def destroy
 
def disableEdit
 
def editStart
 
def editStop
 
def enableEdit
 
def frameInitialiseFunc
 
def getBounds
 
def getCenter
 
def getFrameType
 
def getHeight
 
def getWidth
 
def guiDragTask
 
def guiScaleTask
 
def printConfig
 
def resetFrameSize
 
def setBorderUvWidth
 
def setBorderWidth
 
def setFrameColor
 
def setFrameSize
 
def setFrameTexture
 
def setFrameVisibleScale
 
def setProp
 
def setRelief
 
def setState
 
def taskName
 
def uniqueName
 
def updateFrameStyle
 
- Public Member Functions inherited from DirectGuiBase
def __init__
 
def __setitem__
 
def addoptions
 
def bind
 
def cget
 
def component
 
def components
 
def configure
 
def createcomponent
 
def defineoptions
 
def destroy
 
def destroycomponent
 
def hascomponent
 
def initialiseoptions
 
def isinitoption
 
def options
 
def postInitialiseFunc
 
def unbind
 
- Public Member Functions inherited from PackageInstaller
def __init__
 
def addPackage
 
def cleanup
 
def destroy
 
def donePackages
 
def downloadFinished
 
def downloadProgress
 
def downloadStarted
 
def packageFinished
 
def packageProgress
 
def packageStarted
 
- Public Member Functions inherited from DirectObject
def __init__
 
def accept
 
def acceptOnce
 
def addTask
 
def detectLeaks
 
def doMethodLater
 
def getAllAccepting
 
def ignore
 
def ignoreAll
 
def isAccepting
 
def isIgnoring
 
def removeAllTasks
 
def removeTask
 

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 = {}
 
tuple guiEdit = get_config_showbase()
 
 inactiveInitState = DGG.NORMAL
 
int snapToGrid = 0
 
- Static Public Attributes inherited from PackageInstaller
tuple globalLock = Lock()
 
int nextUniqueId = 1
 
tuple 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

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

Member Function Documentation

def cleanup (   self)
def destroy (   self)
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(). 
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). 
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). 
def packageStarted (   self,
  package 
)
This callback is made for each package between
downloadStarted() and downloadFinished() to indicate the start
of a new package.