You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pa-calculator/library.h

91 lines
1.8 KiB
C++

#ifndef LIBRARY_H
#define LIBRARY_H
#include <QDialog>
#include "camp.h"
#include "cspeaker.h"
namespace Ui {
class library;
}
class library : public QDialog
{
Q_OBJECT
public:
explicit library(QWidget *parent = nullptr);
void setAmpPointer(cAmp* pAmp,unsigned int ampCount);
unsigned int getAmpCount();
cAmp* getAmps();
void setSpeakerPointer(cSpeaker* pSpeaker, unsigned int speakerCount);
unsigned int getSpeakerCount();
cSpeaker* getSpeaker();
void open();
~library();
private slots:
void on_pushButton_addAmp_clicked();
void on_listWidget_ampView_currentRowChanged(int currentRow);
void on_pushButton_applyChanges_clicked();
void on_comboBox_sensUnit_currentIndexChanged(int index);
void on_pushButton_deleteAmp_clicked();
void on_pushButton_addMode_clicked();
void on_listWidget_modeSelector_currentRowChanged(int currentRow);
void on_pushButton_deleteMode_clicked();
void on_pushButton_applyMode_clicked();
void on_lineEdit_ampName_textEdited(const QString &arg1);
void on_pushButton_addSpeaker_clicked();
void on_listWidget_speakerView_currentRowChanged(int currentRow);
void on_pushButton_deleteSpeaker_clicked();
void on_pushButton_applySpeaker_clicked();
void on_lineEdit_speakerName_textEdited(const QString &arg1);
private:
Ui::library *ui;
cAmp* m_pCamp;
unsigned int m_cAmpCount;
cSpeaker* m_pSpeaker;
unsigned int m_SpeakerCount;
void refreshAmpView();
void refreshModeOverview();
void refreshSpeakerView();
int getCurrentAmpIndex();
int getCurrentAmpModeIndex();
int getCurrentSpeakerIndex();
void printAllAmps();
bool unsaved;
bool speakerUnsaved;
void saveLibraryToFile();
};
#endif // LIBRARY_H