mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-11-10 18:00:31 +01:00
5c8ca78c99
doorlock_client now caches wave files in memory for faster playback. LibAO is used for audio playback and libsndfile for wave file header parsing.
43 lines
741 B
C++
43 lines
741 B
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QWidget>
|
|
|
|
#include "../lib/clientmessage.h"
|
|
#include "wave.h"
|
|
|
|
namespace Ui {
|
|
class MainWindow;
|
|
}
|
|
|
|
class MainWindow : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MainWindow(QWidget *parent = 0);
|
|
|
|
MainWindow(const MainWindow &rhs);
|
|
MainWindow &operator =(const MainWindow &rhs);
|
|
|
|
~MainWindow();
|
|
|
|
void setClientmessage(const Clientmessage &msg);
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
|
|
Clientmessage _oldMessage = { };
|
|
|
|
const Wave _soundLock;
|
|
const Wave _soundUnlock;
|
|
const Wave _soundEmergencyUnlock;
|
|
const Wave _soundZonk;
|
|
const Wave _soundLockButton;
|
|
const Wave _soundUnlockButton;
|
|
|
|
void _LED(const bool on);
|
|
};
|
|
|
|
#endif // MAINWINDOW_H
|