libyui
|
#include <YBarGraph.h>
Public Member Functions | |
YBarGraphMultiUpdate (YBarGraph *barGraph) | |
~YBarGraphMultiUpdate () |
Helper class for multiple updates to a YBarGraph widget: This will hold back display updates until this object goes out of scope.
YBarGraphMultiUpdate::YBarGraphMultiUpdate | ( | YBarGraph * | barGraph | ) |
Constructor.
This will make the corresponding YBarGraph widget hold back any pending display updates (due to changed values, labels, or colors) until this object is destroyed (goes out of scope).
Create objects of this class on the stack (as local variables) and simply let them go out of scope.
Example:
{ YBarGraphMultiUpdate multiUpdate( myBarGraph ); myBarGraph->setValue( 0, 42 ); // No display update yet myBarGraph->setValue( 1, 84 ); // No display update yet myBarGraph->setValue( 2, 21 ); // No display update yet
} // multiUpdate goes out of scope, will trigger display update now
YBarGraphMultiUpdate::~YBarGraphMultiUpdate | ( | ) |
Destructor.
This will trigger display updates of the corresponding YBarGraph widget if any are necessary.