libyui
3.0.13
|
#include <YMultiProgressMeter.h>
Public Member Functions | |
virtual | ~YMultiProgressMeter () |
virtual const char * | widgetClass () const |
YUIDimension | dimension () const |
bool | horizontal () const |
bool | vertical () const |
int | segments () const |
float | maxValue (int segment) const |
float | currentValue (int segment) const |
void | setCurrentValue (int segment, float value) |
void | setCurrentValues (const std::vector< float > &values) |
virtual bool | setProperty (const std::string &propertyName, const YPropertyValue &val) |
virtual YPropertyValue | getProperty (const std::string &propertyName) |
virtual const YPropertySet & | propertySet () |
virtual void | doUpdate ()=0 |
![]() | |
virtual | ~YWidget () |
virtual std::string | debugLabel () const |
std::string | helpText () const |
void | setHelpText (const std::string &helpText) |
bool | hasChildren () const |
YWidget * | firstChild () const |
YWidget * | lastChild () const |
YWidgetListConstIterator | childrenBegin () const |
YWidgetListConstIterator | childrenEnd () const |
int | childrenCount () const |
bool | contains (YWidget *child) const |
virtual void | addChild (YWidget *child) |
virtual void | removeChild (YWidget *child) |
void | deleteChildren () |
YWidget * | parent () const |
bool | hasParent () const |
void | setParent (YWidget *newParent) |
YDialog * | findDialog () |
YWidget * | findWidget (YWidgetID *id, bool doThrow=true) const |
virtual int | preferredWidth ()=0 |
virtual int | preferredHeight ()=0 |
virtual int | preferredSize (YUIDimension dim) |
virtual void | setSize (int newWidth, int newHeight)=0 |
bool | isValid () const |
bool | beingDestroyed () const |
void * | widgetRep () const |
void | setWidgetRep (void *toolkitWidgetRep) |
bool | hasId () const |
YWidgetID * | id () const |
void | setId (YWidgetID *newId_disown) |
virtual void | setEnabled (bool enabled=true) |
void | setDisabled () |
virtual bool | isEnabled () const |
virtual bool | stretchable (YUIDimension dim) const |
void | setStretchable (YUIDimension dim, bool newStretch) |
void | setDefaultStretchable (YUIDimension dim, bool newStretch) |
virtual int | weight (YUIDimension dim) |
bool | hasWeight (YUIDimension dim) |
void | setWeight (YUIDimension dim, int weight) |
void | setNotify (bool notify=true) |
bool | notify () const |
void | setNotifyContextMenu (bool notifyContextMenu=true) |
bool | notifyContextMenu () const |
bool | sendKeyEvents () const |
void | setSendKeyEvents (bool doSend) |
bool | autoShortcut () const |
void | setAutoShortcut (bool _newAutoShortcut) |
int | functionKey () const |
bool | hasFunctionKey () const |
virtual void | setFunctionKey (int fkey_no) |
virtual bool | setKeyboardFocus () |
virtual std::string | shortcutString () const |
virtual void | setShortcutString (const std::string &str) |
virtual const char * | userInputProperty () |
void | dumpWidgetTree (int indentationLevel=0) |
void | dumpDialogWidgetTree () |
void | setChildrenEnabled (bool enabled) |
virtual void | saveUserInput (YMacroRecorder *macroRecorder) |
void * | operator new (size_t size) |
virtual void | startMultipleChanges () |
virtual void | doneMultipleChanges () |
Protected Member Functions | |
YMultiProgressMeter (YWidget *parent, YUIDimension dim, const std::vector< float > &maxValues) | |
![]() | |
YWidget (YWidget *parent) | |
YWidgetChildrenManager * | childrenManager () const |
void | setChildrenManager (YWidgetChildrenManager *manager) |
void | setBeingDestroyed () |
void | dumpWidget (YWidget *w, int indentationLevel) |
MultiProgressMeter: Progress bar with several segments that can indicate progress individually. This is useful to display progress of several activities that might not necessarily all be done in sequence.
A common example is installing packages from several CDs: Each CD would get a separate segment. Each segment's size would be proportional to the amount of data to be installed from that CD. This visualizes at the same time (a) how many CDs are involved (b) how much in proportion is to be expected from each CD (c) whether or not a specific CD is finished.
Visual example (horizontal MultiProgressMeter):
[=============...] [===] [......] [.]
This corresponds to 4 CDs:
CD #1: A lot of packages are to be installed from this CD, and a fair amount of those are already installed, but some are still missing. CD #2: Some packages were installed from this, but this CD is finished. CD #3: Quite some packages are to be installed from this CD. CD #4: Very few packages are to be installed from this CD.
As can be seen from this simple example, this widget can visualize a lot of complex information at the same time in a very natural way.
This is an optional widget, i.e. not all UIs support it.
Definition at line 64 of file YMultiProgressMeter.h.
|
protected |
Constructor
Definition at line 54 of file YMultiProgressMeter.cc.
|
virtual |
Destructor.
Definition at line 67 of file YMultiProgressMeter.cc.
float YMultiProgressMeter::currentValue | ( | int | segment | ) | const |
Return the current value for the specified segment (counting from 0). If no value has been set yet, -1 is returned.
Definition at line 106 of file YMultiProgressMeter.cc.
YUIDimension YMultiProgressMeter::dimension | ( | ) | const |
Return the orientation of the MultiProgressBar.
Definition at line 74 of file YMultiProgressMeter.cc.
|
pure virtual |
Notification that values have been updated and the widget needs to be redisplayed. Derived classes need to reimplement this.
|
virtual |
Get a property. Reimplemented from YWidget.
This method may throw YUIPropertyExceptions.
Reimplemented from YWidget.
Definition at line 173 of file YMultiProgressMeter.cc.
bool YMultiProgressMeter::horizontal | ( | ) | const |
Return 'true' if the orientation is horizontal.
Definition at line 80 of file YMultiProgressMeter.cc.
float YMultiProgressMeter::maxValue | ( | int | segment | ) | const |
Return the maximum value for the specified segment (counting from 0).
Definition at line 98 of file YMultiProgressMeter.cc.
|
virtual |
Return this class's property set. This also initializes the property upon the first call.
Reimplemented from YWidget.
Reimplemented from YWidget.
Definition at line 140 of file YMultiProgressMeter.cc.
int YMultiProgressMeter::segments | ( | ) | const |
Return the number of segments.
Definition at line 92 of file YMultiProgressMeter.cc.
void YMultiProgressMeter::setCurrentValue | ( | int | segment, |
float | value | ||
) |
Set the current value for the specified segment. This must be in the range 0..maxValue( segment ).
Remember to call doUpdate() after all changed values are set!
Definition at line 114 of file YMultiProgressMeter.cc.
void YMultiProgressMeter::setCurrentValues | ( | const std::vector< float > & | values | ) |
Set all current values and call doUpdate().
Definition at line 128 of file YMultiProgressMeter.cc.
|
virtual |
Set a property. Reimplemented from YWidget.
This function may throw YUIPropertyExceptions.
This function returns 'true' if the value was successfully set and 'false' if that value requires special handling (not in error cases: those are covered by exceptions).
Reimplemented from YWidget.
Definition at line 158 of file YMultiProgressMeter.cc.
bool YMultiProgressMeter::vertical | ( | ) | const |
Return 'true' if the orientation is vertical.
Definition at line 86 of file YMultiProgressMeter.cc.
|
inlinevirtual |
Return a descriptive name of this widget class for logging, debugging etc.
Reimplemented from YWidget.
Definition at line 84 of file YMultiProgressMeter.h.