libyui
 
Loading...
Searching...
No Matches
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
 
YWidgetListIterator childrenBegin () const
 
YWidgetListIterator childrenEnd () const
 
YWidgetListConstIterator childrenConstBegin () const
 
YWidgetListConstIterator childrenConstEnd () const
 
YWidgetListIterator begin ()
 
YWidgetListIterator end ()
 
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)
 
void operator delete (void *ptr) noexcept
 
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.

Constructor & Destructor Documentation

◆ YMultiProgressMeter()

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

Constructor

◆ ~YMultiProgressMeter()

YMultiProgressMeter::~YMultiProgressMeter ( )
virtual

Destructor.

Member Function Documentation

◆ currentValue()

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.

◆ dimension()

YUIDimension YMultiProgressMeter::dimension ( ) const

Return the orientation of the MultiProgressBar.

◆ doUpdate()

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.

◆ getProperty()

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

Get a property. Reimplemented from YWidget.

This method may throw YUIPropertyExceptions.

Reimplemented from YWidget.

◆ horizontal()

bool YMultiProgressMeter::horizontal ( ) const

Return 'true' if the orientation is horizontal.

◆ maxValue()

float YMultiProgressMeter::maxValue ( int segment) const

Return the maximum value for the specified segment (counting from 0).

◆ propertySet()

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.

◆ segments()

int YMultiProgressMeter::segments ( ) const

Return the number of segments.

◆ setCurrentValue()

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!

◆ setCurrentValues()

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

Set all current values and call doUpdate().

◆ setProperty()

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.

◆ vertical()

bool YMultiProgressMeter::vertical ( ) const

Return 'true' if the orientation is vertical.

◆ widgetClass()

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

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

Reimplemented from YWidget.


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