PCL
|
A simple progress bar dialog box. More...
#include <ProgressDialog.h>
Additional Inherited Members | |
Public Types inherited from pcl::Dialog | |
using | execute_event_handler = void(Control::*)(Dialog &sender) |
using | return_event_handler = void(Control::*)(Dialog &sender, int retCode) |
using | std_code = StdDialogCode::value_type |
Public Types inherited from pcl::Control | |
using | child_event_handler = void(Control::*)(Control &sender, Control &child) |
using | close_event_handler = void(Control::*)(Control &sender, bool &allowClose) |
using | event_handler = void(Control::*)(Control &sender) |
using | file_drag_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const StringList &files, unsigned modifiers, bool &wantsFiles) |
using | file_drop_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const StringList &files, unsigned modifiers) |
using | keyboard_event_handler = void(Control::*)(Control &sender, int key, unsigned modifiers, bool &wantsKey) |
using | mouse_button_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, int button, unsigned buttons, unsigned modifiers) |
using | mouse_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, unsigned buttons, unsigned modifiers) |
using | mouse_wheel_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, int delta, unsigned buttons, unsigned modifiers) |
using | move_event_handler = void(Control::*)(Control &sender, const pcl::Point &newPos, const pcl::Point &oldPos) |
using | paint_event_handler = void(Control::*)(Control &sender, const pcl::Rect &updateRect) |
using | resize_event_handler = void(Control::*)(Control &sender, int newWidth, int newHeight, int oldWidth, int oldHeight) |
using | view_drag_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const View &view, unsigned modifiers, bool &wantsView) |
using | view_drop_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const View &view, unsigned modifiers) |
Static Public Member Functions inherited from pcl::Dialog | |
static void | ProcessEvents (bool excludeUserInputEvents=false) |
Static Public Member Functions inherited from pcl::Control | |
static void | HideToolTip () |
static Control & | Null () |
static void | ShowToolTip (const Point &pos, const String &text, const Control &control=Control::Null(), const Rect &rect=Rect(0)) |
static void | ShowToolTip (int x, int y, const String &text, const Control &control=Control::Null(), const Rect &rect=Rect(0)) |
static String | ToolTipText () |
Static Public Member Functions inherited from pcl::UIObject | |
static UIObject & | Null () |
Protected Member Functions inherited from pcl::UIObject | |
UIObject ()=default | |
UIObject (const UIObject &x) | |
UIObject (UIObject &&x) | |
UIObject & | operator= (const UIObject &x) |
UIObject & | operator= (UIObject &&x) |
ProgressDialog is a specialized modal dialog box to provide visual feedback about an ongoing task during potentially long processes. It includes a progress bar indicator that can change its graphical appearance to show the percentage of the total work already done (bounded progress bar), or just to inform the user that the task is still being done (unbounded case). The dialog also provides a customizable text label and an optional Cancel button that the user can activate to interrupt the process.
Definition at line 83 of file ProgressDialog.h.
pcl::ProgressDialog::ProgressDialog | ( | const String & | text = String() , |
const String & | title = String() , |
||
size_type | lowerBound = 0 , |
||
size_type | upperBound = 100 , |
||
Control & | parent = Control::Null() |
||
) |
Constructs a ProgressDialog.
text | The text that will be shown on the informative label above the progress bar. The default text is an empty string, which hides the informative label. |
title | The title of the dialog box window. The default value is an empty string, which causes the window to show a default title defined by the PixInsight core application. |
lowerBound | The minimum value of the progress bar. The default value is zero. |
upperBound | The maximum value of the progress bar. The default value is 100, which is appropriate to show progress values as a percentage of the total work. |
parent | The parent control of this dialog. The default value is Control::Null(), which creates a child top-level window of the current workspace. |
|
inline |
Disables the Cancel button of this progress dialog. When the Cancel button is disabled, the user has no way to interrupt the running process.
Definition at line 220 of file ProgressDialog.h.
void pcl::ProgressDialog::EnableCancelButton | ( | bool | enable = true | ) |
Enables the Cancel button of this progress dialog. When the Cancel button is enabled, the user can activate it to interrupt the running process.
|
inline |
Increments the value of the progress bar indicator.
Calling this function is equivalent to:
Definition at line 196 of file ProgressDialog.h.
|
inline |
Returns true if the Cancel button is currently enabled.
Definition at line 228 of file ProgressDialog.h.
|
inline |
Returns true if the Cancel button has been activated by the user, if it is enabled.
Definition at line 205 of file ProgressDialog.h.
|
inline |
Returns the lower bound of the progress bar indicator, or zero if the progress bar is unbounded.
Definition at line 153 of file ProgressDialog.h.
Sets the range of values for the progress bar indicator.
lowerBound | The minimum value of the progress bar. |
upperBound | The maximum value of the progress bar. |
If both bounds are set to the same value, e.g. lowerBound = upperBound = 0, the progress bar will be unbounded. Unbounded progress bars change their appearance in a special way to show that the running process is still working, but without any specific information about the amount of the total work already done.
void pcl::ProgressDialog::SetText | ( | const String & | text | ) |
Sets the informative text shown on a label above the progress bar.
void pcl::ProgressDialog::SetTitle | ( | const String & | title | ) |
Sets the window title for this dialog box.
|
inline |
Causes the progress bar to be unbounded.
Bounded progress bars show information about the amount of the total work already done. Unbounded progress bars change their appearance to inform that the process is still running, but without any specific hint about the amount of pending work. Calling this function is equivalent to:
Definition at line 144 of file ProgressDialog.h.
void pcl::ProgressDialog::SetValue | ( | size_type | value | ) |
Sets the current value of the progress bar indicator.
If the progress bar is bounded, the specified value will be constrained to the current limits, as reported by LowerBound() and UpperBound().
If the progress bar is unbounded, the value argument will be ignored and the progress bar indicator will change graphically to provide feedback about a running process, but without any specific information about the amount of work already done.
In all cases the progress bar will be updated on the screen as soon as possible after returning from this function.
|
inline |
Returns the upper bound of the progress bar indicator, or zero if the progress bar is unbounded.
Definition at line 162 of file ProgressDialog.h.