libyui  3.0.10
 All Classes Functions Variables Enumerations Friends
YMultiProgressMeter Class Referenceabstract

#include <YMultiProgressMeter.h>

Inheritance diagram for YMultiProgressMeter:
Collaboration diagram for YMultiProgressMeter:

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 YPropertySetpropertySet ()
 
virtual void doUpdate ()=0
 
- Public Member Functions inherited from YWidget
virtual ~YWidget ()
 
virtual std::string debugLabel () const
 
std::string helpText () const
 
void setHelpText (const std::string &helpText)
 
bool hasChildren () const
 
YWidgetfirstChild () const
 
YWidgetlastChild () 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 ()
 
YWidgetparent () const
 
bool hasParent () const
 
void setParent (YWidget *newParent)
 
YDialogfindDialog ()
 
YWidgetfindWidget (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
 
YWidgetIDid () 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)
 
- Protected Member Functions inherited from YWidget
 YWidget (YWidget *parent)
 
YWidgetChildrenManagerchildrenManager () const
 
void setChildrenManager (YWidgetChildrenManager *manager)
 
void setBeingDestroyed ()
 
void dumpWidget (YWidget *w, int indentationLevel)
 

Detailed Description

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.

Constructor & Destructor Documentation

YMultiProgressMeter::YMultiProgressMeter ( YWidget parent,
YUIDimension  dim,
const std::vector< float > &  maxValues 
)
protected

Constructor

Definition at line 54 of file YMultiProgressMeter.cc.

Here is the call graph for this function:

YMultiProgressMeter::~YMultiProgressMeter ( )
virtual

Destructor.

Definition at line 67 of file YMultiProgressMeter.cc.

Member Function Documentation

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.

virtual void YMultiProgressMeter::doUpdate ( )
pure virtual

Notification that values have been updated and the widget needs to be redisplayed. Derived classes need to reimplement this.

YPropertyValue YMultiProgressMeter::getProperty ( const std::string &  propertyName)
virtual

Get a property. Reimplemented from YWidget.

This method may throw YUIPropertyExceptions.

Reimplemented from YWidget.

Definition at line 173 of file YMultiProgressMeter.cc.

Here is the call graph for this function:

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.

const YPropertySet & YMultiProgressMeter::propertySet ( )
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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

void YMultiProgressMeter::setCurrentValues ( const std::vector< float > &  values)

Set all current values and call doUpdate().

Definition at line 128 of file YMultiProgressMeter.cc.

Here is the call graph for this function:

bool YMultiProgressMeter::setProperty ( const std::string &  propertyName,
const YPropertyValue val 
)
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.

Here is the call graph for this function:

bool YMultiProgressMeter::vertical ( ) const

Return 'true' if the orientation is vertical.

Definition at line 86 of file YMultiProgressMeter.cc.

virtual const char* YMultiProgressMeter::widgetClass ( ) const
inlinevirtual

Return a descriptive name of this widget class for logging, debugging etc.

Reimplemented from YWidget.

Definition at line 84 of file YMultiProgressMeter.h.


The documentation for this class was generated from the following files: