Class: kodi::gui::dialogs::CProgress
Progress dialog shown in center
The with #include <kodi/gui/dialogs/Progress.h> given class are basically used to create Kodi's progress dialog with named text fields.
Example:
#include <kodi/gui/dialogs/Progress.h>
for (unsigned int i = 0; i < 100; i += 10)
{
}
delete progress;
void SetPercentage(int percentage)
Get the current progress position as percent.
Definition Progress.h:158
void SetCanCancel(bool canCancel)
To enable and show cancel button on dialog.
Definition Progress.h:130
void ShowProgressBar(bool onOff)
To show or hide progress bar dialog.
Definition Progress.h:186
void Open()
To open the dialog.
Definition Progress.h:87
void SetLine(unsigned int iLine, const std::string &line)
To set the line text field on dialog from 0 - 2.
Definition Progress.h:116
void SetHeading(const std::string &heading)
Set the heading title of dialog.
Definition Progress.h:101
sleep(...)
<h4><code><span style="font-style: italic;">Function: </span><span style="font-style: bold;"><font co...
◆ CProgress()
◆ ~CProgress()
◆ Open()
◆ SetHeading()
void SetHeading |
( |
const std::string & | heading | ) |
|
|
inline |
Set the heading title of dialog.
- Parameters
-
[in] | heading | Title string to use |
◆ SetLine()
void SetLine |
( |
unsigned int | iLine, |
|
|
const std::string & | line ) |
|
inline |
To set the line text field on dialog from 0 - 2.
- Parameters
-
[in] | iLine | Line number |
[in] | line | Text string |
◆ SetCanCancel()
void SetCanCancel |
( |
bool | canCancel | ) |
|
|
inline |
To enable and show cancel button on dialog.
- Parameters
-
[in] | canCancel | if true becomes it shown |
◆ IsCanceled()
bool IsCanceled |
( |
| ) |
const |
|
inline |
To check dialog for clicked cancel button.
- Returns
- True if canceled
◆ SetPercentage()
void SetPercentage |
( |
int | percentage | ) |
|
|
inline |
Get the current progress position as percent.
- Parameters
-
[in] | percentage | Position to use from 0 to 100 |
◆ GetPercentage()
int GetPercentage |
( |
| ) |
const |
|
inline |
To set the current progress position as percent.
- Returns
- Current Position used from 0 to 100
◆ ShowProgressBar()
void ShowProgressBar |
( |
bool | onOff | ) |
|
|
inline |
To show or hide progress bar dialog.
- Parameters
-
[in] | onOff | If true becomes it shown |
◆ SetProgressMax()
void SetProgressMax |
( |
int | max | ) |
|
|
inline |
Set the maximum position of progress, needed if SetProgressAdvance(...)
is used.
- Parameters
-
[in] | max | Biggest usable position to use |
◆ SetProgressAdvance()
void SetProgressAdvance |
( |
int | steps = 1 | ) |
|
|
inline |
To increase progress bar by defined step size until reach of maximum position.
- Parameters
-
[in] | steps | Step size to increase, default is 1 |
◆ Abort()
To check progress was canceled on work.
- Returns
- True if aborted