-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontroller.h
More file actions
36 lines (29 loc) · 716 Bytes
/
controller.h
File metadata and controls
36 lines (29 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef CONTROLLER_H
#define CONTROLLER_H
#include <QWidget>
#include <QLabel>
#include <QGridLayout>
#include <QGroupBox>
#include <QTimer>
#include "led.h"
constexpr int flashingIntervalMs = 80;
/*!
* \brief The Controller class is a widget that displays the name of the controller, and flashes an "LED" when there is input action.
*/
class Controller : public QWidget
{
Q_OBJECT
public:
explicit Controller(QString name, QWidget *parent = nullptr);
private:
QGroupBox *gbOutline;
QGridLayout *loOutline;
QGridLayout *loMain;
QLabel *laName;
Led *indicator;
QTimer flashTimer;
public slots:
void flashIndicator();
void flashIndicatorTo();
};
#endif // CONTROLLER_H