#ifndef GRIFOBITEFORM_H
#define GRIFOBITEFORM_H

#include <QScrollArea>

class QDateTime;

namespace Ui {
    class GrifoBiteForm;
}

class GrifoBiteForm : public QScrollArea
{
    Q_OBJECT

public:
    explicit GrifoBiteForm(QWidget *parent = 0);
    ~GrifoBiteForm();

    static GrifoBiteForm& instance();

    void addEvent(const QString& msg);

    void setTimeOfDay(const QDateTime& t);
    void setHealthStatus(unsigned int raw);
    void setReport(const void* data, bool historize=true);

    static void setAsynchHealthStatus(const void* data);

private slots:
    void on_cbRepType_currentIndexChanged(int index);

    void on_spHistory_valueChanged(int arg1);

    void updateReport(const void* data);
    void updateReport(const void* data, unsigned int health);
    void updateHealth(unsigned int health);

    void on_tbHistoryClear_clicked();

    void on_tbDump_clicked();

private:
    Ui::GrifoBiteForm *ui;
public:
    class Implementation;
    Implementation& p_;

    static GrifoBiteForm* theInstance;
};

#endif // GRIFOBITEFORM_H
