Panda3D

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

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

## Additional Inherited Members
Public Attributes inherited from DirectWaitBar
| barStyle = PGFrameStyle()
Public Attributes inherited from DirectGuiWidget
list | bounds = self['frameSize']
| editStart
| editStop
| ll
| printConfig
| stateNodePath = self.guiDict.get(parts[-1])
| ur
Public Attributes inherited from DirectGuiBase
int | fInit = 1
str | guiId = 'guiObject'
list | postInitialiseFuncList = []
Public Attributes inherited from PackageInstaller
| appRunner = appRunner
| callbackLock = Lock()
bool | calledDownloadFinished = False
bool | calledDownloadStarted = False
| descFileTask = None
list | done = []
| downloadTask = None
list | earlyDone = []
list | failed = []
list | needsDescFile = []
list | needsDownload = []
| packageLock = RLock()
list | packages = []
| progressTask = None
int | state = self.S_initial
| taskChain = taskChain
int | uniqueId = PackageInstaller.nextUniqueId
Static Public Attributes inherited from DirectFrame
tuple | DefDynGroups = ('text', 'geom', 'image')
Static Public Attributes inherited from DirectGuiWidget
float | gridSpacing = 0.05
dict | guiDict = {}
| guiEdit = ShowBaseGlobal.config.GetBool('direct-gui-edit', False)
| inactiveInitState = DGG.NORMAL
int | snapToGrid = 0
Static Public Attributes inherited from DirectObject
| accept_once = acceptOnce
| add_task = addTask
| detect_leaks = detectLeaks
| do_method_later = doMethodLater
| get_all_accepting = getAllAccepting
| ignore_all = ignoreAll
| is_accepting = isAccepting
| is_ignoring = isIgnoring
| remove_all_tasks = removeAllTasks
| remove_task = removeTask
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
Protected Member Functions inherited from DirectObject
| _addTask (self, task)
| _clearTask (self, task)
Protected Attributes inherited from DirectGuiBase
dict | _constructorKeywords = tmp
tuple | _dynamicGroups = ()
dict | _optionInfo = {}
Protected Attributes inherited from DirectObject
dict | _taskList = {}

## 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__()

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

## Member Function Documentation

## ◆ cleanup()

cleanup | ( |  | self | ) |

     Interrupts all pending downloads.  No further callbacks
    will be made.

Reimplemented from PackageInstaller.

## ◆ destroy()

destroy | ( |  | self | ) |

Reimplemented from DirectWaitBar.

## ◆ downloadFinished()

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().

Reimplemented from PackageInstaller.

## ◆ downloadProgress()

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).

Reimplemented from PackageInstaller.

## ◆ packageProgress()

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).

Reimplemented from PackageInstaller.

## ◆ packageStarted()

packageStarted | ( |  | self,
|  |  | package )

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

Reimplemented from PackageInstaller.