YBarGraph Class Reference

Implementation of the BarGraph widget. More...

#include <YBarGraph.h>

Inheritance diagram for YBarGraph:

YWidget List of all members.

Public Member Functions

 YBarGraph (const YWidgetOpt &opt)
virtual char * widgetClass ()
int segments ()
int value (int n)
string label (int n)
void parseValuesList (const YCPList &newValues)
void parseLabelsList (const YCPList &newLabels)
virtual void doUpdate ()

Private Member Functions

YCPValue changeWidget (const YCPSymbol &property, const YCPValue &newValue)

Private Attributes

vector< int > _values
vector< string > _labels

Detailed Description

Implementation of the BarGraph widget.


Constructor & Destructor Documentation

YBarGraph::YBarGraph ( const YWidgetOpt opt  ) 

Constructor


Member Function Documentation

virtual char* YBarGraph::widgetClass (  )  [inline, virtual]

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

Reimplemented from YWidget.

int YBarGraph::segments (  ) 

Returns the current number of bar segments, i.e. the nuber of values.

int YBarGraph::value ( int  n  ) 

Returns the value of segment no. n or -1 if there are not that many segments.

string YBarGraph::label ( int  n  ) 

Returns the label of segment no. n or an empty string if there are not that many segments or the specified segment doesn't have a label.

void YBarGraph::parseValuesList ( const YCPList newValues  ) 

Parse and store new values.

void YBarGraph::parseLabelsList ( const YCPList newLabels  ) 

Parse and store new labels.

void YBarGraph::doUpdate (  )  [virtual]

Perform a display update after values and/or labels have changed. Overwrite this method and do your actual drawing here.

YCPValue YBarGraph::changeWidget ( const YCPSymbol property,
const YCPValue newValue 
) [private, virtual]

Set specific widget properties. Inherited from YWidget.

The numerical values of each segment.

Reimplemented from YWidget.


Member Data Documentation

vector<int> YBarGraph::_values [private]

vector<string> YBarGraph::_labels [private]


The documentation for this class was generated from the following files:
Generated on Tue Nov 6 01:20:22 2007 for yast2-core by  doxygen 1.5.0