Skip to content

ProgressBar

Canonical path: NemAll_Python_Utility.ProgressBar

Representation of the progress bar

Examples:

To show a progress bar, initialize it

>>> progress_bar = ProgressBar(10,0,False)

To increase the progress bar, call Step() method.

IMPORTANT: The Step() must be called exactly as many times, as defined in the constructor!

CloseProgressbar

CloseProgressbar() -> bool

Closed progressbar dialog

Returns:

  • bool

    true if progressbar closed correctly

MakeStep overloaded

MakeStep(step: int) -> bool

Make a step

Parameters:

  • step (int) –

    step count

Returns:

  • bool

    true step is correctly executed

MakeStep(step: int, additionalInfoStrID: int) -> bool

Make a step

Parameters:

  • step (int) –

    step count

  • additionalInfoStrID (int) –

    additional info ID

Returns:

  • bool

    true step is correctly executed

MakeStep(step: int, additionalInfo: str) -> bool

Make a step

Parameters:

  • step (int) –

    step count

  • additionalInfo (str) –

    additional info

Returns:

  • bool

    true step is correctly executed

ResetProgressBar overloaded

ResetProgressBar(
    numberOfSteps: int,
    progressBarTitle: str,
    additionalInfo: str,
    closable: bool,
) -> bool

Reset progressbar dialog

Parameters:

  • numberOfSteps (int) –

    number of steps/elements

  • progressBarTitle (str) –

    title of progressbar

  • additionalInfo (str) –

    additional info

  • closable (bool) –

    progressbar can be canceled

Returns:

  • bool

    true if progressbar started correctly

ResetProgressBar(
    numberOfSteps: int,
    progressBarTitleStrID: int,
    additionalInfoStrID: int,
    closable: bool,
) -> bool

Reset progressbar dialog

Parameters:

  • numberOfSteps (int) –

    number of steps/elements

  • progressBarTitleStrID (int) –

    title of progressbar ID

  • additionalInfoStrID (int) –

    additional info ID

  • closable (bool) –

    progressbar can be canceled

Returns:

  • bool

    true if progressbar started correctly

SetAditionalInfo overloaded

SetAditionalInfo(textId: int) -> bool

Set the additional info

Parameters:

  • textId (int) –

    additional info text ID

Returns:

  • bool

    true if set correctly

SetAditionalInfo(text: str) -> bool

Set the additional info

Parameters:

  • text (str) –

    additional info text

Returns:

  • bool

    true if set correctly

SetInfinitProgressbar

SetInfinitProgressbar(isInfinit: bool) -> bool

Set infinite progressbar dialog

Parameters:

  • isInfinit (bool) –

    infinite state

Returns:

  • bool

    true if set correctly

SetIsClosable

SetIsClosable(isClosable: bool) -> bool

Set the closeable state

Parameters:

  • isClosable (bool) –

    closable state

Returns:

  • bool

    true if set correctly

SetNumberOfSteps

SetNumberOfSteps(numberOfSteps: int) -> bool

Set number of steps

Parameters:

  • numberOfSteps (int) –

    number of steps/elements

Returns:

  • bool

    true if set correctly

SetTitle overloaded

SetTitle(textId: int) -> bool

Set the title

Parameters:

  • textId (int) –

    title text ID

Returns:

  • bool

    true if set correctly

SetTitle(text: str) -> bool

Set the title

Parameters:

  • text (str) –

    title text

Returns:

  • bool

    true if set correctly

StartInfiniteProgressbar overloaded

StartInfiniteProgressbar(
    progressBarTitle: str,
    additionalInfo: str,
    closable: bool,
    startImmediately: bool = False,
) -> bool

Starts infinite progressbar dialog

Parameters:

  • progressBarTitle (str) –

    title of progressbar

  • additionalInfo (str) –

    additional info

  • closable (bool) –

    progressbar can be canceled

  • startImmediately (bool, default: False ) –

    start immediately

Returns:

  • bool

    true if progressbar started correctly

StartInfiniteProgressbar(
    progressBarTitleID: int,
    additionalInfoStrID: int,
    closable: bool,
    startImmediately: bool = False,
) -> bool

Starts infinite progressbar dialog

