#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "camp.h"
#include "cspeaker.h"
#include <cdac.h>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_ComboBox_selectSensUnit_currentIndexChanged(int index);

    void on_pushButton_requestLimiter_clicked();

    void on_actionEditLibrary_triggered();

    void on_comboBox_libraryAmp_currentIndexChanged(int index);

    void on_pushButton_clicked();

    void on_actionChange_Library_Location_triggered();

    void on_actionOpen_Library_triggered();

    void on_pushButton_loadSpeaker_clicked();


    void on_pushButton_loadDac_clicked();

private:
    Ui::MainWindow *ui;
    cAmp* m_pCAmp;
    unsigned int m_ampCount;

    cSpeaker* m_pSpeaker;
    unsigned int m_speakerCount;

    cdac* m_pDac;
    unsigned int m_dacCount;

    void refreshLibraryAmps();
    void refreshLibraryAmpModes();

    void refreshLibrarySpeaker();

    void refreshLibraryDacs();

    void loadLibrary();
    void saveLibrary();

};
#endif // MAINWINDOW_H
