Logo Search packages:      
Sourcecode: packagekit version File versions  Download package

packagekit::backend::PackagekitProgress Class Reference

List of all members.


Detailed Description

Progress class there controls the total progress of a transaction
the transaction is divided in n milestones. the class contains a subpercentage
of the current step (milestone n -> n+1) and the percentage of the whole transaction

Usage:

from packagekit.backend import PackagekitProgress

steps = [10,30,50,70] # Milestones in %
progress = PackagekitProgress()
progress.set_steps(steps)
for milestone in range(len(steps)):
    # do the action is this step
    for i in range(100):
        # do some action
        progress.set_subpercent(i+1)
        print "progress : %s " % progress.percent
    progress.step() # step to next milestone

Definition at line 402 of file backend.py.


Public Member Functions

def __init__
def reset
def set_steps
def set_subpercent
def step

Public Attributes

 current_step
 percent
 steps
 subpercent

Private Member Functions

def _update_percent

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

Generated by  Doxygen 1.6.0   Back to index