#ifndef Blinky_h
#define Blinky_h

#include <QWidget>
#include "ui_Blinker.h"

class QTimer;
class QStatusBar;
class QSocketNotifier;

// Blinky is used to draw the status bar on the main window and show a
// virtual IR blinking indicator when we are receiving a new IR pulse.
//
class Blinky : public QWidget {

   Q_OBJECT

public:

   Blinky(QWidget * parent = 0);

   virtual
   ~Blinky();

   void
   SetIncomingIR(bool getting_ir);

private slots:

      // Blinky operates by polling the circular buffer of incoming IR data
      // every 1/10th second. It sets up a timer to call this function.
      //
   void
   doPoll();

private:

   bool          do_blink;
   bool          new_blink_status;

   Ui::Blinker   ui;

   QTimer      * poll_worker;

   bool          do_red;

   int           red_count;
   int           green_count;
};

#endif // Blinky_h
