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

LCDWidget.cpp

00001 #include "LCDWidget.h"
00002 
00003 #include <sstream>
00004 
00005 using namespace std;
00006 
00007 LCDWidget::LCDWidget(const string &id, LCDElement *parent, const string &widgetType) : LCDElement(id, "widget_add", widgetType, parent)
00008 {
00009   _x = 1;
00010   _y = 1;
00011   _widgetType = widgetType;
00012   _elementDel = "widget_del";
00013 }
00014 
00015 LCDWidget::LCDWidget(const string &widgetType) : LCDElement("", 0)
00016 {
00017   _x = 1;
00018   _y = 1;
00019   _widgetType = widgetType;
00020 }
00021 
00022 void LCDWidget::move(int x, int y)
00023 {
00024   _x = x;
00025   _y = y;
00026   notifyChanged();
00027 }
00028 
00029 void LCDWidget::setWidgetParameters(const std::string &properties)
00030 {
00031   sendCommand("widget_set", properties);
00032 }
00033 
00034 void LCDWidget::set(const ParameterList &pList)
00035 {
00036   ParameterList::const_iterator it;
00037   ostringstream params;
00038   for (it = pList.begin(); it != pList.end(); it++)
00039   {
00040     params << *it << " ";
00041   }
00042 
00043   setWidgetParameters(params.str());
00044 }
00045 

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