Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
Dialog Extended Progress

Detailed Description

Class: kodi::gui::dialogs::ExtendedProgress

Progress dialog shown for background work

The with #include <kodi/gui/dialogs/ExtendedProgress.h> given class are basically used to create Kodi's extended progress.


Example:

#include <kodi/gui/dialogs/ExtendedProgress.h>
ext_progress->SetText("Test progress");
for (unsigned int i = 0; i < 50; i += 10)
{
ext_progress->SetProgress(i, 100);
sleep(1);
}
ext_progress->SetTitle("Test Extended progress - Second round");
ext_progress->SetText("Test progress - Step 2");
for (unsigned int i = 50; i < 100; i += 10)
{
ext_progress->SetProgress(i, 100);
sleep(1);
}
delete ext_progress;
Definition ExtendedProgress.h:59
void SetTitle(const std::string &title)
To set the title of dialog.
Definition ExtendedProgress.h:121
void SetText(const std::string &text)
To set the used text information string.
Definition ExtendedProgress.h:158
void SetProgress(int currentItem, int itemCount)
To set progress position with predefined places.
Definition ExtendedProgress.h:227
sleep(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...

Function Documentation

◆ CExtendedProgress()

CExtendedProgress ( const std::string & title = "")
inlineexplicit

Construct a new dialog.

Parameters
[in]title[opt] Title string

◆ ~CExtendedProgress()

~CExtendedProgress ( )
inline

Destructor.

◆ Title()

std::string Title ( ) const
inline

Get the used title.

Returns
Title string

◆ SetTitle()

void SetTitle ( const std::string & title)
inline

To set the title of dialog.

Parameters
[in]titleTitle string

◆ Text()

std::string Text ( ) const
inline

Get the used text information string.

Returns
Text string

◆ SetText()

void SetText ( const std::string & text)
inline

To set the used text information string.

Parameters
[in]textInformation text to set

◆ IsFinished()

bool IsFinished ( ) const
inline

To ask dialog is finished.

Returns
True if on end

◆ MarkFinished()

void MarkFinished ( )
inline

Mark progress finished.

◆ Percentage()

float Percentage ( ) const
inline

Get the current progress position as percent.

Returns
Position

◆ SetPercentage()

void SetPercentage ( float percentage)
inline

To set the current progress position as percent.

Parameters
[in]percentagePosition to use from 0.0 to 100.0

◆ SetProgress()

void SetProgress ( int currentItem,
int itemCount )
inline

To set progress position with predefined places.

Parameters
[in]currentItemPlace position to use
[in]itemCountAmount of used places