libyui  3.0.10
 All Classes Functions Variables Enumerations Friends
YBarGraphSegment Class Reference

#include <YBarGraph.h>

Public Member Functions

 YBarGraphSegment (int value=0, const std::string &label=std::string(), const YColor &segmentColor=YColor(), const YColor &textColor=YColor())
 
int value () const
 
void setValue (int newValue)
 
std::string label () const
 
void setLabel (const std::string &newLabel)
 
YColor segmentColor () const
 
bool hasSegmentColor () const
 
void setSegmentColor (const YColor &color)
 
YColor textColor () const
 
bool hasTextColor () const
 
void setTextColor (const YColor &color)
 

Detailed Description

Helper class to describe one segment of a YBarGraph.

Definition at line 181 of file YBarGraph.h.

Constructor & Destructor Documentation

YBarGraphSegment::YBarGraphSegment ( int  value = 0,
const std::string &  label = std::string(),
const YColor segmentColor = YColor(),
const YColor textColor = YColor() 
)
inline

Constructor.

'value' is the initial value of this segment.

'label' is the label text in the segment. Use %1 as a placeholder for the current value.

'segmentColor' is the background color of this segment.

'textColor' is the color for the label text.

The YBarGraph widget will automatically assign some default colors (one of at least 5 different ones) if none are specified.

Definition at line 199 of file YBarGraph.h.

Member Function Documentation

bool YBarGraphSegment::hasSegmentColor ( ) const
inline

Return 'true' if this segment's background color is defined, i.e. it has a real RGB value and was not just created with the default constructor.

Definition at line 241 of file YBarGraph.h.

Here is the call graph for this function:

bool YBarGraphSegment::hasTextColor ( ) const
inline

Return 'true' if this segment's text color is defined, i.e. it has a real RGB value and was not just created with the default constructor.

Definition at line 258 of file YBarGraph.h.

Here is the call graph for this function:

std::string YBarGraphSegment::label ( ) const
inline

Return the current text label of this segment. Any %1 placeholder will be returned as %1 (not expanded).

Definition at line 223 of file YBarGraph.h.

YColor YBarGraphSegment::segmentColor ( ) const
inline

Return the segment background color.

Definition at line 234 of file YBarGraph.h.

void YBarGraphSegment::setLabel ( const std::string &  newLabel)
inline

Set the text label of this segment. Use %1 as a placeholder for the current value.

Definition at line 229 of file YBarGraph.h.

void YBarGraphSegment::setSegmentColor ( const YColor color)
inline

Set this segment's background color.

Definition at line 246 of file YBarGraph.h.

void YBarGraphSegment::setTextColor ( const YColor color)
inline

Set this segment's text color.

Definition at line 263 of file YBarGraph.h.

void YBarGraphSegment::setValue ( int  newValue)
inline

Set the value of this segment.

Definition at line 217 of file YBarGraph.h.

YColor YBarGraphSegment::textColor ( ) const
inline

Return this segment's text color.

Definition at line 251 of file YBarGraph.h.

int YBarGraphSegment::value ( ) const
inline

Return the current value of this segment.

Definition at line 212 of file YBarGraph.h.


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