88 lines
1.6 KiB
C++
88 lines
1.6 KiB
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include <QColorDialog>
|
|
#include <QListWidgetItem>
|
|
#include <QSettings>
|
|
#include <QTime>
|
|
#include <vector>
|
|
#include "alarmtime.h"
|
|
#include "microcontroller.h"
|
|
|
|
|
|
namespace Ui
|
|
{
|
|
class MainWindow;
|
|
}
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MainWindow(QSettings *settings, Microcontroller *micro, bool isRemoteMode = false, QWidget *parent = 0);
|
|
~MainWindow();
|
|
|
|
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
|
|
QColorDialog colorChooser;
|
|
|
|
QSettings *_settings;
|
|
|
|
Microcontroller *_micro;
|
|
|
|
std::vector<QAbstractButton*> _relayCheckBoxes;
|
|
|
|
void remoteMode();
|
|
|
|
signals:
|
|
|
|
void signalAmpOn();
|
|
void signalAmpOff();
|
|
|
|
void signalAlmNightStateChanged(int state);
|
|
void signalAlmNightChanged(const QTime time);
|
|
|
|
void signalAlmAlarmStateChanged(int state);
|
|
void signalAlmAlarmChanged(const QTime time);
|
|
|
|
void showAdvRelayDialog();
|
|
|
|
private slots:
|
|
|
|
void postActivate();
|
|
|
|
//RGB
|
|
void slotChangedRgb(const QColor color);
|
|
void slotApplyPreset();
|
|
|
|
void changeHeaderLableText(const QString string);
|
|
|
|
//relays
|
|
void relayCheckBoxToggeled(int state);
|
|
|
|
//Automation
|
|
void slotAmpAutoToggle(int state);
|
|
void slotBSpeakerAutoToggle(int state);
|
|
void slotInfMirrorAutoToggle(int state);
|
|
|
|
//Alarm
|
|
void slotChangedAlarmTime(const QTime time);
|
|
void saveAlarmState(int state);
|
|
|
|
//Night
|
|
void slotChangedNightTime(const QTime time);
|
|
|
|
|
|
public slots:
|
|
|
|
void relayStateChanged(std::vector<bool> relayStates);
|
|
|
|
};
|
|
|
|
#endif // MAINWINDOW_H
|