#ifndef GRIFOXLRUMAINWINDOW_H
#define GRIFOXLRUMAINWINDOW_H

#include <QMainWindow>

#include <QDebug>

struct XLruConnectionInfo;

namespace Ui {
class GrifoXLruMainWindow;
}

class GrifoXLruMainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit GrifoXLruMainWindow(const XLruConnectionInfo& info, QWidget *parent = 0);
    ~GrifoXLruMainWindow();

    void closeEvent(QCloseEvent *event) override;

private slots:
    void fpgaTftpPoll();

    void fpgaTftpReceived(bool);

    void on_tbDisable_clicked();

    void on_actionDisable_triggered();

    void on_actionLogClear_triggered();

    void on_portCmd_returnPressed();

    void on_psm_toggled(bool arg1);

    void on_pps_toggled(bool arg1);

    void on_lcu_toggled(bool arg1);


    void on_actionPSM_Show_triggered(bool checked);

    void on_actionPPS_Show_triggered(bool checked);

    void on_actionLCU_Show_triggered(bool checked);

    void on_actionLog_triggered(bool checked);

    void on_actionGFX_triggered(bool checked);

    void on_actionLog_triggered();

private:
    Ui::GrifoXLruMainWindow *ui;

    class Implementation;
    Implementation& p_;

    friend class Implementation;

    void visualMess(QByteArray atext);

    int checkResponse(const QByteArray& data);

    void fromMessLCU(QByteArray data);
    void fromMessPPS(QByteArray data);
    void fromMessPSM(QByteArray data);
};

#endif // GRIFOXLRUMAINWINDOW_H
