40 lines
648 B
C++
40 lines
648 B
C++
#ifndef RELAYDIALOG_H
|
|
#define RELAYDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QList>
|
|
#include <vector>
|
|
#include <QAbstractButton>
|
|
#include "microcontroller.h"
|
|
|
|
#define STARTING_RELAY 5
|
|
|
|
namespace Ui {
|
|
class RelayDialog;
|
|
}
|
|
|
|
class RelayDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit RelayDialog(Microcontroller *micro, QWidget *parent = 0);
|
|
~RelayDialog();
|
|
|
|
private:
|
|
|
|
std::vector<QAbstractButton*> _relayCheckBoxes;
|
|
|
|
Ui::RelayDialog *ui;
|
|
|
|
Microcontroller *_micro;
|
|
|
|
private slots:
|
|
void relayCheckBoxToggeled(int state);
|
|
|
|
public slots:
|
|
void relayStateChanged(std::vector<bool> relayStates);
|
|
};
|
|
|
|
#endif // RELAYDIALOG_H
|