Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Examples

LCDHorizontalBar Class Reference
[Widgets]

#include "api/LCDHorizontalBar.h"

Inheritance diagram for LCDHorizontalBar:

Inheritance graph
[legend]
Collaboration diagram for LCDHorizontalBar:

Collaboration graph
[legend]
List of all members.

Detailed Description

This widget is used to display a horizontal bar somewhere on screen.
Examples:

client.cpp.

Definition at line 13 of file LCDHorizontalBar.h.

Public Types

typedef std::list< std::string > ParameterList
 A list of parameters for set method.


Public Member Functions

 LCDHorizontalBar (LCDElement *parent=0, const std::string &id="")
 Default Constructor.

 LCDHorizontalBar (int length, int x=1, int y=1, LCDElement *parent=0, const std::string &id="")
 Constructor with widget values specified.

void set (int length, int x=1, int y=1)
 Set the values for the widget.

void set (const ParameterList &pList)
 Generic method to set widget parameter.

void setPercentage (int value)
 Set a percentage value.

int getPercentage ()
 Get the percentage value.

void setPercentageMax (int max)
 Set the maximum percentage value.

void move (int x, int y=1)
 Move the widget to a new location.

void add (LCDElement *child)
 Add a child to the component.

const std::string & getId ()
 Returns Id of the element.


Static Public Member Functions

bool exists (std::string id)
 Test if a widget with given Id exists.


Member Typedef Documentation

typedef std::list<std::string> ParameterList [inherited]
 

This is a list containing strings. Each string corresponds to a parameter.

Definition at line 42 of file LCDWidget.h.


Constructor & Destructor Documentation

LCDHorizontalBar LCDElement parent = 0,
const std::string &  id = ""
 

This constructor can be used without parameter in most cases. But the widget will have to be added to a parent (screen or frame).

Parameters:
parent A pointer to parent of this screen. It should be a LCDClient object.
id A string with the identifier for the screen. If not provided, a unique one will be generated automatically.

Definition at line 6 of file LCDHorizontalBar.cpp.

LCDHorizontalBar int  length,
int  x = 1,
int  y = 1,
LCDElement parent = 0,
const std::string &  id = ""
 

This construct can be used to specify the values for the widget while building it.

Parameters:
length The length of the bar in pixels.
x Integer containing 1-based value for column number.
y Integer containing 1-based value for row number.
parent A pointer to parent of this screen. It should be a LCDClient object.
id A string with the identifier for the screen. If not provided, a unique one will be generated automatically.

Definition at line 10 of file LCDHorizontalBar.cpp.


Member Function Documentation

void add LCDElement child  )  [inherited]
 

This method is used to add a child to a component.

Parameters:
child The element to be added in the children list.
Examples:
client.cpp.

Definition at line 110 of file LCDElement.cpp.

bool exists std::string  id  )  [static, inherited]
 

This static method is used to test the existence of a widget.

Parameters:
id The identifier of the widget to test.

Definition at line 76 of file LCDElement.cpp.

const string & getId  )  [inherited]
 

With this method one can have read access to the element identifier.

Returns:
A string.

Definition at line 82 of file LCDElement.cpp.

int getPercentage  )  [inherited]
 

Get the percentage value (0-100).

Returns:
The percentage value.

Definition at line 45 of file LCDBar.cpp.

void move int  x,
int  y = 1
[inherited]
 

Change the coordinate of a widget. Even if all the widgets have this method, it won't have an effect on all of them.

Parameters:
x Integer containing 1-based value for column number.
y Integer containing 1-based value for row number.
See also:
LCDScreen::setCursorPosition
Examples:
client.cpp.

Definition at line 22 of file LCDWidget.cpp.

void set const ParameterList pList  )  [inherited]
 

This method can be used to set all parameters of a widget. You should know the ones that are used by the protocol to put all of them in correct order.

Parameters:
pList A list of all the parameters values.

Definition at line 34 of file LCDWidget.cpp.

void set int  length,
int  x = 1,
int  y = 1
[inherited]
 

Set or change the useful values for this widget.

Parameters:
length The length of the bar in pixels.
x Integer containing 1-based value for column number.
y Integer containing 1-based value for row number.

Definition at line 31 of file LCDBar.cpp.

void setPercentage int  value  )  [inherited]
 

Set or change the percentage value (0-100).

  • The 0 value will be represented by a bar with a 0 length.
  • The 100 value will be represented by a bar which length is the one specified by setPercentageMax.
    Parameters:
    value The percentage value.

Definition at line 39 of file LCDBar.cpp.

void setPercentageMax int  max  )  [inherited]
 

Set or change the maximum percentage value. It is the length for a bar with a 100% percentage.

Parameters:
max The maximum value in pixels.
Examples:
client.cpp.

Definition at line 51 of file LCDBar.cpp.


Generated on Wed Aug 4 19:39:10 2004 for LCDApi by doxygen 1.3.6