#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QFile>
#include <QTimer>
#include <windows.h>
#include "ftd2xx.h"
#include "qcustomplot.h"
#include "devicecom.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void setupChart( QCustomPlot *customPlot );


private slots:

    void disconnect_device();

    void horzScrollBarChanged(int value);

    void on_add_button_clicked();

    void on_delete_button_clicked();

    void on_data_table_itemClicked();

    void saveFileAs();

    void loadFile();

    void resize_only_panel();

    void resize_all_settings();

    void connect_device();

    void update_values();

    void replot_animation();

    void on_run_button_clicked();

    void on_stop_button_clicked();

    void new_data();


    void on_set_output_clicked();

    void on_doubleSpinBox_valueChanged(double arg1);

    void on_doubleSpinBox_2_valueChanged(double arg1);

private:
    Ui::MainWindow  *ui;
    QTimer *TimerAnimation, *TimerValues;
    int AnimationTime;
    DeviceCom *Device;
    QLabel *statusConnect;

};

#endif // MAINWINDOW_H
