-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlightsform.h
50 lines (43 loc) · 1023 Bytes
/
lightsform.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* @author Saef Taher
* @date 14/01/2018
*/
#ifndef LIGHTSFORM_H
#define LIGHTSFORM_H
#include "formsinglelight.h"
#include "light.h"
#include "lightlistmodel.h"
#include <memory>
#include <QWidget>
namespace Ui {
class LightsForm;
}
/**
* @brief The LightsForm class handels updating lights
*/
class LightsForm : public QWidget
{
Q_OBJECT
public:
explicit LightsForm(QWidget *parent = 0);
~LightsForm();
/**
* @brief setModel sets the model to use on the listView
* @param model the LightListModel which should be used.
*/
void setModel(LightListModel *model);
public slots:
/**
* @brief ambilight triggers ambilight calculation and update
*/
void ambilight();
private slots:
void on_listView_clicked(const QModelIndex &index);
private:
Ui::LightsForm *ui;
LightListModel *lightListModel_;
FormSingleLight* formSingleLight_;
void showForm(Light curLight_, QModelIndex index);
QColor avgScreenColor();
};
#endif // LIGHTSFORM_H