All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Brief description of class still missing. More...
#include <Leds.h>
Public Member Functions | |
Leds (QObject *parent=0) | |
~Leds () | |
Static Public Member Functions | |
static void | flash (int index, int msec, bool on) |
static void | power (int index, bool on) |
static void | timer (int index, int msecOn, int msecOff) |
Brief description of class still missing.
Full description of class still missing
QGpCoreTools::Leds::Leds | ( | QObject * | parent = 0 | ) |
Description of constructor still missing
References QGpCoreTools::endl(), QGpCoreTools::App::stream(), QGpCoreTools::tr(), and TRACE.
: QObject(parent) { TRACE; ASSERT(!_self); // Test all 3 lights if(!test(0) || !test(1) || !test(2)) { App::stream() << tr("no led available") << endl; // Do not initialize _self, leds are not available return; } _self=this; connect(&_timer[0], SIGNAL(timeout()), this, SLOT(execTimer0())); connect(&_timer[1], SIGNAL(timeout()), this, SLOT(execTimer1())); connect(&_timer[2], SIGNAL(timeout()), this, SLOT(execTimer2())); _defaultOn[0]=false; _defaultOn[1]=false; _defaultOn[2]=false; }
QGpCoreTools::Leds::~Leds | ( | ) | [inline] |
{_self=0;}
void QGpCoreTools::Leds::flash | ( | int | index, |
int | msec, | ||
bool | on | ||
) | [static] |
void QGpCoreTools::Leds::power | ( | int | index, |
bool | on | ||
) | [static] |
Referenced by flash().
{ if(_self) { _self->setTrigger(index, "default-on"); _self->powerInternal(index, on); } }
void QGpCoreTools::Leds::timer | ( | int | index, |
int | msecOn, | ||
int | msecOff | ||
) | [static] |
{ if(_self) { _self->setTrigger(index, "timer"); _self->powerInternal(index, true); _self->setDelayOn(index, msecOn); _self->setDelayOff(index, msecOff); } }