libyui  3.0.5
 All Classes Functions Variables Enumerations Friends
YBarGraph Class Referenceabstract
Inheritance diagram for YBarGraph:
Collaboration diagram for YBarGraph:

Public Member Functions

virtual ~YBarGraph ()
 
virtual const char * widgetClass () const
 
void addSegment (const YBarGraphSegment &segment)
 
void deleteAllSegments ()
 
int segments ()
 
const YBarGraphSegmentsegment (int segmentIndex) const
 
void setValue (int segmentIndex, int newValue)
 
void setLabel (int segmentIndex, const std::string &newLabel)
 
void setSegmentColor (int segmentIndex, const YColor &color)
 
void setTextColor (int segmentIndex, const YColor &color)
 
virtual bool setProperty (const std::string &propertyName, const YPropertyValue &val)
 
virtual YPropertyValue getProperty (const std::string &propertyName)
 
virtual const YPropertySetpropertySet ()
 
- 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

 YBarGraph (YWidget *parent)
 
virtual void doUpdate ()=0
 
- Protected Member Functions inherited from YWidget
 YWidget (YWidget *parent)
 
YWidgetChildrenManagerchildrenManager () const
 
void setChildrenManager (YWidgetChildrenManager *manager)
 
void setBeingDestroyed ()
 
void dumpWidget (YWidget *w, int indentationLevel)
 

Friends

class YBarGraphMultiUpdate
 

Detailed Description

Definition at line 36 of file YBarGraph.h.

Constructor & Destructor Documentation

YBarGraph::YBarGraph ( YWidget parent)
protected

Constructor.

Definition at line 67 of file YBarGraph.cc.

Here is the call graph for this function:

YBarGraph::~YBarGraph ( )
virtual

Destructor.

Definition at line 76 of file YBarGraph.cc.

Member Function Documentation

void YBarGraph::addSegment ( const YBarGraphSegment segment)

Add one segment.

If the segment's background and text colors are not explicitly specified, the YBarGraph widget will assign them from a list of (at least 5 different) color sets.

When adding multiple segments, use a YBarGraphMultiUpdate object for improved performance to hold back display updates until all segments are added.

Definition at line 96 of file YBarGraph.cc.

void YBarGraph::deleteAllSegments ( )

Delete all segments.

Definition at line 104 of file YBarGraph.cc.

virtual void YBarGraph::doUpdate ( )
protectedpure virtual

Perform a display update after any change to any of the segments.

Derived classes are required to implement this.

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

Get a property. Reimplemented from YWidget.

This method may throw YUIPropertyExceptions.

Reimplemented from YWidget.

Definition at line 211 of file YBarGraph.cc.

Here is the call graph for this function:

const YPropertySet & YBarGraph::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 174 of file YBarGraph.cc.

Here is the call graph for this function:

const YBarGraphSegment & YBarGraph::segment ( int  segmentIndex) const

Return the segment with the specified index (from 0 on).

This will throw an exception if there are not this many segments.

Definition at line 112 of file YBarGraph.cc.

int YBarGraph::segments ( )

Return the current number of segments.

Definition at line 121 of file YBarGraph.cc.

void YBarGraph::setLabel ( int  segmentIndex,
const std::string &  newLabel 
)

Set the label of the segment with the specified index (from 0 on). Use %1 as a placeholder for the current value.

This will throw an exception if there are not this many segments.

Note: Use a YBarGraphMultiUpdate object for improved performance when doing multiple changes at the same time.

Definition at line 138 of file YBarGraph.cc.

bool YBarGraph::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 195 of file YBarGraph.cc.

Here is the call graph for this function:

void YBarGraph::setSegmentColor ( int  segmentIndex,
const YColor color 
)

Set the background color of the segment with the specified index (from 0 on).

This will throw an exception if there are not this many segments or if the color is undefined.

Definition at line 148 of file YBarGraph.cc.

Here is the call graph for this function:

void YBarGraph::setTextColor ( int  segmentIndex,
const YColor color 
)

Set the text color of the segment with the specified index (from 0 on).

This will throw an exception if there are not this many segments or if the color is undefined.

Definition at line 161 of file YBarGraph.cc.

Here is the call graph for this function:

void YBarGraph::setValue ( int  segmentIndex,
int  newValue 
)

Set the value of the segment with the specifie index (from 0 on).

This will throw an exception if there are not this many segments.

Note: Use a YBarGraphMultiUpdate object for improved performance when doing multiple changes at the same time.

Definition at line 128 of file YBarGraph.cc.

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

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

Reimplemented from YWidget.

Definition at line 56 of file YBarGraph.h.


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