Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Dialog Extended Progress

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

Progress dialog shown for background work More...

Functions

 kodi::gui::dialogs::CExtendedProgress::CExtendedProgress (const std::string &title="")
 
 kodi::gui::dialogs::CExtendedProgress::~CExtendedProgress ()
 
std::string kodi::gui::dialogs::CExtendedProgress::Title () const
 Get the used title.
 
void kodi::gui::dialogs::CExtendedProgress::SetTitle (const std::string &title)
 To set the title of dialog.
 
std::string kodi::gui::dialogs::CExtendedProgress::Text () const
 Get the used text information string.
 
void kodi::gui::dialogs::CExtendedProgress::SetText (const std::string &text)
 To set the used text information string.
 
bool kodi::gui::dialogs::CExtendedProgress::IsFinished () const
 To ask dialog is finished.
 
void kodi::gui::dialogs::CExtendedProgress::MarkFinished ()
 Mark progress finished.
 
float kodi::gui::dialogs::CExtendedProgress::Percentage () const
 Get the current progress position as percent.
 
void kodi::gui::dialogs::CExtendedProgress::SetPercentage (float percentage)
 To set the current progress position as percent.
 
void kodi::gui::dialogs::CExtendedProgress::SetProgress (int currentItem, int itemCount)
 To set progress position with predefined places.
 

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:

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 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
void SetTitle(const std::string &title)
To set the title of dialog.
Definition ExtendedProgress.h:121
sleep(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...

Function Documentation

◆ CExtendedProgress()

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

Construct a new dialog.

Parameters
[in]title[opt] Title string

◆ IsFinished()

bool kodi::gui::dialogs::CExtendedProgress::IsFinished ( ) const
inline

To ask dialog is finished.

Returns
True if on end

◆ MarkFinished()

void kodi::gui::dialogs::CExtendedProgress::MarkFinished ( )
inline

Mark progress finished.

◆ Percentage()

float kodi::gui::dialogs::CExtendedProgress::Percentage ( ) const
inline

Get the current progress position as percent.

Returns
Position

◆ SetPercentage()

void kodi::gui::dialogs::CExtendedProgress::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 kodi::gui::dialogs::CExtendedProgress::SetProgress ( int currentItem,
int itemCount )
inline

To set progress position with predefined places.

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

◆ SetText()

void kodi::gui::dialogs::CExtendedProgress::SetText ( const std::string & text)
inline

To set the used text information string.

Parameters
[in]textInformation text to set

◆ SetTitle()

void kodi::gui::dialogs::CExtendedProgress::SetTitle ( const std::string & title)
inline

To set the title of dialog.

Parameters
[in]titleTitle string

◆ Text()

std::string kodi::gui::dialogs::CExtendedProgress::Text ( ) const
inline

Get the used text information string.

Returns
Text string

◆ Title()

std::string kodi::gui::dialogs::CExtendedProgress::Title ( ) const
inline

Get the used title.

Returns
Title string

◆ ~CExtendedProgress()

kodi::gui::dialogs::CExtendedProgress::~CExtendedProgress ( )
inline

Destructor.