2015-09-28 17:05:05 +02:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
2015-09-30 15:26:28 +02:00
|
|
|
#include <QWidget>
|
2015-10-11 19:33:19 +02:00
|
|
|
|
2015-10-02 19:39:47 +02:00
|
|
|
#include "../lib/clientmessage.h"
|
2016-07-21 22:48:56 +02:00
|
|
|
#include "../lib/logger.h"
|
2015-10-11 19:33:19 +02:00
|
|
|
#include "wave.h"
|
2015-09-28 17:05:05 +02:00
|
|
|
|
2015-09-30 15:26:28 +02:00
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
2015-09-28 17:05:05 +02:00
|
|
|
|
2015-09-30 15:26:28 +02:00
|
|
|
class MainWindow : public QWidget
|
2015-09-28 17:05:05 +02:00
|
|
|
{
|
2015-09-30 15:26:28 +02:00
|
|
|
Q_OBJECT
|
2015-09-29 02:13:48 +02:00
|
|
|
|
2015-09-30 15:26:28 +02:00
|
|
|
public:
|
2016-07-21 22:48:56 +02:00
|
|
|
explicit MainWindow(const std::string &hostname,
|
|
|
|
const unsigned short port,
|
|
|
|
QWidget *parent = 0);
|
2015-10-01 23:07:14 +02:00
|
|
|
|
|
|
|
MainWindow(const MainWindow &rhs);
|
|
|
|
MainWindow &operator =(const MainWindow &rhs);
|
|
|
|
|
2015-09-30 15:26:28 +02:00
|
|
|
~MainWindow();
|
2015-09-28 17:05:05 +02:00
|
|
|
|
2016-07-21 22:48:56 +02:00
|
|
|
public slots:
|
2015-10-02 19:39:47 +02:00
|
|
|
void setClientmessage(const Clientmessage &msg);
|
2015-09-28 17:05:05 +02:00
|
|
|
|
|
|
|
private:
|
2015-09-30 15:26:28 +02:00
|
|
|
Ui::MainWindow *ui;
|
2015-10-05 23:59:18 +02:00
|
|
|
|
2015-10-07 17:42:52 +02:00
|
|
|
Clientmessage _oldMessage = { };
|
|
|
|
|
2015-10-11 19:33:19 +02:00
|
|
|
const Wave _soundLock;
|
|
|
|
const Wave _soundUnlock;
|
|
|
|
const Wave _soundEmergencyUnlock;
|
|
|
|
const Wave _soundZonk;
|
|
|
|
const Wave _soundLockButton;
|
|
|
|
const Wave _soundUnlockButton;
|
|
|
|
|
2015-10-06 00:22:35 +02:00
|
|
|
void _LED(const bool on);
|
2015-09-28 17:05:05 +02:00
|
|
|
};
|
|
|
|
|
2015-09-30 15:26:28 +02:00
|
|
|
#endif // MAINWINDOW_H
|