Parameters:

  • progressBarTitleID (int) –

    title of progressbar ID

  • additionalInfoStrID (int) –

    additional info ID

  • closable (bool) –

    progressbar can be canceled

  • startImmediately (bool, default: False ) –

    start immediately

Returns:

  • bool

    true if progressbar started correctly

StartInfiniteProgressbar(
    progressBarTitle: str, closable: bool, startImmediately: bool = False
) -> bool

Starts progressbar dialog

Parameters:

  • progressBarTitle (str) –

    title of progressbar

  • closable (bool) –

    progressbar can be canceled

  • startImmediately (bool, default: False ) –

    start immediately

Returns:

  • bool

    true if progressbar started correctly

StartInfiniteProgressbar(
    progressBarTitleID: int, closable: bool, startImmediately: bool = False
) -> bool

Starts progressbar dialog

Parameters:

  • progressBarTitleID (int) –

    title of progressbar ID

  • closable (bool) –

    progressbar can be canceled

  • startImmediately (bool, default: False ) –

    start immediately

Returns:

  • bool

    true if progressbar started correctly

StartProgressbar overloaded

StartProgressbar(
    numberOfSteps: int,
    progressBarTitle: str,
    additionalInfo: str,
    closable: bool,
    startImmediately: bool = False,
) -> bool

Starts progressbar dialog

Parameters:

  • numberOfSteps (int) –

    number of steps/elements

  • progressBarTitle (str) –

    title of progressbar

  • additionalInfo (str) –

    additional info

  • closable (bool) –

    progressbar can be canceled

  • startImmediately (bool, default: False ) –

    start immediately

Returns:

  • bool

    true if progressbar started correctly

StartProgressbar(
    numberOfSteps: int,
    progressBarTitleID: int,
    additionalInfoStrID: int,
    closable: bool,
    startImmediately: bool = False,
) -> bool

Starts progressbar dialog

Parameters:

  • numberOfSteps (int) –

    number of steps/elements

  • progressBarTitleID (int) –

    title of progressbar ID

  • additionalInfoStrID (int) –

    additional info ID

  • closable (bool) –

    progressbar can be canceled

  • startImmediately (bool, default: False ) –

    start immediately

Returns:

  • bool

    true if progressbar started correctly

StartProgressbar(
    numberOfSteps: int,
    progressBarTitle: str,
    closable: bool,
    startImmediately: bool = False,
) -> bool

Starts progressbar dialog

Parameters:

  • numberOfSteps (int) –

    number of steps/elements

  • progressBarTitle (str) –

    title of progressbar

  • closable (bool) –

    progressbar can be canceled

  • startImmediately (bool, default: False ) –

    start immediately

Returns:

  • bool

    true if progressbar started correctly

StartProgressbar(
    numberOfSteps: int,
    progressBarTitleID: int,
    closable: bool,
    startImmediately: bool = False,
) -> bool

Starts progressbar dialog

Parameters:

  • numberOfSteps (int) –

    number of steps/elements

  • progressBarTitleID (int) –

    title of progressbar ID

  • closable (bool) –

    progressbar can be canceled

  • startImmediately (bool, default: False ) –

    start immediately

Returns:

  • bool

    true if progressbar started correctly

Step

Step() -> bool

Increase the progress bar by one step

Returns:

  • bool

    True when cancel button was clicked, False otherwise

__init__ overloaded

__init__()

Shows the progress bar

Parameters:

  • countOfSteps

    Number of expected steps

  • headerTextNumber

    Header text, 0 = standard

  • bWithCancel

    True if the cancel button should appear on the bar, False otherwise

__init__(element: ProgressBar)

Shows the progress bar

Parameters:

  • countOfSteps

    Number of expected steps

  • headerTextNumber

    Header text, 0 = standard

  • bWithCancel

    True if the cancel button should appear on the bar, False otherwise

__init__(countOfSteps: int, headerTextNumber: int, bWithCancel: bool)

Shows the progress bar

Parameters:

  • countOfSteps (int) –

    Number of expected steps

  • headerTextNumber (int) –

    Header text, 0 = standard

  • bWithCancel (bool) –

    True if the cancel button should appear on the bar, False otherwise

Placeholder